Skip to content

to-human 0.5.1: the start-up read no longer holds a draw past its budget - #317

Merged
SSFSKIM merged 2 commits into
mainfrom
to-human-startup-read
Oct 21, 2026
Merged

SSFSKIM merged 2 commits into
mainfrom
to-human-startup-read

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 21, 2026

Copy link
Copy Markdown
Owner

On 2026-10-20 the autoreload's /reload-plugins restarted to-human in every open session. In the three longest sessions (transcripts of 207 to 437 MB) the engine then unloaded it with "to-human was unloaded: it crashed the hooks worker". A manual /reload-plugins in the 437 MB session did it again an hour later.

Cause. Every draw waited on the module's start-up read, a grep of the whole transcript that took 6 to 10 s, and the waiting draws ignored their own abort signal. The engine's budget for a draw is a fixed 10 s, and it cannot be configured. Two draws in a row that run 5 s past that budget count as a runaway. The engine then ends the hooks worker, which every plugin shares, so the other plugins' in-flight tool.call hooks fell back to their .catch and two subagent outputs were withheld. It also unloads the plugin.

Fix (to-human 0.5.1).

  • The read now runs under the session.start that each load of the module raises, so a redraw of a row no longer cuts it short. A row asked about before that still begins a read under its own dispatch, as before.
  • A draw waits on the read only while its own dispatch stands, and for at most 3 s counted from the first draw that waited. After that, rows draw with what is known and are asked for again once the read lands. The mark is applied as soon as the conversation answers, ahead of the search.
  • The draws that waited resume one per $.clock.now() answer instead of in a single microtask burst.
  • The transcript is searched with rg where the machine has it, else grep. On 437 MB: 0.74 s against 10.3 s, with the same 36,967 ids.

Verification.

  • to-human/tests/mods/run.sh: 98 kit tests, plus 8 search executions under rg and grep. Three tests are new and pin the bounded wait, the session-owned read, and a cut-short row answering at once.
  • tests/mods/typecheck.sh.
  • ci-gate GREEN (to-human-mods, mods-types).
  • Live check (to-human/tests/mods/live-reload-check.py, no model calls) on a copy of the 437 MB session, at a load average near 500: 0.5.0 had 94 to-human hook failures at the resume alone. 0.5.1 had none, either at the resume or at a reload that restarted the module, even though its search took 13.6 s against the 3 s wait.

Review. reviewer-medium found one issue: the live check's reload did not restart an unchanged module. That is fixed in the second commit. It found no defect in the wait/read state machine or in the search's shell.

Residue is logged in TECH-DEBT.

Sminos-Session: doperpowers-c6#a588844a (doperpowers on macbook)

….5.1)

On 2026-10-20 the autoreload's /reload-plugins started to-human over in
every open session, and in the three longest (207 to 437 MB transcripts)
the engine unloaded it: "to-human was unloaded: it crashed the hooks
worker". Every draw waited on the module's start-up read, a grep of the
whole transcript that took 6 to 10 s, ignoring its own signal; draws ran
past the engine's fixed 10 s budget, and two in a row that ran on 5 s past
it count as a runaway, which ends the hooks worker (every plugin's
in-flight hooks with it) and unloads the plugin. A /reload-plugins in the
437 MB session did it again an hour later.

- The read runs under the session.start each load of the module raises,
  where no redraw of a row cuts it short; a row asked about before that
  still begins one under its own dispatch, as before.
- A draw waits on the read only while its own dispatch stands, and at most
  START_WAIT_MS (3 s) from the first draw that waited; past that the rows
  draw with what is known and are asked for again once the read lands. The
  mark is taken as soon as the conversation answers, ahead of the search.
- The draws that waited go on each from a clock answer of its own, not in
  one turn of the hooks worker that would keep it from its heartbeat.
- The transcript is searched by rg where the machine has it, else grep:
  437 MB in 0.74 s against 10.3 s, the same 36,967 ids.

live-reload-check.py resumes a copy of a long transcript the caller names
and types /reload-plugins, passing when neither leaves a to-human hook
skipped; it spends no model calls.

Sminos-Session: doperpowers-c6#a588844a (doperpowers on macbook)
… alone

The review's finding: a reload keeps a module whose files did not change,
so the check's /reload-plugins started nothing over. It now changes the
module first, as an update does, and passes only when the engine raises
session.start for to-human "loaded later". The screen is no longer read:
a resumed history draws the notices its own session was shown.

On a copy of the 437 MB session (load average near 500): 0.5.0 failed 94
to-human hooks at the resume alone; 0.5.1 failed none at the resume or
at the reload, whose search took 13.6 s against a 3 s wait.

TECH-DEBT: the search past the wait and the rows' linear run lookup.

Sminos-Session: doperpowers-c6#a588844a (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-21T07:07:44.812675Z d22fa2a 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 81f708c into main Oct 21, 2026
5 checks passed
@SSFSKIM
SSFSKIM deleted the to-human-startup-read branch October 21, 2026 07:07
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