dispatchNextTool pops the next pending tool call and runs it. Every tool flows through runToolCall; none are special-cased. lastToolKey records this call's target so the failure nudge can tell when the model keeps retrying the same failing operation (see recordToolOutcome).
()
| 1051 | m.pending = m.pending[1:] |
| 1052 | m.appendLine(styleDim.Render(tools.InlineStatus(call))) |
| 1053 | m.lastToolKey = toolTargetKey(call) |
| 1054 | m.toolRounds++ |
| 1055 | m.phase = phaseRunning |
| 1056 | return m, runToolCall(m.turnCtx, call) |
| 1057 | } |
| 1058 | |
| 1059 | // nudgeOrigin prefixes every deterministic backstop note. A weak (30B) model |
| 1060 | // reads a bare mid-turn system message as an empty/absent user turn ("the user |
| 1061 | // hasn't given me a new task, I'll just stop"), the exact misread that turned the |
| 1062 | // finish nudge net-negative on the galaxy run (it re-prompted an honest |
| 1063 | // `unverified` finish into a confident, caveat-free "it works"). Naming the note |
| 1064 | // as codehamr's own automated check, not the user's, keeps the model oriented. |
no test coverage detected