Repository navigation
Description
Summary
When running opencode acp, auto-generated session titles never reach the ACP client. Core OpenCode generates a title after the first user message and internally publishes the rename (bus event SessionEvent.Renamed), but the ACP adapter never forwards it: no session/update notification with sessionUpdate: "session_info_update" and a title field is ever sent. The generated title is only discoverable via session/list.
ACP clients that display dynamic session names from session_info_update (as documented in the ACP core schema — SessionInfoUpdate: "This allows clients to display dynamic session names") therefore keep a static fallback label forever. Example consumer: the ACP Pro VS Code extension, which updates tab titles exclusively from session_info_update — with OpenCode its tabs never rename after the first prompt, while agents that do push titles (e.g. Claude Code's ACP adapter) rename correctly.
Environment
- opencode version: 2.0.32 (also verified in v1.19.3 sources — same gap)
- OS: Windows_NT 10.0.22621.6060 (win32 x64)
- Terminal: Unavailable — ACP runs over stdio (
opencode acp) from an IDE client; no terminal involved - Shell:
C:\Windows\system32\cmd.exe(ComSpec) - Install/channel: latest (npm global
@opencode/cli,channel=latestfrom CLI logs) - Active plugins: none configured (
cli.json/opencode.jsonccontain nopluginsentries)
Reproduction
With a minimal scripted ACP client against opencode acp (v2.0.32):
initialize→session/new(cwd = project directory, no mcpServers) → wait for the response.session/promptwith a short message → wait forstopReason: "end_turn"(the turn completes normally,usage_updateand message chunks are received as expected).- Record every
session/updatenotification for the entire session lifetime → zerosession_info_updatemessages are received. - ~9 seconds after the turn, call
session/list: the new session is listed with the LLM-generated title (e.g."Тест: ответ одним словом"for the prompt "Ответь ровно одним словом: ок") — the title has been generated server-side, but was never pushed to the client.
Reproducible consistently (3 independent runs, v2.0.32). Also reproducible from a GUI client: ACP Pro 0.3.9 + OpenCode, first prompt → tab label never renames.
Expected Behavior
Per the ACP schema, an agent should notify the client when session metadata changes:
{
"sessionUpdate": "session_info_update",
"title": "<generated title>",
"updatedAt": "<iso ts>"
}OpenCode already has the exact hook for this: packages/core/src/session/title.ts publishes SessionEvent.Renamed to the bus when a title is generated or regenerated. Forwarding that event through the ACP adapter as a session_info_update would make dynamic session names work for all ACP clients.
Additionally, session/load replay (packages/cli/src/acp/replay.ts) never tells the client the loaded session's current title either — pushing one session_info_update at the start of the replay would let clients label restored sessions correctly.
Actual Behavior
No session_info_update with a title is ever sent. In the current source (HEAD 501b15af26915ba52682e20e220e7e137e89e92f):
packages/cli/src/acp/translate.ts—session_info_updateis used only for the retry marker_meta["opencode/retry"]; nothing mapsSessionEvent.Renamed/ title changes.packages/cli/src/acp/service.ts—listSessionsmapssession.titleinto thesession/listresponse (with a"New session - <timestamp>"fallback), so titles surface only when the client re-lists sessions on its own.packages/cli/src/acp/replay.ts— contains no title forwarding.
Same for tag v1.19.3 (packages/opencode/src/acp/*): session/list returns title, nothing pushes renames. So no OpenCode release has ever implemented this part of the protocol; clients never received a push.
Additional Context
- Title generation itself works in ACP mode:
session/listreturned generated titles seconds after a completed turn in every test run, so the fix is purely the push (plus a one-time title announcement onsession/load). - Title generation can fail (e.g.
AI_APICallError: Insufficient account fundsseen in logs for the title agent's small model); in that casesession/listkeeps the timestamped fallback. Even when generation succeeds, though, nothing is pushed — the client can't tell the difference without pollingsession/list. - Current client-side workaround: re-open the session (the client picks the title up from
session/list), or pollsession/listafter each turn end. - Frequency: always; user-visible impact: ACP client tab/session labels never auto-rename with OpenCode.
References
- ACP agent never sends session_info_update session updates #21013 — the same report from 2026-04: "ACP agent never sends session_info_update session updates". It was auto-closed by the stale bot on 2026-07-03 with the note "If the issue is still relevant please open a new one" — this is that new issue, still reproducible on 2.0.32.
- PR fix(acp): forward session title updates to ACP clients via session_info_update #21111 — a ready fix for this exact gap ("fix(acp): forward session title updates to ACP clients via session_info_update"), closed unmerged by the automated PR cleanup bot on 2026-05-15 (age/reactions criteria, not a substantive decline). It targets the pre-V2 layout (
packages/opencode/src/acp/agent.ts), but the approach ports directly to the currentpackages/cli/src/acp/adapter. - [FEATURE]: ACP sessions should get auto-generated titles instead of "ACP Session <UUID>" #13139 (completed, 2026-04-13) — "ACP sessions should get auto-generated titles instead of 'ACP Session '": title generation for ACP sessions did land; only the client notification is missing.
Activity
opencode-agent commentedon Oct 18, 2026
Thanks for the detailed write-up and the source pointers, @gultaj!
To restate the request: when OpenCode generates or changes a session's title,
opencode acpshould send asession_info_updatewith thetitleto the client, and send the current title when a session is loaded withsession/load. That way clients can rename their tabs and threads without pollingsession/list.I checked the current
devcode and it matches what you found. Core publishesSessionEvent.Renamed, but the ACP adapter inpackages/cli/src/acp/doesn't forward it, and the onlysession_info_updatemessages it sends are the retry and compaction markers. Sending this notification is optional in ACP and OpenCode has never done it, so I've filed this as a feature request. Maintainers will consider it.Related:
session_info_update; it was never merged and was closed by the automated cleanup botFor now, the workaround you mentioned still works: call
session/listagain after a turn ends.