Skip to content

fix(codex): render plans in approval UI#3524

Merged
trunk-io[bot] merged 4 commits into
mainfrom
posthog-code/fix-codex-plan-ui
Jul 20, 2026
Merged

fix(codex): render plans in approval UI#3524
trunk-io[bot] merged 4 commits into
mainfrom
posthog-code/fix-codex-plan-ui

Conversation

@MattPua

@MattPua MattPua commented Jul 16, 2026

Copy link
Copy Markdown
Member

Problem

Codex plan output renders as regular chat markdown instead of the dedicated plan approval UI used by Claude.

BEfore:
CleanShot 2026-07-16 at 15 40 14@2x

After:
CleanShot 2026-07-16 at 15 39 58@2x

Changes

  • Buffer Codex plan deltas instead of adding them to the transcript.
  • Emit a structured plan tool call for approval and persist its final status.
  • Show rejected Codex plans correctly in the shared plan view.

How did you test this?

  • pnpm --filter @posthog/agent exec vitest run src/adapters/codex-app-server/mapping.test.ts src/adapters/codex-app-server/codex-app-server-agent.test.ts
  • pnpm --filter @posthog/ui exec vitest run src/features/sessions/components/session-update/PlanApprovalView.test.tsx
  • pnpm --filter @posthog/agent typecheck
  • pnpm --filter @posthog/ui typecheck
  • Commit hook full pnpm typecheck

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Created with PostHog Code

Generated-By: PostHog Code
Task-Id: 2cd7c8b3-ddf5-4e4c-994d-1f5bbafabff0
@MattPua MattPua self-assigned this Jul 16, 2026
@trunk-io

trunk-io Bot commented Jul 16, 2026

Copy link
Copy Markdown

😎 Merged successfully - details.

@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 5f9dfbf.

@MattPua
MattPua marked this pull request as ready for review July 16, 2026 19:40
@greptile-apps

greptile-apps Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "fix(codex): render plans in approval UI" | Re-trigger Greptile

Comment thread packages/agent/src/adapters/codex-app-server/codex-app-server-agent.ts Outdated
Comment thread packages/agent/src/adapters/codex-app-server/codex-app-server-agent.ts Outdated
Comment thread packages/ui/src/features/sessions/components/session-update/PlanApprovalView.tsx Outdated
Generated-By: PostHog Code
Task-Id: 2cd7c8b3-ddf5-4e4c-994d-1f5bbafabff0
@MattPua
MattPua marked this pull request as draft July 16, 2026 19:53
@MattPua
MattPua marked this pull request as ready for review July 16, 2026 19:56
@greptile-apps

greptile-apps Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Reviews (2): Last reviewed commit: "fix(codex): harden plan approval lifecyc..." | Re-trigger Greptile

@veria-ai

veria-ai Bot commented Jul 16, 2026

Copy link
Copy Markdown

PR overview

All previously flagged issues have been addressed. No open security concerns remain on this pull request.

Security review

No open security issues remain on this pull request.

Fixed/addressed: 1 · PR risk: 0/10

MattPua added 2 commits July 16, 2026 16:07
Generated-By: PostHog Code
Task-Id: 7305b2f0-aa76-413e-b0ea-a2078250be66
@MattPua MattPua added the Stamphog This will request an autostamp by stamphog on small changes label Jul 20, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All bot-raised concerns (cancellation timing, stuck terminal status, misleading rejection copy, unbounded plan snapshots) are demonstrably addressed in the current diff with targeted fixes and matching tests. No unresolved review comments, no security or data-model concerns.

@trunk-io
trunk-io Bot merged commit 551f9c3 into main Jul 20, 2026
37 checks passed
@trunk-io
trunk-io Bot deleted the posthog-code/fix-codex-plan-ui branch July 20, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Stamphog This will request an autostamp by stamphog on small changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant