-
Notifications
You must be signed in to change notification settings - Fork 15.4k
ACP agent never sends session_info_update session updates #21013
Description
Description
Problem
The ACP protocol defines session_info_update as a valid SessionUpdate type (with title and updatedAt fields), but the OpenCode ACP agent implementation never emits it.
In packages/opencode/src/acp/agent.ts), the handleEvent method only handles three event types:
1.permission.asked
2.message.part.updated
3.message.part.delta
There is no handler for session metadata changes (e.g. when a session title is auto-generated after the first prompt turn).
Expected behavior
When the session title is generated or updated, the ACP agent should send a session_info_update to connected clients:
await connection.sessionUpdate({
sessionId,
update: {
sessionUpdate: "session_info_update",
title: newTitle,
},
})
Context
The SessionInfoUpdate type is already defined in the ACP SDK (@agentclientprotocol/sdk@0.14.1) with title?: string | null and updatedAt?: string | null fields.
Session titles are generated asynchronously in packages/opencode/src/session/prompt.ts after the assistant responds.
ACP clients (e.g. editors) have no way to learn that a session title has changed, since the update is never forwarded.
Impact
ACP clients cannot display up-to-date session titles. The title shown at session creation time remains stale forever.
Plugins
No response
OpenCode version
No response
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response