Skip to content

feat: recognize proposed plans from OpenCode plan mode - #2

Merged
casassg merged 1 commit into
mainfrom
gerardc/opencode-proposed-plan
Oct 5, 2026
Merged

casassg merged 1 commit into
mainfrom
gerardc/opencode-proposed-plan

Conversation

@casassg

@casassg casassg commented Oct 5, 2026

Copy link
Copy Markdown
Owner

OpenCode's plan agent answers in prose, so a plan-mode turn ends as a plain message: no plan card, and no Implement follow-up. Codex gets both because T3 asks for a <proposed_plan> block and its app-server parses it.

In plan mode only, T3 now appends the same block formatting rules to the OpenCode system prompt. The adapter splits the block out of streamed text parts: the assistant message keeps just the prose (a partial opening tag is never shown), and the block becomes a normal proposed_plan node, plan artifact and turn item, streaming then completed. A later block supersedes the earlier plan. No contract changes; OpenCode's experimental plan_exit file flow is not used.

Verification: vp test run on ProposedPlanBlock.test.ts and OpenCodeAdapterV2.test.ts (53 passing, including a streamed-block and supersede test) and tsc --noEmit in apps/server. Not checked against a live OpenCode run.

Written by Claude (claude-sonnet-5-5) via OpenCode in T3 Code.

@casassg
casassg marked this pull request as ready for review October 5, 2026 20:17
@casassg
casassg merged commit e1f383d into main Oct 5, 2026
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