Skip to content

Cancel Prompt throws JSONRPC error w/ Gemini CLI #171

@jwflicker

Description

@jwflicker

Summary

According to spec, after sending a cancel request the agent, after all ongoing operations have been successfully aborted and pending updates have been sent, the Agent MUST respond to the original session/prompt request with the cancelled stop reason. I am not seeing a Prompt Response with a cancel reason, but am instead getting a JSONRPC exception to the cancel request.

Perhaps this is a bug with the Gemini CLI...

This seems to happen if i cancel before i get the first thought back... After the first thought is received, cancelation will work as expected and send me back a prompt response with cancel reason.

Expected Behavior:
After sending a cancel request, i should eventually get a prompt response with stopReson of cancelled. I am never getting that with Gemini CLI, rather I am getting an JSONRPC error when sending the cancel request.

Actual Behavior:

acceptPromptRequest('{"prompt":[{"text":"where is florida","type":"text"}],"sessionId":"d102bd54-8dc5-411e-a136-6bb218ed14b2"}');
null

CancelNotification[meta=null, sessionId=d102bd54-8dc5-411e-a136-6bb218ed14b2]
[Trace - 07:56:17 אחה״צ] Sending notification 'session/cancel'
Params: {
  "sessionId": "d102bd54-8dc5-411e-a136-6bb218ed14b2"
}


{"jsonrpc":"2.0","id":"3","error":{"code":-32603,"message":"Internal error","data":{"details":"The user aborted a request."}}}

ACP Version

gemini 0.8.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions