Skip to content

fix(cloud-agent): inject prContext into codex prompts#1719

Open
tatoalo wants to merge 1 commit intofix/codex-broadcast-user-messagefrom
fix/codex-prcontext-injection
Open

fix(cloud-agent): inject prContext into codex prompts#1719
tatoalo wants to merge 1 commit intofix/codex-broadcast-user-messagefrom
fix/codex-prcontext-injection

Conversation

@tatoalo
Copy link
Copy Markdown
Contributor

@tatoalo tatoalo commented Apr 17, 2026

Problem

On Slack-originated follow-up runs the agent-server sets _meta.prContext on the prompt so the agent sees the PR review context. Claude's acp-to-sdk.ts prepends it as a text block; codex forwarded params unchanged to codex-acp and the context was silently dropped — follow-ups lost their review framing.

Changes

Prepend _meta.prContext to the prompt as a text block before forwarding to codex-acp. Keep the user_message_chunk broadcast on the original params so the injected context is not rendered as a user message in the UI.

How did you test this?

  • New unit test asserting the forwarded prompt carries the prContext prefix and the broadcast shows only the real user turn.
  • Full @posthog/agent suite green.

Copy link
Copy Markdown
Contributor Author

tatoalo commented Apr 17, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

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