Edit arguments and run
Inject replaces a tool’s result: the real call is skipped. Edit arguments replaces its input: the real call runs, with the arguments you typed. Use it when the tool is fine and the model asked for the wrong thing — a date in the wrong format, a limit that is too large, an id that does not exist — and you want to see what happens when the call goes through for real.
Using it
Section titled “Using it”-
Get to a gate on a tool call. Pause-on-error is armed by default, so a tool that threw on bad arguments is already held. For a call that did not fail, set a breakpoint on the tool (breakpoints & step mode).
-
Choose “Edit arguments…” (keyboard:
e). It appears only on pauses the app marked as editable — see where it works. The editor opens pre-filled with the call’s live arguments: what the model asked for or, after an edit the app accepted for this call, the arguments it last ran with (a note says so). -
Change what is wrong. The editor lists the keys you changed. Only those keys are sent; every other key keeps its live value, so a large argument you did not touch is never replaced by a shortened preview.
-
Run it. At a
beforegate the button reads Run with N changes; at anafterorerrorgate it reads Retry with N changes and re-runs the call. The tool runs with the edited arguments and the agent carries on with its real result.
The same works from a terminal or a coding agent — see driving it from the CLI.
What happens to an edit
Section titled “What happens to an edit”- It is checked against the tool’s own schema first. The AI SDK validates the model’s
arguments before a tool runs, so an edited value would otherwise skip that check. GraphMind
re-runs it: the tool’s
inputSchema(AI SDK), its zod schema (LangGraph, MCP), or theinputSchemafrom the lasttools/list(mcp-proxy). The value the schema returns is what runs. - A refused edit keeps the call held. The editor shows why — for a schema failure, “The tool’s schema rejected this: …” naming the field and the problem, never quoting your value — and you can fix it and try again, or continue without an edit.
- Someone else may answer first. Only the first resume for a held call counts, from any
viewer tab or
graphmind resume. A later one is not sent, and the editor (or the pause row) says so — “Taken — another resume for this pause got there first” — right away. So does any other refusal from the server itself, in plain words. - It applies to this call only. The model still sees the arguments it asked for in its history; it is not told they were changed. A second call to the same tool starts from the model’s arguments again.
- A plain retry after an edit re-runs the edited arguments, not the original ones — the record already says the call ran with them.
- It is recorded. The release carries
edited: {after}with the arguments the call actually ran with, the viewer marks the call edited and shows asked for next to ran with, and the audit line says who resumed it (“resumed by viewer”, “resumed by agent”).
| Refusal | Means |
|---|---|
schema | The tool’s schema rejected the edited arguments. |
shape | The edit is not an object of arguments, uses the wrong action for this gate, or tries to change something other than the arguments. |
placeholder / truncated | The value still contains "__REDACTED__" or a shortened preview that never reached the viewer in full. Type the real value. |
not-editable | The server refused it before the app saw it: the app did not announce that it takes edits (a Ruby app, a pre-0.6 app, or one run with GRAPHMIND_DISABLE_EDIT_INPUT), or this pause is not editable (an LLM step, or a tool GraphMind cannot re-run with new arguments). |
edit-refused / forbidden | Your credential may not edit: no token, --allow-control below edit, or a server started with --no-edit-input. |
disabled | The app refused it: editing is switched off in the app (GRAPHMIND_DISABLE_EDIT_INPUT). A 0.6 server normally answers not-editable first. |
unsupported | The app refused it: it cannot apply an edit at this pause. A 0.6 server normally answers not-editable first. |
Where it works
Section titled “Where it works”| Integration | Editable tool calls |
|---|---|
Vercel AI SDK (@graphmind-ai/sdk) | Every wrapped tool, including streaming tools at their before gate. |
| Anthropic / OpenAI SDKs | Wrapped tools called with one object of arguments (OpenAI: or its JSON text). |
LangGraph (@graphmind-ai/langgraph) | Tools wrapped with wrapStructuredTool or gm.tool. |
MCP servers (@graphmind-ai/mcp) | Tools registered with an input schema. |
graphmind mcp-proxy | Every tools/call. Only arguments can change, key by key (a removed argument is refused like a removed top-level key); name and _meta are locked. |
Python (graphmind-ai) | Functions wrapped with @gm.tool / gm.wrap_tools, sync and async, checked against the function’s signature (details). LangChain callbacks observe and cannot take an edit. |
Ruby (graphmind gem) | Not in 0.6.0: the gem does not announce edits, so the server refuses an edit sent to a Ruby app (not-editable) and the call stays held. |
LLM steps are not editable in 0.6.0. An edited prompt would last for one step — the framework rebuilds the next request from its own history — which is not a fix you could trust.
It needs a 0.6.0 app and a 0.6.0 server. An older server never marks a pause editable, and an older app never offers one.
Parallel calls of one tool can each be edited: every 0.6.0 SDK that offers edits names the call a
pause holds (exec.paused.instanceId). A pause that does not say which call is held while several
calls of the same tool run — from a custom adapter that leaves it out — gets no editor, because
the viewer would be guessing whose arguments you are editing. Continue, Retry and Inject still work.
Turning it off, and who may use it
Section titled “Turning it off, and who may use it”- In the app:
GRAPHMIND_DISABLE_EDIT_INPUT=1. The app stops offering editable pauses and refuses edits. Any value except0,false,offandnocounts. - On the server:
graphmind serve --no-edit-inputrefuses every edit, from any credential. - An edit needs a credential. The viewer the server opened has one; a browser tab or script that
connects without it can still continue, retry or abort (as in 0.5), but cannot edit, inject or
change breakpoints — the viewer hides those controls there. The agent token used by
graphmind resumecan edit only when the server runs with--allow-control=edit.
From the CLI
Section titled “From the CLI”A coding agent (or you, in a terminal) can do the same without the viewer. Start the server with edits allowed for the agent token:
npx graphmind-ai serve --allow-control=editThen, while your agent runs:
npx graphmind-ai wait --jsonnpx graphmind-ai resume <pauseId> --run <runId> --action retry --input '{"limit": 50}'Use --action retry at an error or after gate and --action continue at a before gate.
wait blocks until something is held and prints it (large inputs go to files whose paths it
prints). resume reports whether the app ran the edit, refused it (with the code above), or
whether someone else resumed the pause first. --input @args.json reads the arguments from a
file. See the CLI reference.