Repository navigation
Description
What happened
2026-09-11, dev@333acc67d, live drive of the chat surface, scenario 6. The model called propose_task with a composed shell command in checks. The engine refused the arguments. The person's screen got both halves of a conversation that was never theirs:
╰─ not started · the call was refused
and, opened underneath it, the refusal text itself:
Invalid arguments: checks must each be ONE command with no shell composition — "cd 1-check && ./run.sh" is not
checks, shell composition and the quoting of the offending argument are the schema talking to the model. The person is being shown a repair instruction addressed to somebody else, about a field they have never heard of, on a card that says nothing started.
Replication
Deterministic (no model). internal/tui3, through the reducer the chat uses — internal/tui3/forming_test.go already drives this exact shape (it settles a forming card with Hint: "Invalid arguments: brief is required"):
Feed the feed a session.EventToolBegin for propose_task, then
session.Event{
Kind: session.EventToolFailed,
Tool: "propose_task",
Hint: `Invalid arguments: checks must each be ONE command with no shell composition — "cd 1-check && ./run.sh" is not`,
Output: `Invalid arguments: checks must each be ONE command with no shell composition — "cd 1-check && ./run.sh" is not`,
}and render.
go test ./internal/tui3 -run TestAToolArgumentRefusalIsNotDrawnToThePerson -count=1Expected today: the rendered frame contains not started · the call was refused and the whole Invalid arguments: checks must each be ONE command with no shell composition sentence, in an entry that opened itself.
Expected after the fix: the frame contains the card's own settled words and no Invalid arguments: text.
Field (real models). OPENROUTER_API_KEY, the chat surface, a /task whose acceptance is naturally a composed command (cd X && make test). Small models compose in checks routinely. One turn, cents.
Where — the leak, in two hops
- The text is written for the model.
declaredCheckListininternal/session/task_checks.goreturns"Invalid arguments: checks must each be ONE command with no shell composition — " + strconv.Quote(...) + " is not". That is correct and must stay: it is one repair away from a working check, which is the stated reason the door refuses rather than dropping silently. - The engine puts it on the wire as a person-facing hint.
internal/session/loop.go, the batch-result loop (searchKind: EventToolFailed), sendsHint: clip(firstLine(results[index].text), hintLimit)andOutput: capOutput(results[index].text)— the tool's own result text, unchanged. - The surface draws it and opens it.
feed.closeToolininternal/tui3/feed.go, reached fromf.closeTool(ev, toolFailed, firstNonEmpty(ev.Hint, errText(ev.Err))): it writese.text = e.text + " — " + whyand then setse.open = trueunder the comment A FAILURE OPENS ITSELF. That law is right for a bash that failed; a schema refusal is not that kind of failure. - The card beside it is
app.refuseFormingCard/taskFormingRefusedininternal/tui3/task.go—not started · the call was refused— which is the correct and sufficient sentence.
The fix
A tool-argument refusal is a result the model reads and repairs, and never a sentence drawn to the person — unless the model gives up on the call, in which case what the person reads is the model's own account of giving up, in its own words.
The row for a refused call says what a person can act on: the call was refused, and the model is fixing it. The schema's sentence stays where it belongs — in the tool result, in the transcript, and behind ctrl+o for somebody who asks for it — rather than being drawn expanded by default. Concretely, a failure that is an argument refusal (the engine knows: it never reached the tool's work) does not take the A FAILURE OPENS ITSELF road, and its hint is not the raw result text.
The existing sentence not started · the call was refused is already the right words and does not change.
Acceptance
- e2e:
go test -tags e2e ./internal/e2e/(the tmux suite) — a task proposal refused on its arguments drawsnot started · the call was refusedand the screen never containsInvalid arguments:. - e2e: the control — a genuinely failed
bashstill opens itself with its own output, soA FAILURE OPENS ITSELFis intact for the case it was written for. - Unit:
internal/tui3— atoolFailedentry whose failure is an argument refusal renders withopen == falseand with no substring of the refusal text in its drawn row;internal/session— the refusal still reaches the model verbatim as the tool result, asserted on the transcript. internal/manual/chat/how-tasks-run.md(which today quotesInvalid arguments: checks must each be ONE command with no shell compositionas something the screen shows) is corrected to say where that sentence goes, and the change entry'sinvalidatesnames the belief that a refused call spills its schema error into the conversation.
🤖 Generated with Claude Code
Drafted with CodeAF · reviewed and owned by the author
Activity
lane #890: what the killed run left on disk
changelog #890: a refused call no longer spills its schema sentence
tests+manual #890: refusal e2e, tuiwords row, manual correction
#890: the engine says which failure never reached the tool's work
lane #890: what the killed run left on disk
changelog #890: a refused call no longer spills its schema sentence
tests+manual #890: refusal e2e, tuiwords row, manual correction
#890: the engine says which failure never reached the tool's work
lane #890: what the killed run left on disk
changelog #890: a refused call no longer spills its schema sentence
tests+manual #890: refusal e2e, tuiwords row, manual correction
e2e #890: the refusal subtest waits for a word, not five seconds
chat: a call refused on its own arguments says so, and the schema's s…