fix(acp): sync native agent session titles#1028
Conversation
There was a problem hiding this comment.
Findings
- [Major] ACP title refresh can hold a completed turn busy for up to the transport timeout.
refreshSessionInfo()callssession/listwith the default 120s request timeout, and the launchers await it before theirfinallyblocks clear thinking and emitready(cli/src/cursor/cursorAcpRemoteLauncher.ts:257,cli/src/opencode/opencodeRemoteLauncher.ts:288,cli/src/kimi/kimiRemoteLauncher.ts:174). If an ACP build is slow or wedges onsession/list, the user cannot send the next prompt for up to two minutes after the model already finished.
Suggested fix:and keep refresh off the turn-critical path in each launcher:const response = await this.transport.sendRequest('session/list', { cwd }, { timeoutMs: 5000 });
void backend.refreshSessionInfo(acpSessionId, session.path);
Summary
- Review mode: initial. Found one turn-readiness regression risk introduced by the ACP native title refresh path.
Testing
- Not run (automation)
HAPI Bot
There was a problem hiding this comment.
Findings
No issues found.
Summary
Review mode: follow-up after new commits. No issues found in the latest diff. Residual risk: ACP title sync depends on native ACP agent behavior for session_info_update and session/list; reviewed statically because tests could not run here.
Testing
Not run: bun is not installed in this runner (/bin/bash: bun: command not found).
HAPI Bot
…ssion-titles # Conflicts: # cli/src/agent/backends/acp/AcpSdkBackend.ts
There was a problem hiding this comment.
Findings
No issues found.
Summary
Review mode: follow-up after new commits. No issues found in the latest full PR diff. Residual risk: reviewed statically because the runner does not have Bun installed, so the new ACP title-sync tests and CLI typecheck could not be executed here.
Testing
Not run: bun is not installed in this runner (/bin/bash: bun: command not found).
HAPI Bot
Summary
session_info_updatetitle events and sync them to HAPI session summariessession/listfor agents that persist titles without pushing an update; retry placeholder titles asynchronouslychange_titleMCP tool for remote Cursor, OpenCode, and Kimi ACP sessions while preservingdisplay_imageWhy
Cursor now emits the standardized ACP title update directly. Current OpenCode and Kimi sources generate and persist native titles exposed by
session/list, but do not emitsession_info_update. HAPI previously discarded the pushed title field and relied on its own MCP fallback.This makes native agent title state authoritative for ACP sessions and removes that fallback from all three remote ACP launchers.
Closes #838.
Validation
bun typecheckbun run testsession_info_updatetitle reached the HAPI summary bridgeenableChangeTitle: falseexposes onlydisplay_image