Skip to content

ACP clients don't show the session plan — plan sessionUpdate is never emitted #40745

Description

@Petr28

Problem

When OpenCode runs as an ACP agent (Zed, JetBrains, Neovim via ACP), the session todo list that the TUI renders is never shown in the client. ACP defines a first-class plan sessionUpdate for this, but OpenCode's ACP adapter never emits it.

The state is already published as a todo.updated event (packages/schema/src/session-todo.ts, packages/core/src/session/todo.ts) on the same event stream the adapter consumes (sdk.global.event() in packages/opencode/src/acp/event.ts). The handle() switch has no case "todo.updated", so the data is dropped before reaching the client.

The todowrite tool result is visible in ACP clients as a raw tool-call payload, but there is no plan panel — that only comes from sessionUpdate: "plan".

Proposal

Map todo.updatedsession/update with sessionUpdate: "plan" in event.ts. Todo.Info (content/priority/status) maps 1:1 onto ACP PlanEntry.

Verification

  • event.ts emits agent_message_chunk, agent_thought_chunk, tool_call(_update), usage_update, available_commands_update — no plan.

  • SessionTodo.Event.Updated (type: "todo.updated", properties: { sessionID, todos }) is published on EventV2 and surfaces in the global event stream.

  • A standalone ACP agent emitting the equivalent plan updates renders a live plan panel in Zed — the client side is ready.

  • I have verified this behavior is missing

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions