-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
Generalize post-timeout compaction completion reconciliation across session state #45505
Copy link
Copy link
Open
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Summary
OpenClaw now has a narrow fix for one specific state mismatch: compaction can succeed after the runner stops waiting, and
sessions.json.compactionCountneeds to be reconciled afterward.That solves a real bug, but it likely points to a broader design gap:
This follow-up issue is about making that completion/reconciliation model more general.
Motivation
Current state propagation is fragmented:
That means timeout-late-success cases can leave different parts of the system disagreeing about what actually happened.
What This Is Not
This is not a duplicate of narrower or adjacent issues such as:
/compactUX failuresThose are related, but this follow-up is specifically about a more unified model for post-timeout compaction completion semantics and state convergence.
Proposed Direction
Consider introducing a more explicit compaction completion reconciliation path that becomes the authoritative place to converge state after compaction finishes, even if the enclosing run already timed out or stopped waiting.
Potential scope:
compactionCount)/statusand UI surfacesDesirable Properties
Any generalized solution should preserve:
Possible Shape
A possible design direction:
max(...)/ compare-and-set style semantics) so late or duplicated signals do not corrupt counters.Why A Separate Follow-Up
The current merged fix should stay narrow and low-risk.
A broader design would touch:
/statusand related state readersThat deserves separate discussion and review.
Related