-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
[Bug]: [Bug]: ContextEngine afterTurn declares isHeartbeat but does not forward it #89302
Copy link
Copy link
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.bugSomething isn't workingSomething isn't workingbug:behaviorIncorrect behavior without a crashIncorrect behavior without a crashclawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.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.bugSomething isn't workingSomething isn't workingbug:behaviorIncorrect behavior without a crashIncorrect behavior without a crashclawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.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.
Bug type
Behavior bug (incorrect output/state without crash)
Beta release blocker
No
Summary
OpenClaw 2026.5.12 declares
ContextEngine.afterTurn(params).isHeartbeat?: boolean, but observed afterTurn call sites do not passisHeartbeatto context-engine plugins.Steps to reproduce
dist/plugin-sdk/src/context-engine/types.d.ts.dist/selection-61FIEezO.jsanddist/attempt.tool-run-context-BuKiw0o1.js.openclaw system event --mode now --expect-final --text "test".isHeartbeatfield.Expected behavior
For heartbeat runs, OpenClaw should pass
isHeartbeat: truetocontextEngine.afterTurn(...), matching the SDK type declaration.Actual behavior
The SDK type declares
isHeartbeat?: boolean, but the observed 2026.5.12 afterTurn call objects only passsessionId,sessionKey,sessionFile,messages,prePromptMessageCount,tokenBudget, andruntimeContext.Observed call sites:
dist/selection-61FIEezO.js:4793dist/attempt.tool-run-context-BuKiw0o1.js:474OpenClaw version
2026.5.12
Operating system
Windows 10.0.26200 x64
Install method
Local node_modules CLI, launched with
openclaw.cmd gateway runModel
doubao-seed-2.0-code
Provider / routing chain
NOT_ENOUGH_INFO
Additional provider/model setup details
NOT_ENOUGH_INFO
Logs, screenshots, and evidence
Impact and severity
No response
Additional information
The issue was observed with OpenViking as the active context-engine plugin. OpenViking has defensive code that checks
afterTurnParams.isHeartbeat, but the field was not present in the observed 2026.5.12 afterTurn call path.