Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changeset/core-command-lister-ephemeral.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@agent-devtools/core': patch
---

fix(core): keep the command-lister ACP session ephemeral so it stops logging a `resourceNotFound` on every dev-server restart

The command-lister session (`GET /v1/agent/commands`) only lists slash commands and never carries a conversation turn, so the agent never writes a transcript for it. It was nonetheless persisted in the `(cwd, clientSessionId) → acpSessionId` store like a chat session, so after a dev-server restart the runtime tried to `loadSession` an id the agent could not resume — the agent (Claude Code) emitted `[acp-child] … session/load … -32002 Resource not found` to stderr on every page reload. The failure was already caught and fell back to `newSession` (commands still returned 200), but the noise was alarming and looked like a broken integration.

`getOrCreateSession` now treats the reserved command-lister key as store-exempt: it skips both the resume attempt and the persistence write, minting a fresh session each run. Chat sessions are unaffected and still resume across restarts. Verified end-to-end: a real chat session resumes correctly after a restart, while the command-lister no longer triggers the `session/load` error.
37 changes: 37 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"mode": "pre",
"tag": "beta",
"initialVersions": {
"@agent-devtools/docs": "0.0.8",
"@agent-devtools/example-angular-vite": "0.0.0",
"@agent-devtools/example-html": "0.0.0",
"@agent-devtools/example-next": "0.0.0",
"@agent-devtools/example-next-pages": "0.0.0",
"@agent-devtools/example-nuxt": "0.0.0",
"@agent-devtools/example-nuxt2": "0.0.0",
"@agent-devtools/example-react-vite": "0.0.0",
"@agent-devtools/example-svelte-vite": "0.0.0",
"@agent-devtools/example-sveltekit": "0.0.0",
"@agent-devtools/example-vue-vite": "0.0.0",
"@agent-devtools/example-vue2-vite": "0.0.0",
"@agent-devtools/angular": "1.3.2",
"@agent-devtools/core": "1.3.2",
"@agent-devtools/e2e": "0.0.0",
"@agent-devtools/harness-core": "1.3.2",
"@agent-devtools/html": "1.3.2",
"@agent-devtools/next": "1.3.2",
"@agent-devtools/next-pages": "1.3.2",
"@agent-devtools/nuxt": "1.3.2",
"@agent-devtools/nuxt2": "1.3.2",
"@agent-devtools/react": "1.3.2",
"@agent-devtools/svelte": "1.3.2",
"@agent-devtools/sveltekit": "1.3.2",
"@agent-devtools/vite": "1.3.2",
"@agent-devtools/vue": "1.3.2",
"@agent-devtools/vue2": "1.3.2",
"@agent-devtools/widget-core": "1.3.2"
},
"changesets": [
"core-command-lister-ephemeral"
]
}
8 changes: 8 additions & 0 deletions packages/angular/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @agent-devtools/angular

## 1.3.3-beta.0

### Patch Changes

- Updated dependencies [[`469188f`](https://github.com/Seungwoo321/agent-devtools/commit/469188f05949c641c01cc603e99672524bc202e7)]:
- @agent-devtools/core@1.3.3-beta.0
- @agent-devtools/widget-core@1.3.3-beta.0

## 1.3.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@agent-devtools/angular",
"version": "1.3.2",
"version": "1.3.3-beta.0",
"description": "Angular adapter for agent-devtools — Ivy component walker + DOM picker + closed Shadow DOM widget",
"keywords": [
"agent-devtools",
Expand Down
10 changes: 10 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 1.3.3-beta.0

### Patch Changes

- [#18](https://github.com/Seungwoo321/agent-devtools/pull/18) [`469188f`](https://github.com/Seungwoo321/agent-devtools/commit/469188f05949c641c01cc603e99672524bc202e7) Thanks [@Seungwoo321](https://github.com/Seungwoo321)! - fix(core): keep the command-lister ACP session ephemeral so it stops logging a `resourceNotFound` on every dev-server restart

The command-lister session (`GET /v1/agent/commands`) only lists slash commands and never carries a conversation turn, so the agent never writes a transcript for it. It was nonetheless persisted in the `(cwd, clientSessionId) → acpSessionId` store like a chat session, so after a dev-server restart the runtime tried to `loadSession` an id the agent could not resume — the agent (Claude Code) emitted `[acp-child] … session/load … -32002 Resource not found` to stderr on every page reload. The failure was already caught and fell back to `newSession` (commands still returned 200), but the noise was alarming and looked like a broken integration.

`getOrCreateSession` now treats the reserved command-lister key as store-exempt: it skips both the resume attempt and the persistence write, minting a fresh session each run. Chat sessions are unaffected and still resume across restarts. Verified end-to-end: a real chat session resumes correctly after a restart, while the command-lister no longer triggers the `session/load` error.

## 1.3.2

## 1.3.2-beta.0
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@agent-devtools/core",
"version": "1.3.2",
"version": "1.3.3-beta.0",
"description": "Framework-agnostic core for agent-devtools — server, agent engine, widget shell",
"keywords": [
"agent-devtools",
Expand Down
29 changes: 29 additions & 0 deletions packages/core/src/providers/acp-runtime.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,35 @@ describe('createDefaultAcpRuntime — session-store wiring', () => {
expect(store.deleteCalls).toHaveLength(0);
});

it('keeps the command-lister session ephemeral — never consults the store or calls loadSession', async () => {
const store = makeInMemoryStore();
// A stale command-lister entry left by a previous boot. It can never be
// resumed (the lister never has a transcript), so the runtime must ignore
// it instead of attempting a loadSession that always fails with -32002.
// Seed the underlying map directly so the recorder reflects only the
// runtime's own store traffic, not this setup.
store.state.set('/workspace __agent-devtools:command-lister__', 'acp-stale-lister');

const { runtime, harness } = await setup(store, {
commandsOnNewSession: { commands: [{ name: 'foo', description: 'bar' }] },
});

const commands = await runtime.listCommands({
cwd: '/workspace',
signal: new AbortController().signal,
});

expect(commands.map((c) => c.name)).toContain('foo');
// No resume attempt for the reserved key — it mints a fresh session...
expect(harness.recorder.loadSessionCalls).toHaveLength(0);
expect(harness.recorder.newSessionCalls).toHaveLength(1);
// ...and the store is never touched for the command-lister key.
expect(store.getCalls).not.toContainEqual(['/workspace', '__agent-devtools:command-lister__']);
expect(store.setCalls.some(([, cs]) => cs === '__agent-devtools:command-lister__')).toBe(false);
// The stale entry is left as-is (not deleted) — we simply don't read it.
expect(store.deleteCalls).toHaveLength(0);
});

it('in-process cache hit short-circuits the store on the second run within one runtime', async () => {
const store = makeInMemoryStore();
const { runtime, harness } = await setup(store);
Expand Down
9 changes: 8 additions & 1 deletion packages/core/src/providers/acp-runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,14 @@ class AcpChild {
// Phase 1: try to resume a session persisted across dev-server
// restarts. Only meaningful when (a) we have a store and (b) the
// agent supports session/load.
const store = this.deps.sessionStore;
//
// The command-lister session is exempt: it only ever lists slash commands
// and never carries a conversation turn, so the agent writes no transcript
// for it. A persisted id would therefore always fail `loadSession` after a
// restart — an expected `resourceNotFound` that surfaces as noisy agent
// stderr on every reload. Keep it ephemeral (skip the store) so it just
// mints a fresh session each run instead of attempting an unresumable load.
const store = clientSessionId === COMMAND_LISTER_SESSION_KEY ? null : this.deps.sessionStore;
if (store && this.supportsLoadSession) {
const stored = await store.get(cwd, clientSessionId);
if (stored !== undefined) {
Expand Down
2 changes: 2 additions & 0 deletions packages/harness-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Changelog

## 1.3.3-beta.0

## 1.3.2

## 1.3.2-beta.0
Expand Down
2 changes: 1 addition & 1 deletion packages/harness-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@agent-devtools/harness-core",
"version": "1.3.2",
"version": "1.3.3-beta.0",
"description": "Generic agent harness — domain-agnostic loop strategies + LLM provider abstraction. Source for both @agent-devtools and external SaaS consumers.",
"license": "MIT",
"type": "module",
Expand Down
8 changes: 8 additions & 0 deletions packages/html/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @agent-devtools/html

## 1.3.3-beta.0

### Patch Changes

- Updated dependencies []:
- @agent-devtools/vite@1.3.3-beta.0
- @agent-devtools/widget-core@1.3.3-beta.0

## 1.3.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/html/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@agent-devtools/html",
"version": "1.3.2",
"version": "1.3.3-beta.0",
"description": "npx runner for agent-devtools — serve a plain HTML folder with the dev-only widget injected, no framework, no config",
"keywords": [
"agent-devtools",
Expand Down
8 changes: 8 additions & 0 deletions packages/next-pages/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @agent-devtools/next-pages

## 1.3.3-beta.0

### Patch Changes

- Updated dependencies [[`469188f`](https://github.com/Seungwoo321/agent-devtools/commit/469188f05949c641c01cc603e99672524bc202e7)]:
- @agent-devtools/core@1.3.3-beta.0
- @agent-devtools/react@1.3.3-beta.0

## 1.3.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/next-pages/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@agent-devtools/next-pages",
"version": "1.3.2",
"version": "1.3.3-beta.0",
"description": "Next.js Pages Router adapter for agent-devtools — wraps the React widget for legacy pages/_app.tsx hosts",
"keywords": [
"agent-devtools",
Expand Down
8 changes: 8 additions & 0 deletions packages/next/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @agent-devtools/next

## 1.3.3-beta.0

### Patch Changes

- Updated dependencies [[`469188f`](https://github.com/Seungwoo321/agent-devtools/commit/469188f05949c641c01cc603e99672524bc202e7)]:
- @agent-devtools/core@1.3.3-beta.0
- @agent-devtools/react@1.3.3-beta.0

## 1.3.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@agent-devtools/next",
"version": "1.3.2",
"version": "1.3.3-beta.0",
"description": "Next.js 15 adapter for agent-devtools — re-exports the React widget + adds App / Pages router dev-only injection",
"keywords": [
"agent-devtools",
Expand Down
9 changes: 9 additions & 0 deletions packages/nuxt/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @agent-devtools/nuxt

## 1.3.3-beta.0

### Patch Changes

- Updated dependencies [[`469188f`](https://github.com/Seungwoo321/agent-devtools/commit/469188f05949c641c01cc603e99672524bc202e7)]:
- @agent-devtools/core@1.3.3-beta.0
- @agent-devtools/vue@1.3.3-beta.0
- @agent-devtools/widget-core@1.3.3-beta.0

## 1.3.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/nuxt/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@agent-devtools/nuxt",
"version": "1.3.2",
"version": "1.3.3-beta.0",
"description": "Nuxt 3 module for agent-devtools — re-exports the Vue widget + adds dev-only injection through defineNuxtModule",
"keywords": [
"agent-devtools",
Expand Down
9 changes: 9 additions & 0 deletions packages/nuxt2/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @agent-devtools/nuxt2

## 1.3.3-beta.0

### Patch Changes

- Updated dependencies [[`469188f`](https://github.com/Seungwoo321/agent-devtools/commit/469188f05949c641c01cc603e99672524bc202e7)]:
- @agent-devtools/core@1.3.3-beta.0
- @agent-devtools/vue2@1.3.3-beta.0
- @agent-devtools/widget-core@1.3.3-beta.0

## 1.3.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/nuxt2/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@agent-devtools/nuxt2",
"version": "1.3.2",
"version": "1.3.3-beta.0",
"description": "Nuxt 2 module for agent-devtools — re-exports the Vue 2 widget + adds dev-only injection through the Nuxt 2 module API",
"keywords": [
"agent-devtools",
Expand Down
8 changes: 8 additions & 0 deletions packages/react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 1.3.3-beta.0

### Patch Changes

- Updated dependencies [[`469188f`](https://github.com/Seungwoo321/agent-devtools/commit/469188f05949c641c01cc603e99672524bc202e7)]:
- @agent-devtools/core@1.3.3-beta.0
- @agent-devtools/widget-core@1.3.3-beta.0

## 1.3.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@agent-devtools/react",
"version": "1.3.2",
"version": "1.3.3-beta.0",
"description": "React 19 adapter for agent-devtools — fiber walker + DOM picker + closed Shadow DOM widget",
"keywords": [
"agent-devtools",
Expand Down
8 changes: 8 additions & 0 deletions packages/svelte/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @agent-devtools/svelte

## 1.3.3-beta.0

### Patch Changes

- Updated dependencies [[`469188f`](https://github.com/Seungwoo321/agent-devtools/commit/469188f05949c641c01cc603e99672524bc202e7)]:
- @agent-devtools/core@1.3.3-beta.0
- @agent-devtools/widget-core@1.3.3-beta.0

## 1.3.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/svelte/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@agent-devtools/svelte",
"version": "1.3.2",
"version": "1.3.3-beta.0",
"description": "Svelte adapter for agent-devtools — Svelte 4/5 component walker + DOM picker + closed Shadow DOM widget",
"keywords": [
"agent-devtools",
Expand Down
8 changes: 8 additions & 0 deletions packages/sveltekit/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @agent-devtools/sveltekit

## 1.3.3-beta.0

### Patch Changes

- Updated dependencies [[`469188f`](https://github.com/Seungwoo321/agent-devtools/commit/469188f05949c641c01cc603e99672524bc202e7)]:
- @agent-devtools/core@1.3.3-beta.0
- @agent-devtools/svelte@1.3.3-beta.0

## 1.3.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/sveltekit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@agent-devtools/sveltekit",
"version": "1.3.2",
"version": "1.3.3-beta.0",
"description": "SvelteKit adapter for agent-devtools — dev-only handle hook + Svelte adapter mount",
"keywords": [
"agent-devtools",
Expand Down
8 changes: 8 additions & 0 deletions packages/vite/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @agent-devtools/vite

## 1.3.3-beta.0

### Patch Changes

- Updated dependencies [[`469188f`](https://github.com/Seungwoo321/agent-devtools/commit/469188f05949c641c01cc603e99672524bc202e7)]:
- @agent-devtools/core@1.3.3-beta.0
- @agent-devtools/widget-core@1.3.3-beta.0

## 1.3.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/vite/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@agent-devtools/vite",
"version": "1.3.2",
"version": "1.3.3-beta.0",
"description": "Vite plugin for agent-devtools — auto-spawn agent server + dev-only widget injection (Vite 5+)",
"keywords": [
"agent-devtools",
Expand Down
8 changes: 8 additions & 0 deletions packages/vue/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @agent-devtools/vue

## 1.3.3-beta.0

### Patch Changes

- Updated dependencies [[`469188f`](https://github.com/Seungwoo321/agent-devtools/commit/469188f05949c641c01cc603e99672524bc202e7)]:
- @agent-devtools/core@1.3.3-beta.0
- @agent-devtools/widget-core@1.3.3-beta.0

## 1.3.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/vue/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@agent-devtools/vue",
"version": "1.3.2",
"version": "1.3.3-beta.0",
"description": "Vue 3 adapter for agent-devtools — vnode walker + DOM picker + closed Shadow DOM widget",
"keywords": [
"agent-devtools",
Expand Down
8 changes: 8 additions & 0 deletions packages/vue2/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @agent-devtools/vue2

## 1.3.3-beta.0

### Patch Changes

- Updated dependencies [[`469188f`](https://github.com/Seungwoo321/agent-devtools/commit/469188f05949c641c01cc603e99672524bc202e7)]:
- @agent-devtools/core@1.3.3-beta.0
- @agent-devtools/widget-core@1.3.3-beta.0

## 1.3.2

### Patch Changes
Expand Down
Loading