openclaw - 💡(How to fix) Fix [Bug]: Isolated cron session dies at memory-flush with Opus 4.7 — no deliverable produced

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

An isolated agentTurn cron session running claude-opus-4-7 enters an unbounded exploratory loop that saturates the 200k context window, then dies silently at the memory-flush step with 0 events post-flush and no deliverable produced.

Error Message

The session completes within context limits and produces its deliverable (report + email), or fails with a recoverable error. In known-good runs with claude-opus-4-6 on the same cron and identical prompt, the session completes in ~6-7 minutes. Severity: High — cron produces no output, no error surfaced to the user, silent failure.

Root Cause

An isolated agentTurn cron session running claude-opus-4-7 enters an unbounded exploratory loop that saturates the 200k context window, then dies silently at the memory-flush step with 0 events post-flush and no deliverable produced.

Fix Action

Fix / Workaround

Affected: isolated agentTurn crons running claude-opus-4-7 with large multi-file tasks. Severity: High — cron produces no output, no error surfaced to the user, silent failure. Frequency: 2/2 observed attempts with Opus 4.7; 0/2 with Opus 4.6. Consequence: Scheduled architecture review (D2) did not run on two occasions, requiring manual intervention. Extra token cost: ~6.6M tokens across both failed runs. Workaround: changed payload.model to claude-opus-4-6 — stable since 2026-05-01.

Last known good: claude-opus-4-6 (confirmed 2026-05-01 and 2026-05-08). First known bad: claude-opus-4-7 on 2026-04-26. Workaround active: payload.model=claude-opus-4-6 on cron 85d04811. No issue filed upstream yet — this is the initial report.

Code Example

Two confirmed sessions:
- Session 8016ce68-fc3d-49e4-bc9d-43f04ecfd961 — 2026-04-26, cron 85d04811.
  ~1.88M tokens consumed. Session died at memory-flush, no report generated.
- Session c6d7f082-421a-4009-be91-795e668288e9 — 2026-05-01 ~08:07:44 CEST, cron 85d04811.
  ~4.75M tokens consumed. journalctl confirms 0 events post memory-flush timestamp.

Working runs (claude-opus-4-6, same cron, same prompt):
- 2026-05-01 19:16 — completed in ~6 min (OK).
- 2026-05-08 09:06 — completed in ~6.9 min (OK).
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

An isolated agentTurn cron session running claude-opus-4-7 enters an unbounded exploratory loop that saturates the 200k context window, then dies silently at the memory-flush step with 0 events post-flush and no deliverable produced.

Steps to reproduce

  1. Configure an isolated agentTurn cron with payload.model=anthropic/claude-opus-4-7, contextWindow=200000, reserveTokens=30000.
  2. Give the cron a multi-step analysis task that involves reading several large files (e.g. JSONL transcripts, CSV cost reports).
  3. Trigger the cron run.
  4. Observe: session consumes millions of tokens in exploratory tool calls, never reaches the deliverable phase, and terminates at the memory-flush compaction step.
  5. Check journalctl: 0 events after the memory-flush timestamp.

Expected behavior

The session completes within context limits and produces its deliverable (report + email), or fails with a recoverable error. In known-good runs with claude-opus-4-6 on the same cron and identical prompt, the session completes in ~6-7 minutes.

Actual behavior

Session consumes 1.88M tokens (run 8016ce68, 2026-04-26) and 4.75M tokens (run c6d7f082, 2026-05-01). In both cases the session terminates at the exact moment of the memory-flush compaction step with 0 events post-flush in journalctl. No deliverable is generated and no output message is sent.

OpenClaw version

2026.4.23 (first occurrence 2026-04-26) / reproduced on same codebase 2026-05-01

Operating system

Ubuntu 24.04

Install method

npm global

Model

anthropic/claude-opus-4-7

Provider / routing chain

openclaw -> anthropic

Additional provider/model setup details

Session type: isolated agentTurn cron (sessionTarget: isolated). contextWindow: 200000, reserveTokens: 30000. Same cron (85d04811), same prompt — no changes between the failing Opus 4.7 runs and the working Opus 4.6 runs. Config: agents.defaults.models.anthropic/claude-opus-4-7 in openclaw.json.

Logs, screenshots, and evidence

Two confirmed sessions:
- Session 8016ce68-fc3d-49e4-bc9d-43f04ecfd961 — 2026-04-26, cron 85d04811.
  ~1.88M tokens consumed. Session died at memory-flush, no report generated.
- Session c6d7f082-421a-4009-be91-795e668288e9 — 2026-05-01 ~08:07:44 CEST, cron 85d04811.
  ~4.75M tokens consumed. journalctl confirms 0 events post memory-flush timestamp.

Working runs (claude-opus-4-6, same cron, same prompt):
- 2026-05-01 19:16 — completed in ~6 min (OK).
- 2026-05-08 09:06 — completed in ~6.9 min (OK).

Impact and severity

Affected: isolated agentTurn crons running claude-opus-4-7 with large multi-file tasks. Severity: High — cron produces no output, no error surfaced to the user, silent failure. Frequency: 2/2 observed attempts with Opus 4.7; 0/2 with Opus 4.6. Consequence: Scheduled architecture review (D2) did not run on two occasions, requiring manual intervention. Extra token cost: ~6.6M tokens across both failed runs. Workaround: changed payload.model to claude-opus-4-6 — stable since 2026-05-01.

Additional information

Last known good: claude-opus-4-6 (confirmed 2026-05-01 and 2026-05-08). First known bad: claude-opus-4-7 on 2026-04-26. Workaround active: payload.model=claude-opus-4-6 on cron 85d04811. No issue filed upstream yet — this is the initial report.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

The session completes within context limits and produces its deliverable (report + email), or fails with a recoverable error. In known-good runs with claude-opus-4-6 on the same cron and identical prompt, the session completes in ~6-7 minutes.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING