[EPIC] Context-flush & orchestrator session-leasing: role state_class registry + flush_policy + lease lifecycle (plan-only) #820
Reference in New Issue
Block a user
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?
Status: PLAN-ONLY — SPEC → PLAN → DECOMPOSE (no implementation authorized by this issue)
This epic tracks a Jason-directed, framework-native workstream. It is plan-only until the coordinator ratifies the plan. No implementation, PR, or live mutation is authorized by opening it. Decomposition into sub-issues / PR tranches is itself a PLAN output and follows the SPEC.
Motivation
Long-lived agent sessions accrue context that must be flushed or compacted on a per-role basis to preserve correctness and control token budget. A bleed-stop hotfix (
dispatch-fresh.shbusy-guard, exit-4) has already shipped operationally; this epic codifies and generalizes it.Scope
dispatch-fresh.sh(fresh-session dispatch with busy-guard, exit 4) as a reviewed framework PR (author ≠ reviewer) inmosaicstack/stackunderpackages/mosaic/.state_classregistry. Config inpolicy/*.yaml, resolution order DB > local > framework-default.stateful= orchestrator / team leads / enhance → flush policycompact(never hard-flush).stateless= coders / reviewers / secrev / delegates →flush.flush_policytunable per-role:flush | compact | carry./clear; Codex = respawn/verb;mosaic-agent@respawn is fenced behind #791.Constraints
packages/mosaic/) — NOT jarvis-brain / operator-specific.policy/*.yaml → composeContract → envplumbing as the delegation-remediation + model-tiering config streams (design shares that spine).dispatch-fresh.shbusy-guard must not regress.Deliverables
Dependencies
mosaic-agent@respawn fence (per-runtime flush verb item 3).Provenance
Directed by Jason via a coordinator-authored durable brief; folded alongside the existing delegation-remediation + model-tiering config work. Plan ratification authority: coordinator.
HELD — not authorized for work. Per coordinator ruling, this epic is on hold pending a direct user instruction to the owning session. A peer relay does not establish genuine user-role authorization. No SPEC/PLAN/decomposition, sub-issues, PR, or implementation is authorized until the user directly instructs. This issue is a placeholder only; do not action it.