A forked session's alarm says 'compacting…' then goes on in a fresh session: the alarm is emitted before the fork check #378
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What happens
On run 172's
agent.visual-check.r2(2026-11-04 13:16) the coding pane read, in this order:and the new session's first thought was "I'm in a new session that has taken over a judge step that was interrupted". It looks as if Braid started a compaction, then changed its mind and handed off. The same sequence appeared on
openspec.apply[all]at 08:12. Both steps' sessions were forks (osf.session.forkedfromagent.visual-check #1and fromagent.revise #1).Why
In
executors.py's alarm handler the verdict is computed as"stop" if refusal else "compact"and theosf.budget.alarmevent goes out withaction: compactbefore the fork check. Only after that doesif session_id in state.forks:decide, for a forked session (every build step since braid#275), to skip the compaction and go on in a fresh session (reason: forked_compaction, braid#276). The events say so:The UI renders the alarm's action faithfully (
ALARM_DOING.compact = 'compacting…'inui/src/lib/format.ts), so the pane says compacting for a second, then the respawn row says the session was full. No compaction was ever attempted; the alarm's word was wrong.Fix
action: fresh_session, orrespawn) and the pane readsContext at 202k of 226k: going on in a fresh session…. The braid#185 rule that a newer alarm restates the verdict when the bound changes already covers re-emitting.Fresh session from Braid's note (the continued session was full).Done when
A forked session reaching the alarm shows one consistent story in the pane: the alarm names the fresh session, the resolution confirms it, and nothing says compacting. A non-forked session still says compacting and then compacted.
Observed on run 172 (
run_01M6K8CA22F0FE8TNG6K6J6PG3), stepsopenspec.apply[all]08:12 andagent.visual-check.r213:16; source read at origin/maind53f9e9d. Related: braid#185, braid#186, braid#275, braid#276.Shipped in PR #390, production
ddd4b6b. An alarm in a continued session now says the step goes on in a fresh session, and the console shows that with no pause row.Evidence:
tests/engine/test_fresh_session_alarm.py, and simsapply-single,apply-auto-plentifulandapply-group-compactsnow expect the new action. On a kept sim in a real browser: "Context at 35k of 40k: going on in a fresh session…", then "Fresh session from Braid's note (the continued session was full)".