Skip to content

to-human 0.5.3: an API error stays in the report mid-turn and after a resume - #331

Merged
SSFSKIM merged 1 commit into
mainfrom
to-human-api-errors
Oct 21, 2026
Merged

SSFSKIM merged 1 commit into
mainfrom
to-human-api-errors

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 21, 2026

Copy link
Copy Markdown
Owner

The report view kept an API error visible only when turn.complete said the turn ended on one. It matched the row by its text, kept in memory. Two kinds of error folded into [ working record ] instead:

  • An error the turn went on after, such as API Error: Connection lost mid-response, when the engine still ran the tool call it had received.
  • Every error after a resume or a module restart. turn.complete doesn't fire again for past turns, so the view forgot them.

Change: the view now recognizes an error row by what the row is:

  • Live: the row's session.append names <synthetic> as its model, as observed on 2.1.306. The engine's other stand-in, No response requested., is excluded.
  • From the transcript: the "isApiErrorMessage":true flag on the row's line. The existing start-up and resume search now lists it beside the row ids. The flag follows its own row's uuid on all 786 error rows on this machine.

An error row now counts as a row the person reads, so the working record after a mid-turn error gets its own [ working record ] button. The turn.complete hook is gone.

Live check: a session in tmux against a fake Messages API (400 errors and a stream dropped mid-response).

  • Before: the mid-turn error folded, and after --resume the turn-ending error folded too.
  • After: both errors draw in the report as they happen, and the turn-ending one still does after --resume.
  • After a resume, the mid-turn error doesn't show at all, and that comes from the engine. Its row's parent is the tool call, a sibling of the tool result, so a resume never draws that row.

Tests: to-human/tests/mods/run.sh 102 pass; five of the new tests fail on the old view. session-places.ts runs the search with both rg and grep. tests/mods/typecheck.sh --lay is clean.

Sminos-Session: full-transcript-message-rendering#ecf2a808 (doperpowers on macbook)

… resume

The view kept an API error in the report only when `turn.complete` said the
turn ended on one, matched by its text in memory. So an error the turn went
on after (a connection lost mid-response) folded into the working record, and
so did every error after a resume or a module restart, which raise no
`turn.complete` for the past.

A row is now known for an API error by what it is: live, by its append,
whose origin names `<synthetic>` as its model (`No response requested.`, the
engine's other stand-in, excepted); from the transcript, by the
`isApiErrorMessage` flag on its line, which the start-up and resume searches
now list beside the rows' ids. An error row is a row the person reads, so the
working record after a mid-turn error opens a run of its own.

Checked live against a fake Messages API (400s, a stream dropped mid-response):
both errors draw in the report as they happen, and the turn-ending one again
after `--resume`. A mid-turn error's row branches off the conversation's
chain, so the engine draws none on a resume.

Sminos-Session: full-transcript-message-rendering#ecf2a808 (doperpowers on macbook)
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-21T16:13:42.796896Z 1216df7 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@SSFSKIM
SSFSKIM merged commit 37da538 into main Oct 21, 2026
6 checks passed
@SSFSKIM
SSFSKIM deleted the to-human-api-errors branch October 21, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant