Skip to content

fix(core): keep command-lister ACP session ephemeral (stop resourceNotFound on restart) - #18

Merged
Seungwoo321 merged 3 commits into
mainfrom
develop
Jun 27, 2026
Merged

fix(core): keep command-lister ACP session ephemeral (stop resourceNotFound on restart)#18
Seungwoo321 merged 3 commits into
mainfrom
develop

Conversation

@Seungwoo321

Copy link
Copy Markdown
Owner

Problem

After a dev-server restart, every page reload logged:

[acp-child] … method: 'session/load' … code: -32002, message: 'Resource not found: <id>'

Empirically traced (real Claude conversation + restart): chat sessions resume fine (verified: agent recalled a secret word across a restart). The error comes from the command-lister session (GET /v1/agent/commands), which only lists slash commands and never carries a conversation turn — so the agent never writes a transcript for it. It was still persisted in the (cwd, clientSessionId)→acpSessionId store, so on restart the runtime tried to loadSession an unresumable id → the agent emitted the -32002 to stderr. It was already caught (fell back to newSession, /commands still 200), but the noise looked like a broken integration.

Fix

getOrCreateSession now treats the reserved command-lister key as store-exempt: it skips both the resume attempt and the persist write, minting a fresh session each run. Chat sessions are unaffected and still resume across restarts.

Tests

packages/core typecheck / lint / build green; vitest 358 passed (added: command-lister session never consults the store nor calls loadSession, mints a fresh session, leaves any stale entry untouched).

Changeset: @agent-devtools/core patch.

🤖 Generated with Claude Code

github-actions Bot and others added 2 commits June 27, 2026 09:09
…ound spam on restart)

The command-lister session (GET /v1/agent/commands) never carries a
conversation turn, so the agent writes no transcript for it. Persisting it in
the (cwd, clientSessionId)->acpSessionId store meant that after a dev-server
restart the runtime tried to loadSession an unresumable id, and Claude Code
logged `[acp-child] session/load -32002 Resource not found` on every reload.
The failure was already caught (fell back to newSession, commands still 200),
but the stderr noise looked like a broken integration.

getOrCreateSession now treats the reserved command-lister key as store-exempt:
it skips both the resume attempt and the persist write, minting a fresh session
each run. Chat sessions are unaffected and still resume across restarts.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agent-devtools-docs Ready Ready Preview, Comment Jun 27, 2026 9:46am

Request Review

@Seungwoo321
Seungwoo321 merged commit 3a0e546 into main Jun 27, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant