-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
claude-cli lifecycle/cleanup batch: silent loopback degradation, dead drain state, exit-0 failover bypass, >5MB reseed silence, image-file growth, prepare temp leaks #98946
Copy link
Copy link
Closed
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.bugSomething isn't workingSomething isn't workingclawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.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.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.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: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.maintainerMaintainer-authored PRMaintainer-authored PRmaturity:stableIssue affects a taxonomy feature currently scored M4/M5.Issue affects a taxonomy feature currently scored M4/M5.
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.bugSomething isn't workingSomething isn't workingclawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.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.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.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: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.maintainerMaintainer-authored PRMaintainer-authored PRmaturity:stableIssue affects a taxonomy feature currently scored M4/M5.Issue affects a taxonomy feature currently scored M4/M5.
Type
Fields
Priority
None yet
What happened
Batch of verified claude-cli lifecycle/cleanup defects from the reliability audit:
prepare.ts:431-438catchesensureMcpLoopbackServer()failure and warn-continues: the generated strictmcp.jsonhas noopenclawserver,promptToolsis empty, and the agent runs a full turn with no messaging/gateway tools — inmessage_tool_onlydelivery mode the visible reply is silently lost. Policy is fail loud.drainingAbortedTurn/drainTimerinclaude-live-session.ts(:73-74, :385-390, :901-913, :1208-1216, :1355 pre-wave line numbers) are read in four places but never set true/non-null — dead since their introducing commit (81ca7bc). ~30 LOC of misleading state.handleClaudeExitthrows a plainError("Claude CLI exited before completing the turn.")for exit 0, whichtoCliRunFailurewon't convert — no model fallback, no fresh-session retry. The equivalent one-shot outcome becomesFailoverError("empty_response")and rotates the fallback chain.session-history.ts:23,327-337returns[]for oversized transcripts (and swallows parse errors); since claude-cli owns native compaction, long sessions can cross 5MB and every subsequent binding invalidation reseeds with zero history, unlogged.writeCliImages(helpers.ts:346-368) returns a no-op cleanup by design (content-addressed path stability), but no sweeper exists anywhere — every distinct inbound image permanently adds a file to the agent workspace/tmp image root.prepareExecutionfailure (:499-506) and the context-engine block (:901-977) are guarded; throws in between (skills-plugin prep, reference-path resolution, sandbox setup, reseed loading) orphan theopenclaw-cli-mcp-*/ skills-plugin temp dirs.Expected behavior
Loopback failure fails the run loudly when bundled MCP is enabled; dead drain state is deleted; clean mid-turn exits take the failover path like the one-shot equivalent; oversized transcripts reseed from a bounded tail (or at minimum log loudly); the image root gets bounded (age-based sweep); prepare cleanup is owned by one try/finally spanning all throw points.