Repository navigation
feat(daemon): stamp ACP command-identity digest on sessions - #2783
Conversation
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex P1 addressed in f03a303: the rotation no longer erases the persisted session id up front — the identity stamp and any id change persist together only when the replacement command establishes a session (or hits the post-establishment startup-timeout retry path). New regression test covers the failed-start case: no DB write touches acpSessionId or metadata. |
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Persist a digest of the ACP launch command in session metadata and start a fresh ACP conversation when it changes, so switching the agent command no longer resumes a session created by a different agent. Only the digest is stored — the raw command line never reaches session metadata. Extracted from #2711 (ACP split 8/10).
…n exists Keep the old persisted ACP session id until the replacement command actually establishes a session, so a command change whose agent fails to start can be reverted and the previous conversation resumed. The stamped identity metadata now rides the first session-id persist instead of an eager update that erased the resume handle up front.
f03a303 to
cc39f56
Compare
Extracted from #2711 (ACP split 8/10).
What this adds
SessionMetadata.acpCommandIdentity(shared types): stores a digest of the ACP launch command per session.AcpQueryRunnerstamps the digest at query start; when it differs from the persisted one and an ACP session id exists, the runner drops the persisted session/instructions/context estimate and starts a fresh conversation — switching the agent command (devin acp→claude-agent-acp …) no longer resumes a session created by a different agent. When there is no persisted session, it just stamps.getAcpCommandIdentityDigestloses its@publicknip marker: the query runner is its consumer now.Notes
Verification
bun test tests/unit/lib/acp/acp-query-runner.test.ts— 47/47tsc --build --noEmit, oxlint, biome — cleantests/unit/lib/acp/failure set identical to the clean-dev sandbox baseline (pre-existing AcpClient/mock-server environment noise, none in files this PR touches)