Skip to content

ACP does not project plugin plan metadata live or during replay #53928

Description

@danyel117

Functional context

An ACP client such as Zed can display a plan through standard sessionUpdate: plan notifications. At v2 commit 434f7b2 (2.0.24 manifest), successful plugin-tool metadata is retained in tool updates and saved messages but never projected into ACP plans. A plugin that returns the valid ACP shape under metadata.acp.plan therefore cannot display its current phases/tasks or restore that display on session load.

Related report: prevalentWare/opencode-goal-plugin#59

Scope

  • Establish a generic, transport-independent metadata convention: metadata.acp.plan contains ACP entries and optional _meta.
  • Validate entry content, priority (low, medium, high), and status (pending, in_progress, completed) before producing a standard plan notification. Ignore malformed metadata without failing the tool or session.
  • Project successful tool results live in packages/cli/src/acp/translate.ts and during saved-message replay in replay.ts; use the shared decoder in tool.ts.
  • Keep child plans isolated unless the client opts into child-session updates. Keep normal tool notifications.
  • This adapter convention is proposed for maintainer review; OpenCode core does not become a goal engine.

Acceptance criteria

  • AC1: A successful root tool with valid metadata produces its normal tool update and a standard ACP plan with the same entries and metadata.
  • AC2: Loading the saved assistant message replays the same plan.
  • AC3: Invalid or absent plan metadata yields no plan and does not fail streaming or replay.
  • AC4: A child plan cannot replace the root plan when child-session updates are disabled.

Functional tests

Criterion Setup and action Expected evidence
AC1/AC2 Generic successful tool fixture with one completed entry and _meta; translate live events and replay an equivalent saved message Both paths include the same ACP plan and preserve tool notifications
AC3 Fixtures with no metadata or invalid status/entries No ACP plan, normal tool behavior
AC4 Child-session fixture with plan metadata and child updates disabled No plan projected for the child

Run bun run check from the repository root and bun test test/acp in packages/cli, using the required Bun 1.4.2. Fixtures require no provider credentials or installed goal plugin. Native Zed UI rendering is outside this transport-level acceptance.

Out of scope

Goal persistence, planning semantics, command lifetime, interruption classification, client UI redesign, provider behavior, infrastructure, CI/CD and publishing. The independent lifecycle correction is tracked in #53914 / PR #53913.

Dependencies

None for implementation or unit acceptance. A plugin emitting the convention is an optional integration consumer. Lifecycle and plan projection can land independently.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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