Skip to content

Emit proposed plans for plan-capable clients#4

Draft
s-cork wants to merge 2 commits into
mainfrom
stu-dev/plan-updates-main
Draft

Emit proposed plans for plan-capable clients#4
s-cork wants to merge 2 commits into
mainfrom
stu-dev/plan-updates-main

Conversation

@s-cork

@s-cork s-cork commented Jul 24, 2026

Copy link
Copy Markdown

Fork-only draft for review. This does not submit or retarget anything in agentclientprotocol/codex-acp.

Summary

  • emit completed live plan items as ACP plan_update events when the client advertises Plan support
  • replay saved plan items through the same representation
  • preserve the existing agent-message behavior for clients without Plan support
  • keep completed item text authoritative, with buffered deltas as a fallback

Rationale

agentclientprotocol/codex-acp#326 fixed plan visibility by emitting completed plans as ordinary final-answer messages. That preserves broad client compatibility, but loses the plan semantic: capable clients cannot distinguish a proposed plan from a normal final answer or render it as a first-class plan artifact.

This change preserves that fallback while emitting plan_update only when the client advertises Plan support, including during session replay.

The main review points are capability gating and parity between live events and loaded session history.

Testing

  • npm run typecheck
  • npx vitest run src/__tests__/CodexACPAgent/load-session.test.ts — includes legacy replay without Plan capability
  • npm test — 329 passed, 28 skipped
  • npm run bundle:all with Bun 1.3.11
  • git diff --check main...HEAD

Related work

AI assisted with implementation, test verification, and PR text.

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