Skip to content

fix(cloud-agent): broadcast user prompt on codex cloud runs#1718

Open
tatoalo wants to merge 1 commit intomainfrom
fix/codex-broadcast-user-message
Open

fix(cloud-agent): broadcast user prompt on codex cloud runs#1718
tatoalo wants to merge 1 commit intomainfrom
fix/codex-broadcast-user-message

Conversation

@tatoalo
Copy link
Copy Markdown
Contributor

@tatoalo tatoalo commented Apr 17, 2026

Problem

Cloud tasks running on the codex adapter don't display the user's message in the PostHog web UI log. codex-acp doesn't echo session/prompt back as a session/update, so the tapped stream persisted to S3 never sees a user turn and only the agent reply shows up.

Regressed by #1644 (first time codex became a cloud adapter — Claude had always broadcast).

Changes

Mirror ClaudeAcpAgent.broadcastUserMessage in CodexAcpAgent.prompt: emit one user_message_chunk session update per prompt chunk before delegating to codexConnection.prompt.

How did you test this?

  • New unit test in codex-agent.test.ts asserting client.sessionUpdate is called with user_message_chunk for each chunk before codexConnection.prompt resolves.
  • Full @posthog/agent suite green.

Copy link
Copy Markdown
Contributor Author

tatoalo commented Apr 17, 2026

@tatoalo tatoalo marked this pull request as ready for review April 17, 2026 17:07
@tatoalo tatoalo requested a review from a team April 17, 2026 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant