Skip to content

fix(acp): fix a batch of ACP issues - #66631

Merged
neriousy merged 1 commit into
devfrom
acp-fixes
Nov 26, 2026
Merged

neriousy merged 1 commit into
devfrom
acp-fixes

Conversation

@neriousy

@neriousy neriousy commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

Issue for this PR

Closes #64687
Closes #60298
Closes #59792
Closes #64785
Closes #65715
Closes #65616
Closes #65520
Closes #61283
Closes #59789
Closes #60316
Closes #56894
Closes #59406
Closes #54831
Closes #60434
Closes #57902
Closes #66573

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

batch of acp fixes, all in packages/cli/src/acp + the acp docs page

one thing worth a look: #66573 relaxes the cwd check to "same project", so in a monorepo you can load a session from a sibling dir of the same repo. the session still runs in its own dir. lmk if u want it stricter (eg only registered worktrees)

no flag, these are fixes + small additive acp metadata

skipped the ones that need bigger design or live outside acp (#53914, #62173, #64686, #60065, #40978, #66347, #64042: the acp sdk 1.6 schema no longer has models)

How did you verify your code works?

  • new wire tests for each issue in packages/cli/test/acp (+ content.test.ts), checked they fail on dev and pass here
  • bun test in packages/cli: 449 pass, 0 fail
  • bun typecheck and bun run typecheck:tsc in packages/cli, oxlint on the acp dirs

Screenshots / recordings

n/a, protocol only

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Added by the opencode bot (AI-generated).

Related: #64034, #62868, #40978

Public API: ACP wire: adds session_info_update titles, child-session _meta in session/list, directory/status/retryAfterMs error data and skill commands; changes model labels, command error codes and cost totals (backwards compatible)

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No blocking issues found. Each linked issue has a wire test; all fail on the base and pass with this change (131/131 in test/acp), and tsc -b is clean. I also ran opencode acp from source with a small ACP client, base vs PR. Model labels now use the provider's display name (Fake Provider / Model One instead of fakeprov/Model One), skills appear in available_commands_update, and a load from an unrelated cwd is still rejected, with the session's directory now in the error data. I couldn't run the fixes that need a real model turn end to end, so I checked those through the tests and the code.

Public API (ACP wire only; no SDK, HTTP or config changes):

  • Added: a session_info_update with title when a session is renamed.
  • Added: _meta["opencode/child-session"] (id, parentID, title) on subagent entries in session/list.
  • Added: directory in the cwd-mismatch error data, and status / retryAfterMs in prompt error data.
  • Added: skills as entries in available_commands_update.
  • Changed: model option labels go from providerID/Model to Provider Name / Model.
  • Changed: CommandNotFoundError now comes back as invalid params, and CommandExecutionError as a service failure carrying the command's own message, instead of an internal error.
  • Changed: usage_update.cost now includes subagent sessions.
  • Changed: session/load, session/resume and fork now accept any cwd in the same non-global project as the session.

All of this is backwards compatible: the new fields are optional additions, and clients that relied on the old label format or exact-cwd rejection are the only ones that would notice.

On your #66573 question, "same project" seems reasonable, since the session still runs in its own directory. One side effect: a cwd that doesn't match now costs a location.get call for that path before the request is rejected.

Related: #64034, #62868, #40978

@flupkede

flupkede commented Nov 28, 2026 •

Copy link
Copy Markdown

Thanks @neriousy! #66573 was mine, much appreciated.

@amrkmn amrkmn mentioned this pull request Nov 30, 2026
1 task
BambinoSK added a commit to BambinoSK/agentbridge that referenced this pull request Nov 30, 2026
ACP agents report a session's title in session_info_update, and OpenCode
will send its generated title that way once anomalyco/opencode#66631 is
released. AcpClient stored the title under the agent's own session id,
but conversation.db keys sessions by AgentBridge's id, so the update
matched no row and the resume dropdown kept showing the first 60
characters of the first prompt.

The title now goes to AgentBridge's current session, the one the agent
session belongs to. The first-prompt name stays as the fallback until a
title arrives, and later prompts do not replace it.
catatafishen pushed a commit to catatafishen/agentbridge that referenced this pull request Dec 1, 2026
ACP agents report a session's title in session_info_update, and OpenCode
will send its generated title that way once anomalyco/opencode#66631 is
released. AcpClient stored the title under the agent's own session id,
but conversation.db keys sessions by AgentBridge's id, so the update
matched no row and the resume dropdown kept showing the first 60
characters of the first prompt.

The title now goes to AgentBridge's current session, the one the agent
session belongs to. The first-prompt name stays as the fallback until a
title arrives, and later prompts do not replace it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment