kimi-code icon indicating copy to clipboard operation
kimi-code copied to clipboard

[ACP] session/delete on an unknown sessionId and session/list filtered by an unused cwd both error instead of succeeding with an empty/no-op result

Open agourakis82 opened this issue 2 months ago • 0 comments

Found by running the official acp-tck v1 suite against kimi acp (Kimi Code CLI 0.34.0). Two small, unrelated requirements, bundled because both are "return an empty/successful result instead of an error for a degenerate-but-valid request" gaps.

ACP-DELETE-002 (ADVISORY): FAIL

Deleting an already-deleted or never-created sessionId SHOULD succeed silently, rather than erroring. (docs/protocol/v1/session-delete.mdx:86, D2)

--> {"jsonrpc":"2.0","id":2,"method":"session/delete","params":{"sessionId":"tck-never-created-session"}}
<-- {"jsonrpc":"2.0","id":2,"error":{"code":-32602,"message":"Invalid params: Unknown sessionId: tck-never-created-session","data":{"sessionId":"tck-never-created-session"}}}

No session/new was ever sent for this id on the connection. The spec treats deleting an unknown or already-gone id as a no-op success, since the end state the caller wants (that id having no session) is already true.

ACP-LIST-002 (CAPABILITY): FAIL

session/list filtered by a cwd that no session uses returns sessions: [] (an empty array, never null, never an error). (docs/protocol/v1/session-list.mdx:84-87,166; schema/v1/schema.json:4993-4996, S2/S5)

I don't have the exact transcript bytes for this one on hand (SSH to the box that ran it dropped before I could pull the full JSON report — happy to re-run and attach it if useful), but the TCK's own requirement text above is precise: filtering session/list by a cwd nothing matches should come back as an empty list, not null or an error response.

Suggestion

Same shape for both: treat "nothing found / nothing to do" as success with an empty/no-op result, not an error — matching how session/list already presumably handles a cwd that matches zero sessions in the common case vs. this edge.

agourakis82 avatar Oct 01 '26 09:10 agourakis82