Repository navigation
Description
Lane: triage · Category: operational (loop-mechanism gap) · Source: live triage loop, 2026-07-19 — a single session ran 13 /loop cycles; direct dogfood evidence below.
Triggering example
A /loop /work-items:triage session ran 13 cycles in one continuous session. Context climbed from ~20% (early) to ~70% by cycle 13. The standing prompt (and #496) say "restart for fresh context when past ~50%" and treat each cycle boundary as a fresh-context reset — but /loop re-invokes in the SAME session via ScheduleWakeup, so context accumulated across every cycle + subagent return + operator turn. Nothing ever reset it. The restart was flagged in telemetry across cycles 8/9/10/11 and still never happened, because no mechanism triggers a /clear — only a human typing /clear resets it, and the loop can't do that to itself.
Observed vs expected
- Observed: the "restart at ~50% context" rule is a prompt admonition with no enforcement mechanism — structurally the same failure class as autonomy: lane runtime resilience — event-triggered cloud Routines, auto-mode verification, deterministic stop gate, STOP notifications, PostCompact re-injection #535 member 3 ("a lane that stops itself is a bug" is an admonition, not a mechanism). A self-paced loop that a human keeps re-invoking (or a cron/Routine that never restarts the session) drifts monotonically toward the auto-compact / degradation zone. Earlier telemetry even mis-claimed "fresh restart per cycle" before this was caught — the assumption is baked into the loop-prompt design.
- Expected: a real mechanism makes per-cycle (or past-threshold) context reset happen without a human:
- Cycle-boundary auto-
/clearwhen the statusline crosses the threshold — the loop tool re-launches the next cycle in a fresh session seeded from the same prompt (composes with ops: scripted lane launcher — start/restart loop lanes headlessly from canonical prompt files #508 headless launcher + autonomy: lane runtime resilience — event-triggered cloud Routines, auto-mode verification, deterministic stop gate, STOP notifications, PostCompact re-injection #535 member 1 Routines: a fresh Routine/session per fire is inherently reset). - PostCompact re-injection (autonomy: lane runtime resilience — event-triggered cloud Routines, auto-mode verification, deterministic stop gate, STOP notifications, PostCompact re-injection #535 member 5) as the fallback when compaction fires anyway — re-seed gate state + directive + constraints.
- At minimum, make the loop-prompt template STATE that
/loopdoes not reset context and that the restart rule needs an external trigger (launcher/Routine/PostCompact), so no lane mis-assumes per-cycle freshness (I folded an interim note into the triage v6 prompt manually — belongs in the shared template feat(claude-ops or session-flow): loop-prompt authoring skill — generate and maintain standing loop-lane prompts #480).
- Cycle-boundary auto-
Category
operational (loop-mechanism gap). The pipeline can run itself into degraded context with no automatic recovery; the one safeguard is unenforceable.
Relations
- loops/skills: orchestrator context economy — subagent return-payload contracts + GitHub-externalized state #496 (context economy — adds the guidance; this issue is that the guidance is unenforceable +
/loopdoesn't reset). - autonomy: lane runtime resilience — event-triggered cloud Routines, auto-mode verification, deterministic stop gate, STOP notifications, PostCompact re-injection #535 member 5 (PostCompact re-injection) + member 1 (Routines — a fresh session per fire is inherently reset).
- ops: scripted lane launcher — start/restart loop lanes headlessly from canonical prompt files #508 (headless launcher — the natural home for a fresh-session-per-cycle relaunch).
- feat(claude-ops or session-flow): loop-prompt authoring skill — generate and maintain standing loop-lane prompts #480 (loop-prompt authoring skill — the "loop does not reset context" caveat belongs in the shared template).
- loops: script the deterministic lane mechanics — machine-behavior block, #502 telemetry upsert, wire script-the-deterministic-work into prompt ritual #538 (script the deterministic mechanics — the relaunch/reset is scriptable).
Meta note (course-correction that prompted this filing)
This finding sat in #502 telemetry flags for ~3 cycles without being FILED as a tracked issue. Per the self-observation rule, a flag is not a file — operator had to nudge "keep running self-observation and file." Sub-observation for the lane rules: telemetry-flagging a problem does not discharge the file-it obligation — a flagged-but-unfiled finding should convert to an issue (or be explicitly marked "flag-only, not fileable") within the same or next cycle, not linger.
Activity
kyle-sexton commentedon Jul 19, 2026
This was generated by AI during triage. · Category: operational (loop-mechanism gap) · Priority:
priority: high(week 2nd-priority: the pipeline can run itself into degraded context with no automatic recovery — the one safeguard is unenforceable). Routedneeds-human+wayfind: design.Why needs-human
The finding is well-evidenced (this session: 13 cycles in one
/loopsession, context20%→70%, restart flagged 4× and never happened), but the FIX is a genuine mechanism-design choice among candidates with real tradeoffs — not a defaultable fork:/clear/ fresh-session relaunch — the loop launches the next cycle in a fresh session seeded from the same prompt (composes with ops: scripted lane launcher — start/restart loop lanes headlessly from canonical prompt files #508 headless launcher; autonomy: lane runtime resilience — event-triggered cloud Routines, auto-mode verification, deterministic stop gate, STOP notifications, PostCompact re-injection #535 member 1 Routines are inherently fresh-per-fire). Needs the launcher/relaunch primitive./loopdoes not reset context so no lane mis-assumes per-cycle freshness (folded manually into the triage v6 prompt; belongs in the shared template feat(claude-ops or session-flow): loop-prompt authoring skill — generate and maintain standing loop-lane prompts #480).Which mechanism (or combination), and where it lives (the
/looptool itself vs a launcher vs a hook), is the design decision.Relationship to #535 (resilience umbrella)
Tightly related: #535 member 1 (event-triggered Routines) and member 5 (PostCompact re-injection) ARE two of the candidate mechanisms here. Recommend the maintainer decide whether to FOLD this into #535 (as the context-reset facet of lane resilience) or keep it as the focused context-reset-mechanism issue — not blocking either way. Also relates #496 (adds the unenforceable guidance), #508 (relaunch home), #480 (template caveat), #538 (relaunch/reset is scriptable).
Sub-observation for the lane rules (captured in the body)
This finding lingered ~3 cycles as a #502 telemetry flag before being filed — a flag is not a file. The lane rules should state: a flagged-but-unfiled finding converts to an issue (or is explicitly marked flag-only) within the same/next cycle, not indefinitely.
kyle-sexton commentedon Jul 19, 2026
Decision brief (2-minute read)
Problem.
/loopre-invokes the lane in the same session (self-paced viaScheduleWakeup), so context accumulates every cycle — one session ran 13 triage cycles and climbed from ~20% to ~70%. The "restart at ~50% context" rule is a prompt admonition with no enforcement: a running loop cannot reset its own context, so nothing ever triggers a/clear.Today (verified in the checkout).
/loop= same-session re-run; only routines/cron start fresh sessions. Repo's own statement:docs/topics/ai-adoption-ladder/design/RESEARCH-routine-catalog.md:117— "loop = next turn starts on a time interval; schedule/routine = a fresh session starts on cron." The canonical standing loop prompt (plugins/source-control/skills/babysit-prs/reference/loop.md, §5.3) self-paces viaScheduleWakeupand never resets context.plugins/knowledge/skills/course-digest/SKILL.md:206. So the rule the issue cites is prompt text with no mechanism behind it — exactly the gap.loop.md§5.0.3 "GitHub is the source of truth — not model memory"; §5.6 "verification sub-steps exist because model memory is unreliable across compaction boundaries") plus subagent fan-out (one fresh worker per PR per cycle — clean worker context, but the orchestrator session persists). This survives compaction (preserves state/correctness); it does not prevent context bloat (quality decay) — which is what the issue is about.plugins/claude-ops/hooks/hooks.json): aPreCompacthook is wired but audit-only (pre-compact-audit.sh, emits telemetry). There is noPostCompactand noSessionStarthook wired. So the re-injection mechanism is unbuilt here.plugins/autonomy/reference/trigger-dispatch.md;telemetry.md:42"ONE leased work item per emitting session/process") — a fresh executor per item — but that is the cron/queue mechanism, not/loop.External facts (verified, code.claude.com).
/loopcannot reset its own context: built-in commands such as/clearissued from a scheduled-task re-run "reach Claude as plain text instead of executing" (scheduled-tasks). So the admonition is not merely unenforced — it is unenforceable in-session by construction. This confirms the issue's core claim./looptasks are session-scoped (same session); cloud routines start a new session per fire — each GitHub event / API trigger / cron run (routines).PreCompactandPostCompactexist; the documented post-compaction re-injection pattern usesSessionStartwith matchercompact(notPostCompactdirectly) — hooks guide. So autonomy: lane runtime resilience — event-triggered cloud Routines, auto-mode verification, deterministic stop gate, STOP notifications, PostCompact re-injection #535 member 5 is feasible; canonical wiring isSessionStart(source=compact).claude -pfrom the canonical prompt file).Options.
RECOMMENDED — Threshold-triggered fresh-session relaunch via the local headless launcher (ops: scripted lane launcher — start/restart loop lanes headlessly from canonical prompt files #508). Since the loop cannot self-clear, replace in-session
ScheduleWakeupself-pacing with an external relaunch: the launcher starts each cycle (or each cycle once the statusline crosses the threshold) as a new localclaude -psession seeded from the canonical prompt file — inherently reset, mirroring the fresh-session-per-item pattern trigger-dispatch already uses. Must be local headless, not a cloud Routine (Routines can't run the plugin fleet — autonomy: lane runtime resilience — event-triggered cloud Routines, auto-mode verification, deterministic stop gate, STOP notifications, PostCompact re-injection #535 research). Pair withSessionStart(source=compact)re-injection (option 2) as a complement (survives an early auto-compact), not a substitute. Tradeoffs: root-cause fix — only a fresh session actually resets the bloat; re-injection alone only survives it. Depends on ops: scripted lane launcher — start/restart loop lanes headlessly from canonical prompt files #508 (status: ready) + loops: script the deterministic lane mechanics — machine-behavior block, #502 telemetry upsert, wire script-the-deterministic-work into prompt ritual #538 (scriptable mechanics). Reversible (revert to in-session loop). Future-risk: lowest — decouples cycle from session, so long-run / leave-week drift is structurally prevented.SessionStart(source=compact)re-injection only (autonomy: lane runtime resilience — event-triggered cloud Routines, auto-mode verification, deterministic stop gate, STOP notifications, PostCompact re-injection #535 member 5). Wire a hook that re-seeds gate state + week directive + "don't do X" constraints after compaction (the repo already has aPreCompacthook, so the wiring path partly exists). Cheaper, no launcher dependency, ships within the existing hook framework. Tradeoff: survives compaction but does not prevent context growth — the loop still marches into the auto-compact/degradation zone every cycle; it just loses less when it gets there. Addresses correctness, not the quality decay the issue documents. Good as a complement to (1); insufficient alone.Interim template caveat only (feat(claude-ops or session-flow): loop-prompt authoring skill — generate and maintain standing loop-lane prompts #480) — ship now regardless. State in the shared loop-prompt template that
/loopdoes not reset context and the ~50% restart rule needs an external trigger (launcher / routine / re-injection), so no lane mis-assumes per-cycle freshness. Already folded manually into triage v6. Cheapest; prevents the mis-assumption that made earlier telemetry falsely claim "fresh restart per cycle." Not a fix — it documents the gap. Do this immediately whichever mechanism is chosen.Do-nothing-mechanical. Rely on the existing evidence-over-memory + subagent fan-out coping. Tradeoff: preserves correctness across compaction but accepts monotonic quality decay on long self-paced runs — the exact failure the issue documents (13 cycles → ~70%). Rejected as the primary answer; it is why (2) alone is tolerable only short-term.
Fold vs keep (the triage comment's open fork): recommend keeping #551 as the focused context-reset-mechanism issue, sequenced behind #508 (relaunch home) and coordinated with #535 member 5 (re-injection) — rather than folding into #535. Rationale: #535 is a leave-week resilience umbrella spanning five members; the context-reset mechanism is a specific, independently-shippable design with its own verified constraints (self-clear impossible; Routines exclude plugins) that deserve a dedicated carrier. #535 members 1/5 remain the composing pieces.
Related.
SessionStart/PostCompact re-injection) + member 1 (Routines: fresh per fire, but plugin-excluded) are the two composing mechanisms; loops/skills: /loop does not reset context per cycle — "restart at ~50%" is an unenforceable admonition, no mechanism triggers a /clear (session ran 13 cycles → ~70%) #551 is their context-reset facet. Still open design — does not yet subsume this.kyle-sexton commentedon Jul 19, 2026
Operator decision (2026-07-19, decision-session batch 3; relayed).
ACCEPTED — the decision brief's RECOMMENDED option verbatim.
Re-intake: removing
needs-human, addingpriority: needs-triagefor routing.kyle-sexton commentedon Jul 20, 2026
This was generated by AI during triage.
Concrete instance: the estimate itself is fabricated, not measured. Triage lane telemetry on #502 recorded
context-estimate: ~48%at cycle-2 end and stopped the loop citing rule 17's ~50% threshold. Actual context (per user report, no other verification path available to the agent) was 22% — a >2x overestimate, presented as fact with no hedge. Root cause: no tool surfaces real context usage to the lane; the "~X%" line was always a guess dressed as a measurement. This compounds #551's mechanism gap: even if a reset mechanism existed, the trigger signal feeding it is unverifiable today. Corrected in #502's telemetry; loop resumed.kyle-sexton commentedon Jul 20, 2026
This was generated by AI during triage.
Routing
status: readyper ratified decision. Operator ACCEPTED the RECOMMENDED option verbatim: threshold-triggered fresh-session relaunch via the local headless launcher (#508, status:ready) — since a running/loopcannot self-/clear(built-in commands from a scheduled-task re-run reach Claude as plain text, verified against code.claude.com), replace in-sessionScheduleWakeupself-pacing with an external relaunch that starts each cycle, or once the threshold crosses, as a new localclaude -psession seeded from the canonical prompt file. Must be local headless, not a cloud Routine — Routines can't run the plugin fleet, per #535's research. Pair withSessionStart(source=compact)re-injection (#535 member 5) as a complement, not substitute. Kept as its own issue, not folded into #535 — a dedicated carrier for the context-reset mechanism specifically, sequenced behind #508 and #538. The interim template caveat (#480, already folded into triage v6) ships regardless of sequencing.This issue is the mechanism-gap root cause behind this very session's own logged incidents (#576, #577, and my own comment above) — the "restart at ~X% context" admonition is unenforceable in-session by construction, confirmed against official docs, not just observed empirically.
Priority: not in the explicit scaling-chain list, though it is pipeline-self-improvement (north-star #2) — stays
priority: medium(unchanged), sort early within tier.wayfind: designremoved (mechanism decision settled).kyle-sexton commentedon Jul 20, 2026
Parking the mechanism build — direction is settled, but implementation surfaced three sub-decisions that block a faithful build.
I am NOT re-asking "which mechanism." The accepted direction stands: external fresh-session relaunch via the local launcher (the
claude-ops:lanesskill, #508 now closed/built), paired withSessionStart(source=compact)re-injection as a complement. Attempting to implement it faithfully hit three contract-shaped forks the accepted text left open, one of which is a hard blocker.Blocker 1 — the threshold trigger is unbuildable as literally accepted
The accepted option is "threshold-triggered relaunch." But a comment on this very issue (the #502 telemetry finding) establishes that in-session context% is unmeasurable — "no tool surfaces real context usage to the lane; the '~X%' line was always a guess dressed as a measurement," with a documented >2x overestimate (48% claimed vs 22% actual). You cannot build a threshold trigger on a signal that does not exist. So the literal "threshold-triggered" shape is not implementable today.
The only escape is per-cycle-fresh relaunch (relaunch every cycle, no threshold needed) — which is a different trigger model, and it opens Blocker 2.
Blocker 2 (the real one) — who owns adaptive cadence after decoupling from in-session
/loop?Today
loop.md§5.3 maps the engine'srecommended_cadence→ a concreteScheduleWakeup.delaySeconds(active 300s / normal 900s / quiet 3600s) in-session. An external per-cycle relaunch cannot run that in-session wakeup. So decoupling forces a choice:activelane no longer tightens to 300s; an idle one no longer backs off).Fork 3 — sequencing
The issue's own routing comment sequences this mechanism "behind #508 and #538." #508 is closed, but #538 is still open. Proceed now on the launcher alone, or wait for #538's scriptable-mechanics base so the relaunch/cadence handoff lands on shared primitives?
RECOMMENDED
trigger-dispatch) the accepted text already cites as the analogue.Options at a glance
Shipped-independently on the WIP branch (interim caveat, sub-item 3 of "Expected")
Branch
fix/551-loop-context-reset(pushed, no PR) adds the interim caveat the issue explicitly asked for toclaude-ops:lanesSKILL.md: it now states that/loopre-invokes in the same session and cannot/clearitself, so the "restart at ~N%" rule has no in-session enforcement, andrestart(fresh session from the canonical prompt) is the actual reset — operator-/launcher-initiated, not automatic. Placed in thelanesskill (which already documents the relaunch capability) rather thansource-control'sloop.md, to avoid the plugin where #741 is open. This is doc-only and ship-ready as a standalone PR on your word — it documents the gap; it is not the mechanism fix.Holding the mechanism build until Blocker 2 is decided.
kyle-sexton commentedon Jul 21, 2026
This was generated by AI (decide lane — brief freshness supplement).
Supplements — does not replace — the original decision brief. That brief's RECOMMENDED ("threshold-triggered fresh-session relaunch via #508") has gone stale: two load-bearing facts under it moved on this issue after it was written. This note updates only the now-live question; the brief's problem framing, "today in the checkout" findings, and fold-vs-keep call all still hold.
Load-bearing facts that changed
status: ready. It shipped as theclaude-ops:laneslauncher. The brief's RECOMMENDED named ops: scripted lane launcher — start/restart loop lanes headlessly from canonical prompt files #508 as a pending dependency ("status: ready"); the relaunch home now exists. See #508.trigger-dispatchalready uses. The park comment established this and surfaced the new live question below.The now-live question
Per-cycle-fresh relaunch decouples the cycle from the in-session
/loop. Butloop.md§5.3 maps the engine'srecommended_cadence→ an in-sessionScheduleWakeup.delaySeconds(active 300s / normal 900s / quiet 3600s). An external relaunch cannot run that in-session wakeup — so who owns adaptive cadence between cycles?activelane no longer tightens, an idle one no longer backs off.Updated RECOMMENDED
(b) Externalized next-cadence handoff — RECOMMENDED.
Rationale (re-derived from the per-cycle-fresh reality, not anchored on the stale brief):
/loop. #500 — the sibling loop-cadence issue — independently demands cadence key to work-state (queue non-empty → next cycle immediately; delay only when idle/gated). That rule can only be computed by the cycle that just saw the queue depth. A fixed external interval (a) is structurally incapable of implementing loops/skills: self-paced /loop idles between non-empty cycles — cadence should be work-state-driven (no delay when queue non-empty), not a guessed clock #500 — it cannot know the queue is non-empty. So loops/skills: self-paced /loop idles between non-empty cycles — cadence should be work-state-driven (no delay when queue non-empty), not a guessed clock #500 is the decisive tie-breaker: (a) does not merely regress §5.3, it makes loops/skills: self-paced /loop idles between non-empty cycles — cadence should be work-state-driven (no delay when queue non-empty), not a guessed clock #500 unimplementable.recommended_cadenceand loops/skills: self-paced /loop idles between non-empty cycles — cadence should be work-state-driven (no delay when queue non-empty), not a guessed clock #500's work-state read), the cycle must emit it and the launcher must consume it — exactly the externalized-payload direction loops/skills: orchestrator context economy — subagent return-payload contracts + GitHub-externalized state #496 already moves in. The state file is a small, scriptable primitive (loops: script the deterministic lane mechanics — machine-behavior block, #502 telemetry upsert, wire script-the-deterministic-work into prompt ritual #538), not a bespoke mechanism.Sequencing: land the relaunch + cadence-handoff primitive on #538's scriptable base (still open) so the state file is a shared primitive, not a one-off. #508 (the launcher) already exists to host it.
Pair with
SessionStart(source=compact)re-injection (#535 member 5) as a complement, unchanged from the original brief.Cross-links: #508 (launcher — now closed/built, the relaunch home) · #576 (context% unmeasurable — kills the threshold trigger) · #500 (sibling loop-cadence issue — the tie-breaker for handoff over fixed-interval) · #496 · #538 · #535 · #480.
docs(work-items): sync triage SKILL attention-view + state machine wi…
kyle-sexton commentedon Jul 22, 2026
Operator ruling (ratification interview, 2026-07-22 ~03:05Z): per-cycle-fresh + externalized cadence handoff. (a) Trigger: per-cycle-fresh relaunch via the
claude-ops:laneslauncher — threshold triggers are blocked on unmeasurable in-session context% (documented >2x overestimate). (b) Cadence: each cycle writes its recommended next-cadence to a state file the launcher reads — keeps #500's work-state-driven cadence implementable (fixed-interval cannot).SessionStart(source=compact)re-injection unchanged. Staleness note: the #538-open sequencing constraint in the freshness supplement is obsolete (#538 and #508 both closed/built); #500 remains the open tie-breaker sibling. The staged doc-caveat on branchfix/551-loop-context-resetis approved to ship as a standalone PR (tower opening it). Flipping tostatus: ready.docs(claude-ops): state that /loop never resets context; relaunch is …
kyle-sexton commentedon Aug 13, 2026
Frontier disposition (drain session)
Ruling: Close as not planned.
Per-cycle context reset is folded into loop-lane resilience work (#535); prompt admonition alone is not an open discovery item.