Agent handoff
Once you send a capture, Quey routes it to your coding agent through MCP tools. The agent reads the element context and instruction, edits the file, and streams a summary back to the toolbar. You then approve or reject the changes.
How it works
- You select an element and type an instruction in the browser.
- The extension sends the capture to the MCP bridge (HTTP).
- Your agent polls the bridge using MCP tools and reads the pending capture.
- The agent opens the source file (using the file path hint from the capture) and makes the edit.
- The agent calls
quey_resolveto mark the capture as done and stream a summary. - The toolbar receives the diff and shows it to you for approval.
Note
The exact flow depends on your approval mode. With
Ask, the agent waits for your approval before starting. With Allow, it runs immediately and shows the diff after.MCP tools
Your agent interacts with Quey through these MCP tools:
| Tool | Purpose |
|---|---|
quey_get_pending | Fetch the next pending capture from the queue. |
quey_get_capture | Get a specific capture by ID (for retries or inspection). |
quey_acknowledge | Mark a capture as in-progress (optional, for status updates). |
quey_resolve | Mark a capture as resolved and send a summary back to the toolbar. |
quey_dismiss | Reject a capture without making changes (e.g., if it's not actionable). |
quey_watch | Block until a new capture arrives (for hands-free loops). |
See MCP tools reference for detailed schemas and examples.
Capture states
Every capture moves through explicit states so you know where it is in the workflow:
| State | Meaning |
|---|---|
pending | Just sent. Waiting for the agent to pick it up. |
acknowledged | Agent has read the capture and is working. |
tool_review | Agent has made changes but is waiting for your approval before committing (Ask mode only). |
file_review | Changes are made. Toolbar shows diff. Waiting for your approve/reject. |
resolved | Approved. Changes are on disk. Capture is closed. |
dismissed | Rejected or cancelled. No changes kept. |
Approval & review
After the agent makes changes, the toolbar shows an inline diff. You have three options:
- Approve — keeps the changes on disk and marks the capture as resolved.
- Reject — rolls back the changes and dismisses the capture.
- Edit then approve — close the diff, edit the code manually in your editor, then approve the capture without re-running the agent.
Rejection restores the pre-run file state, so you can reject, edit the instruction, and send a new capture without losing any manual work.
Tip
Use the toolbar's Undo button to revert the last capture. This cancels the MCP request and restores the file, in case you change your mind immediately.