Handle Cursor extension requests: create_plan, ask_question, update_todos#728
Open
shanemcd wants to merge 1 commit into
Open
Handle Cursor extension requests: create_plan, ask_question, update_todos#728shanemcd wants to merge 1 commit into
shanemcd wants to merge 1 commit into
Conversation
…te_todos) Cursor sends blocking extension methods that agent-shell previously replied to with method-not-found, stalling the agent. Add handlers for the three methods we've hit in practice: - cursor/create_plan: display plan body + Accept/Reject/Cancel dialog - cursor/ask_question: completing-read for multiple-choice answers - cursor/update_todos: merge/replace todo state, auto-accept response Dispatch cursor/* methods in agent-shell--on-request before the unhandled-request fallthrough. Ref: https://github.com/xenodim/agent-shell/issues/704 Ref: https://cursor.com/docs/cli/acp#cursor-extension-methods Co-authored-by: Cursor <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
M-x checkdocandM-x byte-compile-file.Summary
Fixes #704.
Cursor sends a few custom ACP methods that agent-shell currently replies to with method-not-found, which stalls the agent. Docs: https://cursor.com/docs/cli/acp#cursor-extension-methods
This handles the three I've actually hit:
cursor/create_plan(blocking): show the plan, Accept (y) / Reject (n) / Cancel (c) dialog in the same style as permission promptscursor/ask_question(blocking):completing-readfor answers (CRM whenallowMultiple)cursor/update_todos(docs call this a notification, but Cursor sends it as a request): update a Todos fragment and auto-accept so we don't stallagent-shell--on-requestnow routescursor/*toagent-shell-cursor--on-request.Tests
11 ERT tests in
tests/agent-shell-cursor-tests.elfor response shape, plan formatting, create_plan dispatch, update_todos merge/response, and theagent-shell--on-requestintegration path. Unknowncursor/*methods still fall through.