Repository navigation
Description
Parent: #342 (epic #338). Feeds the decision lines; sequence it with the other decision sub-issues.
What a debugger hits today
A call the harness itself chose to stop is written as a failed call. Two known instances, both measured on dev:
- A reflex call (the small side model asked for a title or a hint) whose stream is cancelled once the turn no longer needs it leaves an end row with status 200, the error
decode stream: context canceled, no finish, no tokens, no cost. Seen twice today, in two different runs, onnex-agi/nex-n2-miniwith the tagreflex. - The losing arm of a hedge, cancelled the moment the other arm commits, leaves the same row: 200,
decode stream: context canceled. Seen this morning on the compile calls of a headless run.
A person reading the log sees calls that failed. They did not fail; the harness stopped them on purpose, and the row does not say so, who stopped them, or why. The record is lying about what happened, which is worse than saying nothing.
The law
A stop the harness chose is recorded as a stop, with who stopped it and why, never as an error.
Fix shape
One classification at the cancel seam and one field on the end row. Where the adapter's streamed path ends on a context cancellation, it asks the context why it was cancelled: a cause the harness set (the hedge committed to the other arm, the turn no longer needs the reflex, a person pressed escape, a deadline the harness chose) becomes a stopped word on the row with the reason, and the error field stays empty. A cancellation with no harness cause stays an error, because then it is one. The same classification is what the decision line in #342 carries, so the two records agree.
Replication
aforge chat --once "say hello in three words" --model deepseek/deepseek-v4-flash
aforge logs --tag reflex --tail 2Today: the reflex end row shows → 200 and decode stream: context canceled as its outcome.
Acceptance (functional)
- After the command above, the reflex end row shows a stop with its reason (the turn finished without it) and no error.
- Force a hedge (a low first-token deadline on a model with several lanes): the losing arm's end row shows a stop naming the winning arm as the reason and no error; the winning arm's row is unchanged.
- Press escape mid-reply in a session: the cut call's end row shows a stop naming the person as who stopped it.
- A genuine transport cancellation with no harness cause still shows as an error.
aforge logsprints the stop word and reason where it prints the error today.
Drafted with CodeAF · reviewed and owned by the author
Activity
santoshkumarradha commentedon Sep 10, 2026
Consolidated into the epic #338. This issue's law, fix shape, replication and acceptance are reproduced in full in the epic's consolidated plan (comment on #338, 2026-09-10), under the pull request that now carries it — nothing is lost, and this issue stays readable.
Why the children were folded back: the epic split into a foundation child, three decision-family children and a failure-evidence child so separate lanes could take them. Four weeks on, one lane took the foundation and the tree carried nine open issues describing what is now a handful of call sites each. The verified state at dev@95a0d0a9b is that
internal/trace'sRecorder.Call,Recorder.ToolandRecorder.Decisionhave zero callers outside the package's own tests — the shapes are all built and correct, and no feeder is wired, soAFORGE_DEBUG=1today writes a run header and nothing else. That is one lane's work in three pull requests, not nine issues.