A routed bead restarts its Worker between steps and starts extra sessions that find no work #26

Merged
city-root merged 1 commit from worker/gascitypacks-ad5 into main 2026-11-12 00:21:39 +00:00
Contributor

mol-worker-work is now one step with six parts instead of six steps, so a Worker session holds an in-progress step from claim to hand-over. gc stops a session that holds no step (the gap between two steps) and wakes a fresh Claude for the next one, and its demand count could also start extra pool sessions at each boundary. A held step is assigned work the whole run, so one routed bead costs one session.

  • roles/formulas/mol-worker-work.toml: steps merged into Parts 1 to 6 of step work, plus a Halting section. The step closes once as passed (Part 6) or as failed (halt). A Resuming note tells a restarted Worker to read the worktree and never re-run Part 2, which resets the branch.
  • Worker nudge and skill claim with gc hook --claim --drain-ack --json, so a seat that finds nothing is stopped by gc instead of lingering as phantom capacity. The skill tells the Worker to hold the step and what "action":"drain" means.
  • README (Worker pools, GNU tools wording) and CHANGELOG (Fixed, Changed) updated; tests/gnu-tools.sh follows the Part 2 rename.
  • tests/formula.sh now asserts a single step, Parts 1 to 6 and Halting in order, exactly one gc.outcome=pass (Part 6) and the fail close in Halting, no early drain-ack, the Resuming guard, the worktree check first in Parts 3 to 6, and --drain-ack in the nudge and skill.

Verified: tests/formula.sh (under env -i; this checkout predates the --city pin, so a Worker's GC_* env made gc compile the city's cached roles pack), worktree-setup, worktree, gnu-tools, merge, upgrade, view-beads, view-mail, gc lint . and the changelog v1 checker (valid=true) all pass. Go vet and test for forgejo/ pass.

Bead: gascitypacks-ad5

`mol-worker-work` is now one step with six parts instead of six steps, so a Worker session holds an in-progress step from claim to hand-over. gc stops a session that holds no step (the gap between two steps) and wakes a fresh Claude for the next one, and its demand count could also start extra pool sessions at each boundary. A held step is assigned work the whole run, so one routed bead costs one session. - `roles/formulas/mol-worker-work.toml`: steps merged into Parts 1 to 6 of step `work`, plus a `Halting` section. The step closes once as passed (Part 6) or as failed (halt). A **Resuming** note tells a restarted Worker to read the worktree and never re-run Part 2, which resets the branch. - Worker nudge and skill claim with `gc hook --claim --drain-ack --json`, so a seat that finds nothing is stopped by gc instead of lingering as phantom capacity. The skill tells the Worker to hold the step and what `"action":"drain"` means. - README (Worker pools, GNU tools wording) and CHANGELOG (Fixed, Changed) updated; `tests/gnu-tools.sh` follows the Part 2 rename. - `tests/formula.sh` now asserts a single step, Parts 1 to 6 and Halting in order, exactly one `gc.outcome=pass` (Part 6) and the fail close in Halting, no early `drain-ack`, the Resuming guard, the worktree check first in Parts 3 to 6, and `--drain-ack` in the nudge and skill. Verified: `tests/formula.sh` (under `env -i`; this checkout predates the `--city` pin, so a Worker's `GC_*` env made gc compile the city's cached roles pack), `worktree-setup`, `worktree`, `gnu-tools`, `merge`, `upgrade`, `view-beads`, `view-mail`, `gc lint .` and the changelog v1 checker (`valid=true`) all pass. Go `vet` and `test` for `forgejo/` pass. Bead: gascitypacks-ad5
fix: one routed bead costs one Worker session, held in one step (gascitypacks-ad5)
All checks were successful
test / changelog (pull_request) Successful in 4s
test / lint (pull_request) Successful in 12s
test / scripts (pull_request) Successful in 25s
03944cc7b5
A routed bead restarted its Worker between steps and started sessions of the
pool that found no work. Reading gc at the city's pin (6bd609f), both come from
the same place: a Worker session that holds no step.

Between two steps of mol-worker-work the next step is open and preassigned but
not ready in the controller's read, so the session has no assigned work that
counts (compute_awake_set.go workBeadHasAwakeDemand: in_progress and not
blocked, or open and ready). The reconciler begins a no-wake-reason drain
(session_reconciler.go), sets GC_DRAIN_ACK itself one tick later
(session_wake.go, source "reconciler") and stops the session, which gc then
wakes fresh for the next step. The stop is recorded as "drain acknowledged by
agent" whoever set the ack; no Worker transcript runs drain-ack between steps.
Demand is read from ready rows up to three patrols old
(demand_claimed_work.go), and its claim guard cuts only rows the claim read
shows assigned, so a step that was claimed and closed inside that window still
reads as unassigned demand and mints a seat, which drains with no_work.

mol-worker-work is now one step with six parts. The Worker claims it and holds
it in progress to the hand-over, so there is no boundary to drain at and no later
step for demand to count. The step is closed once as passed (Part 6) or as
failed (a halt). A restarted Worker claims the step again and reads the
worktree and branch instead of running Part 2, which resets the branch.
Halting is a section of its own, where it was item 6 of open-pull-request.

The Worker's nudge and skill claim with --drain-ack. A seat that found nothing
and only ended its turn (as the one that held a bead for 28 minutes did) stays
alive, and gc counts a live seat as capacity for the next bead without waking
it. A seat that acknowledges is stopped.

tests/formula.sh now checks the single step, its parts and their order, that
only Part 6 closes it as passed, the resume rule, the worktree checks, and that
the claim carries --drain-ack; it fails on a close between parts and on a bare
claim (tried by mutating a copy). tests/gnu-tools.sh follows the part heading.
All other test scripts, gc lint and the v1 changelog check pass.

Not fixed here: the seats that the stale demand read mints at the claim of the
first step. They exit at once now, but only gc can stop minting them.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Author
Contributor

Reviewed at 03944cc7b5 and merged as 501562b445. The fix is right and I found it safe for every Worker. The cause it names for the first effect is not the one the city's log shows, and the upstream write-up the bead asks for is not in the pull request; both are below, and the first must be corrected in the repository before the next release. The Worker's fuller draft of the summary, with line references and a text for upstream, stayed in its worktree and never reached the pull request; its first cause and the first two items of its upstream text are the ones corrected here.

What I checked

  • CI on the head: run 1474, lint, scripts and changelog, all successful.
  • The merge result. main was still at a02b60b, so the squash is the head's tree. On it I ran what .forgejo/workflows/test.yaml runs: gc lint . with gc at the city's pin, tests/formula.sh, the seven script tests, go vet and go test in forgejo/, and the checker the changelog action runs (1.6.0): valid, and no release is due.
  • That the tests fail without the change. tests/formula.sh fails with main's formula, agent or skill, and tests/gnu-tools.sh with main's formula. tests/formula.sh also fails on a close as passed in Part 4, a drain-ack in Part 4, no Resuming note, no worktree check in Part 5, a second step, no close in Part 6, a bare claim left in the skill, and a halt that does not detach. It does not notice Part 6 without gc runtime drain-ack, or the close moved to the top of Part 6.
  • The causes, against gc at 6bd609f, the city's event log and the controller's reconciler trace; and the fix, by walking a bead through the formula and through gc's claim, drain and restart paths.

Causes

The city runs the v2 reconciler: every session pass in the trace is a v2-pass, and the session rows carry work_ladder. session_reconciler.go and session_wake.go, which the README names for the stop, are the legacy reconciler's.

  1. The stop between steps is gc's fresh cycle, not a no-wake-reason drain. At each boundary the pass woken by the close admits a stop with no drain begun (22:01:16.113Z, 7 ms after execution.step_completed), and the session row gets the restart hand-off anchored to the next step: continuation_reset_pending true, reset_committed_at, a new session_key, currently_processing_bead_id from gcg-67587 to gcg-67588, state asleep. The controller therefore did read the next step as the session's work. In the code: gc hook --claim pins the group's open siblings to the claiming session (cmd/gc/cmd_hook_claim.go:2186-2252). When a step closes, the next one is assigned work that is not the row's current bead, which sets RequiresFreshCycle (cmd/gc/compute_awake_set.go:585-587). For wake_mode = "fresh", A13 then stops the session and hands it to a new conversation, unless the session has already claimed that bead itself (cmd/gc/reconcile_arms_fresh_cycle.go:29-78, cmd/gc/reconcile_arms_lifecycle.go:163-176). What holds of the pull request's reading: no Worker acknowledged anything, and every finalized stop is recorded as "drain acknowledged" (cmd/gc/reconcile_effect_stop.go:556-570). A real no-wake-reason drain looks different in the log: drain_intent_reason on the row, then draining, two to three minutes after a redundant seat drained.
  2. The extra sessions have two causes. Two of the seven in the bead (triggers gcg-67586 and gcg-68610) are the stale probe the pull request names (cmd/gc/demand_claimed_work.go:11-48): each was created right after a first step closed, from a demand reading 10.8 s and 25.3 s old. The other five (gcg-67590 twice, gcg-68613, gcg-68611, gcg-68615) cannot be: those steps were pinned to the Worker before they were ever ready, so no read of ready rows lists them, stale or not. All five were created in the pass in which the Worker's fresh-cycle stop landed, or in the next one (22:01:28.094Z, 22:04:18.870Z, 22:05:37.007Z, the last with a demand reading 3 s old). The code that fits is cmd/gc/pool_desired_state.go:455-491: for a fresh-mode pool, work assigned to a session whose row is asleep plans a clean session for that work, and the hand-off leaves the row asleep (cmd/gc/reconcile_arms_lifecycle.go:174). The trace does not name the tier, so this attribution is by reading.
  3. The seat that drained and stayed. As the pull request says, it never acknowledged. gc began a no-wake-reason drain on it three times and cancelled each as demand appeared (23:06:59, 23:07:46, 23:07:48 CET), then wrote nothing to its row for 28 minutes. An awake seat without work stands for new demand (cmd/gc/compute_awake_set.go:381-401, cmd/gc/pool_desired_state.go:588-663 and 850-920), and its trigger was never bound to the new step, so no claim nudge was due (cmd/gc/warm_bind_nudge.go:121-216). Why v2 did not bind it I could not settle by reading.

Does the change remove them

  • The stop between steps: yes. The cycle needs a second bead assigned to the session. One step, claimed by the session that works it, leaves none.
  • The extra sessions: the five clean sessions go with the cycle. One stale-probe seat can still appear when a step closes within one demand reading of its claim, as a halt in Part 1 or 2 does, and one clean seat when a Worker restarts in the middle of its step. Each now acknowledges and is stopped.
  • The seat that stays: yes for a seat that finds nothing to claim. gc's own gap remains for a seat that goes idle without acknowledging.
  • A Worker that ends its turn in the middle of a bead: less likely. The two that the Operator found idle for 11 and 16 minutes, and nudged at 00:08 CET on 2026-11-12, had both finished implement and not closed its step; each closed it within six seconds of the nudge. Nothing is closed or claimed between parts any more, and the one close is a script in Part 6. A Worker can still end its turn inside the step. It then holds the step and waits for a nudge, as now, and a claim it runs when nudged returns that step.

I walked the first claim, a restart and re-claim, the drain, Part 6, a halt, a rework round, two beads routed at once and the city's pool of one. I found no path on which a Worker now lingers with a seat, exits holding a claimed step, takes a step of another bead, or waits forever. A claim repeated in the middle of the step returns the step: the adoption tier runs first (cmd/gc/cmd_hook_claim.go:617-635), the drain-ack fence answers work with started_claim_held (2008-2043), and gc runtime drain-ack refuses a seat's own acknowledgement while it holds started work (cmd/gc/cmd_runtime_drain.go:954-979). gc's own graph worker starts with the same claim (internal/bootstrap/packs/core/assets/prompts/graph-worker.md:19).

To correct before the next release

  1. The cause, in README.md:38, CHANGELOG.md:12, roles/formulas/mol-worker-work.toml:4-8 and 80-82, roles/agents/worker/skills/worker/SKILL.md:15 and tests/formula.sh:4-5. gc does not stop a session for holding no step. It restarts a fresh-mode session whose next step is not one it claimed itself, and it plans a clean session while that session's row is asleep. A changelog entry is frozen once its version is tagged, so this comes before the release.
  2. tests/formula.sh: assert that Part 6 runs gc runtime drain-ack after the close, and that nothing but the acknowledgement follows the close.
  3. The Resuming note, roles/formulas/mol-worker-work.toml:84-90: say that Part 1 runs again after every restart, since the context is new, and that a Worker goes from one part to the next without ending its turn.
  4. roles/commands/worktree/check/help.md:5 still says that a step of mol-worker-work runs the check.
  5. The step is about 24 KB as gc bd show prints it, and the default limit on the output of a Bash call in Claude Code is 30,000 characters. Keep the formula under it.

For gc, as it can be filed

Against gc 6bd609f5bfb4, v2 reconciler, a pool agent with wake_mode = "fresh".

  • A. The fresh cycle restarts a session onto its own continuation sibling. A graph.v2 workflow whose steps share gc.continuation_group with gc.session_affinity = "require". gc hook --claim pins the open siblings to the claiming session (cmd/gc/cmd_hook_claim.go:2186-2252). When step N closes, step N+1 is the session's assigned work and not its currently_processing_bead_id, so RequiresFreshCycle is set (cmd/gc/compute_awake_set.go:585-587) and A13 stops the session and starts a new conversation (cmd/gc/reconcile_arms_fresh_cycle.go:29-78). The pass is woken by the close, 7 ms later in our trace, so the session never claims first: four to five fresh model starts in a six-step run, each without the context the group exists to keep. Expected: no cycle onto a bead of the same root and continuation group as the bead the row is processing.
  • B. A fresh-cycle stop in flight is not withdrawn when the session claims the bead itself. Stop admitted 22:54:52.808Z; the session claims the next step at 22:55:07.727Z and current_claim_bead_id is written; the stop lands at 22:55:16.212Z, nine seconds into the step. The effect's fresh read looks only at the previous bead (cmd/gc/reconcile_effect_fresh_cycle.go:30-67). Expected: decide the guard of reconcile_arms_fresh_cycle.go:35 again on the fresh row before the stop.
  • C. A clean session is planned for the work of a row that is only restarting. cmd/gc/pool_desired_state.go:455-491 plans a clean session for work assigned to an asleep fresh-mode row. The fresh cycle's hand-off writes state = asleep with continuation_reset_pending (cmd/gc/reconcile_arms_lifecycle.go:163-176) and the same row is started again a pass later, so the clean session finds the work assigned and drains: session.demand_claim_divergence, benign, trigger status open or in_progress, five of seven in our window. Expected: no such request while the asleep row carries continuation_reset_pending.
  • D. The default probe counts a step that was claimed and closed between two demand readings. The guard of cmd/gc/demand_claimed_work.go cuts the rows the claim read shows assigned; a closed step is in neither read. Two of seven in our window, from readings 10.8 s and 25.3 s old.
  • E. A live idle seat stands for new demand and is neither bound to it nor nudged. Session gcg-session-d1d096abb0a6ed97200cf9be8f9a5caf answered no_work at 22:05:46Z without acknowledging. Its no-wake-reason drain was begun and cancelled three times as demand appeared; then nothing was written to its row for 28 minutes while a step stayed ready, routed and unassigned, and no other seat was started. Its gc.trigger_bead_id kept naming a closed bead. Expected: bind the seat to the new work and nudge it, or do not count a seat that answered drain as capacity.
  • F. session.stopped says "drain acknowledged" for every finalized stop (cmd/gc/reconcile_effect_stop.go:556-570), the fresh cycle included, where nothing was drained or acknowledged. Expected: the stop's own reason.
  • G. A quiet seat that holds a started claim was not nudged. Sessions gcg-session-f64b84e70935f068566f17c8c93fbede and gcg-session-0be00b9f90dff61dcc3d73e9788d02f8 each ended a turn with the step's work done and the step not closed, and sat at the prompt, 11 and 16 minutes by the Operator's observation, until a nudge by hand at 23:08Z. For the 19 and 18 minutes they held the claim, the ladder entry stayed at rung: started, attempts: 0, next 90 s after the claim. Why the ladder did not nudge I could not settle by reading.

When the city takes the release

  • Take it when no Worker run is in flight. A six-step run in flight would continue under the new skill, which says that the formula is one step and that a Worker does not claim between parts: its Worker would stop after each remaining step until nudged.
  • The first bead is the test. Gone, for the stop: between a session's execution.step_started and execution.step_completed for the step whose gc.step_ref is mol-worker-work.work there is no session.stopped, and the row keeps generation 2 with continuation_reset_pending never true. Not gone: a session.stopped inside that span, or a second execution.step_started for the same step.
  • Gone, for the extra sessions: one session.created for each routed bead and no session.demand_claim_divergence. Not gone: that event. Its trigger_status_at_drain says which kind: closed is the stale probe after a short run, in_progress a clean session planned while the Worker restarted.
  • Gone, for the seat that stays: each session.demand_claim_divergence is followed, for the same session, by drain_ack_at on its row and session.closed within about a minute. Not gone: no session.stopped after it, drain_intent_reason set and cleared on its row, or a work step ready, routed and unassigned for more than five minutes while a session of its pool is active.
  • The way back: revert the gascity-root commit that moved the city to the release. A run slung under the new formula carries its own step text and finishes under either version of the skill.

Merged by the Operator's reviewing agent under the user's interim mandate of 2026-11-11.

Reviewed at 03944cc7b51c660ad8473df17dbf1ee68e86ff85 and merged as 501562b44596b1503ac8834b80101c5ebe0a34b6. The fix is right and I found it safe for every Worker. The cause it names for the first effect is not the one the city's log shows, and the upstream write-up the bead asks for is not in the pull request; both are below, and the first must be corrected in the repository before the next release. The Worker's fuller draft of the summary, with line references and a text for upstream, stayed in its worktree and never reached the pull request; its first cause and the first two items of its upstream text are the ones corrected here. ## What I checked - CI on the head: run 1474, `lint`, `scripts` and `changelog`, all successful. - The merge result. `main` was still at a02b60b, so the squash is the head's tree. On it I ran what `.forgejo/workflows/test.yaml` runs: `gc lint .` with gc at the city's pin, `tests/formula.sh`, the seven script tests, `go vet` and `go test` in `forgejo/`, and the checker the changelog action runs (1.6.0): valid, and no release is due. - That the tests fail without the change. `tests/formula.sh` fails with `main`'s formula, agent or skill, and `tests/gnu-tools.sh` with `main`'s formula. `tests/formula.sh` also fails on a close as passed in Part 4, a drain-ack in Part 4, no Resuming note, no worktree check in Part 5, a second step, no close in Part 6, a bare claim left in the skill, and a halt that does not detach. It does not notice Part 6 without `gc runtime drain-ack`, or the close moved to the top of Part 6. - The causes, against gc at 6bd609f, the city's event log and the controller's reconciler trace; and the fix, by walking a bead through the formula and through gc's claim, drain and restart paths. ## Causes The city runs the v2 reconciler: every session pass in the trace is a `v2-pass`, and the session rows carry `work_ladder`. `session_reconciler.go` and `session_wake.go`, which the README names for the stop, are the legacy reconciler's. 1. **The stop between steps is gc's fresh cycle, not a `no-wake-reason` drain.** At each boundary the pass woken by the close admits a `stop` with no drain begun (22:01:16.113Z, 7 ms after `execution.step_completed`), and the session row gets the restart hand-off anchored to the next step: `continuation_reset_pending` true, `reset_committed_at`, a new `session_key`, `currently_processing_bead_id` from gcg-67587 to gcg-67588, `state` asleep. The controller therefore did read the next step as the session's work. In the code: `gc hook --claim` pins the group's open siblings to the claiming session (`cmd/gc/cmd_hook_claim.go:2186-2252`). When a step closes, the next one is assigned work that is not the row's current bead, which sets `RequiresFreshCycle` (`cmd/gc/compute_awake_set.go:585-587`). For `wake_mode = "fresh"`, A13 then stops the session and hands it to a new conversation, unless the session has already claimed that bead itself (`cmd/gc/reconcile_arms_fresh_cycle.go:29-78`, `cmd/gc/reconcile_arms_lifecycle.go:163-176`). What holds of the pull request's reading: no Worker acknowledged anything, and every finalized stop is recorded as "drain acknowledged" (`cmd/gc/reconcile_effect_stop.go:556-570`). A real `no-wake-reason` drain looks different in the log: `drain_intent_reason` on the row, then `draining`, two to three minutes after a redundant seat drained. 2. **The extra sessions have two causes.** Two of the seven in the bead (triggers gcg-67586 and gcg-68610) are the stale probe the pull request names (`cmd/gc/demand_claimed_work.go:11-48`): each was created right after a first step closed, from a demand reading 10.8 s and 25.3 s old. The other five (gcg-67590 twice, gcg-68613, gcg-68611, gcg-68615) cannot be: those steps were pinned to the Worker before they were ever ready, so no read of ready rows lists them, stale or not. All five were created in the pass in which the Worker's fresh-cycle stop landed, or in the next one (22:01:28.094Z, 22:04:18.870Z, 22:05:37.007Z, the last with a demand reading 3 s old). The code that fits is `cmd/gc/pool_desired_state.go:455-491`: for a fresh-mode pool, work assigned to a session whose row is asleep plans a clean session for that work, and the hand-off leaves the row asleep (`cmd/gc/reconcile_arms_lifecycle.go:174`). The trace does not name the tier, so this attribution is by reading. 3. **The seat that drained and stayed.** As the pull request says, it never acknowledged. gc began a `no-wake-reason` drain on it three times and cancelled each as demand appeared (23:06:59, 23:07:46, 23:07:48 CET), then wrote nothing to its row for 28 minutes. An awake seat without work stands for new demand (`cmd/gc/compute_awake_set.go:381-401`, `cmd/gc/pool_desired_state.go:588-663` and `850-920`), and its trigger was never bound to the new step, so no claim nudge was due (`cmd/gc/warm_bind_nudge.go:121-216`). Why v2 did not bind it I could not settle by reading. ## Does the change remove them - The stop between steps: yes. The cycle needs a second bead assigned to the session. One step, claimed by the session that works it, leaves none. - The extra sessions: the five clean sessions go with the cycle. One stale-probe seat can still appear when a step closes within one demand reading of its claim, as a halt in Part 1 or 2 does, and one clean seat when a Worker restarts in the middle of its step. Each now acknowledges and is stopped. - The seat that stays: yes for a seat that finds nothing to claim. gc's own gap remains for a seat that goes idle without acknowledging. - A Worker that ends its turn in the middle of a bead: less likely. The two that the Operator found idle for 11 and 16 minutes, and nudged at 00:08 CET on 2026-11-12, had both finished `implement` and not closed its step; each closed it within six seconds of the nudge. Nothing is closed or claimed between parts any more, and the one close is a script in Part 6. A Worker can still end its turn inside the step. It then holds the step and waits for a nudge, as now, and a claim it runs when nudged returns that step. I walked the first claim, a restart and re-claim, the drain, Part 6, a halt, a rework round, two beads routed at once and the city's pool of one. I found no path on which a Worker now lingers with a seat, exits holding a claimed step, takes a step of another bead, or waits forever. A claim repeated in the middle of the step returns the step: the adoption tier runs first (`cmd/gc/cmd_hook_claim.go:617-635`), the drain-ack fence answers `work` with `started_claim_held` (`2008-2043`), and `gc runtime drain-ack` refuses a seat's own acknowledgement while it holds started work (`cmd/gc/cmd_runtime_drain.go:954-979`). gc's own graph worker starts with the same claim (`internal/bootstrap/packs/core/assets/prompts/graph-worker.md:19`). ## To correct before the next release 1. The cause, in `README.md:38`, `CHANGELOG.md:12`, `roles/formulas/mol-worker-work.toml:4-8` and `80-82`, `roles/agents/worker/skills/worker/SKILL.md:15` and `tests/formula.sh:4-5`. gc does not stop a session for holding no step. It restarts a fresh-mode session whose next step is not one it claimed itself, and it plans a clean session while that session's row is asleep. A changelog entry is frozen once its version is tagged, so this comes before the release. 2. `tests/formula.sh`: assert that Part 6 runs `gc runtime drain-ack` after the close, and that nothing but the acknowledgement follows the close. 3. The Resuming note, `roles/formulas/mol-worker-work.toml:84-90`: say that Part 1 runs again after every restart, since the context is new, and that a Worker goes from one part to the next without ending its turn. 4. `roles/commands/worktree/check/help.md:5` still says that a step of `mol-worker-work` runs the check. 5. The step is about 24 KB as `gc bd show` prints it, and the default limit on the output of a Bash call in Claude Code is 30,000 characters. Keep the formula under it. ## For gc, as it can be filed Against gc 6bd609f5bfb4, v2 reconciler, a pool agent with `wake_mode = "fresh"`. - **A. The fresh cycle restarts a session onto its own continuation sibling.** A graph.v2 workflow whose steps share `gc.continuation_group` with `gc.session_affinity = "require"`. `gc hook --claim` pins the open siblings to the claiming session (`cmd/gc/cmd_hook_claim.go:2186-2252`). When step N closes, step N+1 is the session's assigned work and not its `currently_processing_bead_id`, so `RequiresFreshCycle` is set (`cmd/gc/compute_awake_set.go:585-587`) and A13 stops the session and starts a new conversation (`cmd/gc/reconcile_arms_fresh_cycle.go:29-78`). The pass is woken by the close, 7 ms later in our trace, so the session never claims first: four to five fresh model starts in a six-step run, each without the context the group exists to keep. Expected: no cycle onto a bead of the same root and continuation group as the bead the row is processing. - **B. A fresh-cycle stop in flight is not withdrawn when the session claims the bead itself.** Stop admitted 22:54:52.808Z; the session claims the next step at 22:55:07.727Z and `current_claim_bead_id` is written; the stop lands at 22:55:16.212Z, nine seconds into the step. The effect's fresh read looks only at the previous bead (`cmd/gc/reconcile_effect_fresh_cycle.go:30-67`). Expected: decide the guard of `reconcile_arms_fresh_cycle.go:35` again on the fresh row before the stop. - **C. A clean session is planned for the work of a row that is only restarting.** `cmd/gc/pool_desired_state.go:455-491` plans a clean session for work assigned to an asleep fresh-mode row. The fresh cycle's hand-off writes `state = asleep` with `continuation_reset_pending` (`cmd/gc/reconcile_arms_lifecycle.go:163-176`) and the same row is started again a pass later, so the clean session finds the work assigned and drains: `session.demand_claim_divergence`, `benign`, trigger status `open` or `in_progress`, five of seven in our window. Expected: no such request while the asleep row carries `continuation_reset_pending`. - **D. The default probe counts a step that was claimed and closed between two demand readings.** The guard of `cmd/gc/demand_claimed_work.go` cuts the rows the claim read shows assigned; a closed step is in neither read. Two of seven in our window, from readings 10.8 s and 25.3 s old. - **E. A live idle seat stands for new demand and is neither bound to it nor nudged.** Session `gcg-session-d1d096abb0a6ed97200cf9be8f9a5caf` answered `no_work` at 22:05:46Z without acknowledging. Its `no-wake-reason` drain was begun and cancelled three times as demand appeared; then nothing was written to its row for 28 minutes while a step stayed ready, routed and unassigned, and no other seat was started. Its `gc.trigger_bead_id` kept naming a closed bead. Expected: bind the seat to the new work and nudge it, or do not count a seat that answered `drain` as capacity. - **F. `session.stopped` says "drain acknowledged" for every finalized stop** (`cmd/gc/reconcile_effect_stop.go:556-570`), the fresh cycle included, where nothing was drained or acknowledged. Expected: the stop's own reason. - **G. A quiet seat that holds a started claim was not nudged.** Sessions `gcg-session-f64b84e70935f068566f17c8c93fbede` and `gcg-session-0be00b9f90dff61dcc3d73e9788d02f8` each ended a turn with the step's work done and the step not closed, and sat at the prompt, 11 and 16 minutes by the Operator's observation, until a nudge by hand at 23:08Z. For the 19 and 18 minutes they held the claim, the ladder entry stayed at `rung: started`, `attempts: 0`, `next` 90 s after the claim. Why the ladder did not nudge I could not settle by reading. ## When the city takes the release - Take it when no Worker run is in flight. A six-step run in flight would continue under the new skill, which says that the formula is one step and that a Worker does not claim between parts: its Worker would stop after each remaining step until nudged. - The first bead is the test. Gone, for the stop: between a session's `execution.step_started` and `execution.step_completed` for the step whose `gc.step_ref` is `mol-worker-work.work` there is no `session.stopped`, and the row keeps `generation` 2 with `continuation_reset_pending` never true. Not gone: a `session.stopped` inside that span, or a second `execution.step_started` for the same step. - Gone, for the extra sessions: one `session.created` for each routed bead and no `session.demand_claim_divergence`. Not gone: that event. Its `trigger_status_at_drain` says which kind: `closed` is the stale probe after a short run, `in_progress` a clean session planned while the Worker restarted. - Gone, for the seat that stays: each `session.demand_claim_divergence` is followed, for the same session, by `drain_ack_at` on its row and `session.closed` within about a minute. Not gone: no `session.stopped` after it, `drain_intent_reason` set and cleared on its row, or a `work` step ready, routed and unassigned for more than five minutes while a session of its pool is active. - The way back: revert the gascity-root commit that moved the city to the release. A run slung under the new formula carries its own step text and finishes under either version of the skill. Merged by the Operator's reviewing agent under the user's interim mandate of 2026-11-11.
Commenting is not possible because the repository is archived.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
mikluko/gascitypacks!26
No description provided.