Public: anyone can read this; the crew can change it.
Every model call in Talk writes one log line: account, model, seconds, how it ended #17838
Merged 4h 40m ago, live in production
Every Talk model call now writes one log line with the account, model, seconds and how it ended. For example: talk model call account=platform model=haiku seconds=3.2 outcome=timedout. What changed New src/crew/callline.ts.
-
Reviews
Changes requested — before the latest pushThe shape is right: a small call_line.ts module, no prompt, answer or token in the line, and a test that drives real say() turns. Two places make the line say something untrue, and both are in the one spot where it is written.
- Fix first: when no runner call was made, the line says
error:threw. Thefor (...; !gone; ...)loop can be skipped (gone), andoutcomeis then undefined, whichcallOutcomereports asoutcome=error:threw. That is a false cause, which defeats the point of the issue ('did not answer' has a cause). Log nothing when no call started, or give it its own honest outcome, and add a test for it. - One line per call, not per turn. The loop can call the runner twice (a session that cannot resume falls back to a fresh start). The second call overwrites
outcome, so the first call's end is never logged and its seconds are folded into the second's. Move the log into the loop, right after eachrun(...)returns or throws, with its own start time. Thecatchthen also logs the throw with the right seconds. Add a test where the first call fails with a lost session and the second answers: two lines. stoppedis read after the fact (stopper.signal.aborted || options.signal.aborted). A call that answered just before a stop is logged asstopped. Only claimstoppedwhen the call did not answer.
The issue asked for the outcomes answered, timed out, refused, limit and error with its class.
stoppedis a reasonable addition once it is true.Both doors and docs: no page, API or MCP change, so no terminal or docs/features change is needed.
ApprovedAll three earlier asks are met on this head. The line is written per runner call, as the call ends or throws, so a lost session followed by a fresh start writes two lines with their own seconds. A turn that never reaches the runner (removed connection) writes none.
answeredis checked beforestopped, so a late stop no longer relabels an answer. The tests cover each of these. The line carries only account, model, seconds and outcome, and the error class is cut to [a-z0-9_]. There is no page, API or MCP change, so no terminal screen or docs/features page is owed.Two things I would do next:
- Non-blocking: the line does not say which attempt (first call or resume retry) it came from. Add an
attemptfield if a log reader needs it. - Non-blocking: the
callandsayIntest helpers are near-duplicates (the gate flags them as 0.59 similar). Merge them when the file is next touched.
- Fix first: when no runner call was made, the line says
-
Checks
waiting merged; waiting for the forge to restart on it deploy 5fa2c54
-
History
- Direction: log each runner call as it ends, not once per turn; no line without a call; a call that answered is never stopped (#17825) f45819d
- Direction: every Talk model call logs one line, account, model, seconds, outcome, so 'did not answer' has a cause (#17825) 0e78536
- Merge pull request #17792 from sold/shell-refusals-2 856fb52
- Merge pull request #17798 from sold/jar-there-later 776f58f
- Talk's Stop stays for the whole answer, with words in the box too (#17819) b51ab2e
- The changelog credits a model only when a run backs it (#17807) e780a4e
- The decider can be compared with SubQ Snap in the background, off by default, and decides nothing (#17795) c0cee92
- small: the '+ New forge' page has one primary next action, with phone and desktop looks on the pull (#17818) 6cc8e61
- GET pulls/:number runs an uncapped diff and renders it on the serving thread (#17812) 153cbb3
- Full suite red: 2 files in check run 01m8wzswcz0vr3fz25ryd619jz (#17814) 8f7dfc4
- A Talk build's version strip is in sight when its preview opens, on a phone and at 1000 px (#17810) bdc702e
- Talk says what a long turn is doing and how long since its last step, across every stream (#17808) dcfa7ed
- A Talk build starts no crew run and no review, and only a person publishes it (#17803) cd1d5b7
- Only a check writes a retry decision's outcome, and it says which one (#17796) c2d976e
- A crew run that hits the turn limit wraps up, and says so in its run and its pull (#17809) b35dca2
- app-home-batched boots one forge for the file, and each test has its own account and repositories (#17805) 4763617
- A follow-up in Talk always carries what the person asked; tool steps are what gets cut (#17804) 7af0ffd
- A crew run can spend a granted OpenAI-type account, on the OpenAI runner, per run (#17787) b43bdad
- Talk: the model is a button beside Send, with a list you can type in, and plain names (#17794) 191cbc2
- A release asks scripts/return-check.ts before it promotes (#17793) 7618050
Every Talk model call now writes one log line with the account, model, seconds and how it ended. For example: talk model call account=platform model=haiku seconds=3.2 outcome=timed_out.
What changed
- New
src/crew/call_line.ts.callOutcomeandcallFieldsturn a runner's outcome into the line's fields. src/crew/conversation.tstimes the runner call and logs the line right after it ends, whether it returned or threw.accountis the subscription's name, the connection's name, orplatform.modelis the chosen model or the forge's default.outcomeis one ofanswered,timed_out,refused,limit,stopped, orerror:<class>.refusedcovers a 402 (credit spent) and a key the provider refused.limitcovers a rate limit.stoppedis a person stopping the turn or a restart cutting it. I added it because it isn't an error.- The error class is the runner's reason code, cut to
[a-z0-9_](exit 1becomeserror:exit_1, a thrown error iserror:threw). Runner messages are never logged.
- The line carries no prompt, answer, tokens or keys. Nothing else in the turn's flow changed, so the strip of numbered versions is untouched.
Test
test/talk-call-line.test.ts drives real say() turns through a fake runner that ends seven ways. It checks the one line each time and that the prompt, answer, stderr and error text don't appear in it. A second test covers how the error class is cleaned up.
I ran that file and test/talk-model-choice.test.ts (18 pass), tsc --noEmit and the gate. bun scripts/fast.ts named 261 files, about 15 minutes of tests, over its 5-minute budget, so I ran only those two files. The forge runs the full check on the push.
Left out
- No web page, API or MCP change, so there's no terminal or
docs/featurescounterpart. - No sampling or rotation. It's one
infoline per turn, which I judged low volume. - The log doesn't say which retry or resume attempt a line came from.
- The gate noted one comment over 100 columns in
src/crew/conversation.ts, and I left it for the nightly rewrap.
Try it
Send any Talk message and look for talk model call in the forge's log. Or run bun test test/talk-call-line.test.ts.
Each runner call to the model now logs its own line as it ends or throws, with its own start time. I've pushed this to the same branch; bun test on the two Talk test files and tsc --noEmit pass.
What changed
- One line per call. The log moved from after the loop into it, right after each
run(...)resolves or throws. A lost session followed by a fresh start now writes two lines, each with its own seconds. A throw logs with the right seconds before it propagates. - No call, no line. A turn that skips the loop (a removed chosen connection,
gone) writes nothing, so it no longer reportserror:threw. stoppedonly when true.callOutcomereturnsansweredfirst and readsstoppedonly for a call that did not answer. An answer that landed just before a stop staysanswered.
Tests in test/talk-call-line.test.ts
- The lost-session case: the first call fails with "No conversation found", the second answers, and there are two lines.
- The removed-connection case: no runner call, so zero lines.
- A unit check that an answered call with a stop flag is still
answeredand a cancelled one isstopped.
Gate
gate.ts flags call and sayIn in the test file as 0.59 similar. Both are small test helpers, and I left them as they are. It also still notes the over-100-column comment in src/crew/conversation.ts, which was already there, for the nightly rewrap.
I didn't run the full suite. The /llms.txt budget and dead-code checks are left to the forge's check. Neither this change nor the earlier version adds an export that lacks a caller, and nothing touches llms.txt.
Every Talk model call now writes one log line with the account, model, seconds and how it ended. For example:
talk model call account=platform model=haiku seconds=3.2 outcome=timed_out.What changed
src/crew/call_line.ts.callOutcomeandcallFieldsturn a runner's outcome into the line's fields.src/crew/conversation.tstimes the runner call and logs the line right after it ends, whether it returned or threw.accountis the subscription's name, the connection's name, orplatform.modelis the chosen model or the forge's default.outcomeis one ofanswered,timed_out,refused,limit,stopped, orerror:<class>.refusedcovers a 402 (credit spent) and a key the provider refused.limitcovers a rate limit.stoppedis a person stopping the turn or a restart cutting it. I added it because it isn't an error.[a-z0-9_](exit 1becomeserror:exit_1, a thrown error iserror:threw). Runner messages are never logged.Test
test/talk-call-line.test.tsdrives realsay()turns through a fake runner that ends seven ways. It checks the one line each time and that the prompt, answer, stderr and error text don't appear in it. A second test covers how the error class is cleaned up.I ran that file and
test/talk-model-choice.test.ts(18 pass),tsc --noEmitand the gate.bun scripts/fast.tsnamed 261 files, about 15 minutes of tests, over its 5-minute budget, so I ran only those two files. The forge runs the full check on the push.Left out
docs/featurescounterpart.infoline per turn, which I judged low volume.src/crew/conversation.ts, and I left it for the nightly rewrap.Try it Send any Talk message and look for
talk model callin the forge's log. Or runbun test test/talk-call-line.test.ts.Closes #17825