openclaw - 💡(How to fix) Fix [Bug]: OpenClaw session transcript stops flushing mid-session on claude-cli runtime (Claude CLI side keeps updating) [1 comments, 2 participants]

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…
GitHub stats
openclaw/openclaw#78273Fetched 2026-05-07 03:38:58
View on GitHub
Comments
1
Participants
2
Timeline
1
Reactions
2
Author
Timeline (top)
commented ×1

The OpenClaw-side session transcript at ~/.openclaw/agents/<agent>/sessions/<sessionId>.jsonl stops growing mid-conversation, while the Claude CLI-side transcript at ~/.claude/projects/<wd>/<sessionId>.jsonl continues updating normally for the same session. Gap widens turn over turn and does not recover.

This is a silent data loss for any tooling that reads the OpenClaw-side transcript (e.g. sessions_history, the session-logs skill, replays).

Error Message

  • No user-visible error; only detectable by comparing mtimes/line counts against the Claude CLI side

Root Cause

Environment

  • OpenClaw 2026.5.4 (325df3e)
  • Model: anthropic/claude-opus-4-7
  • Runtime: Claude CLI
  • Auth: oauth (anthropic:claude-cli) (fallback path because primary token auth was unavailable for this model)
  • Surface: Discord channel session (agent:main:discord:channel:...)
RAW_BUFFERClick to expand / collapse

Description

The OpenClaw-side session transcript at ~/.openclaw/agents/<agent>/sessions/<sessionId>.jsonl stops growing mid-conversation, while the Claude CLI-side transcript at ~/.claude/projects/<wd>/<sessionId>.jsonl continues updating normally for the same session. Gap widens turn over turn and does not recover.

This is a silent data loss for any tooling that reads the OpenClaw-side transcript (e.g. sessions_history, the session-logs skill, replays).

Environment

  • OpenClaw 2026.5.4 (325df3e)
  • Model: anthropic/claude-opus-4-7
  • Runtime: Claude CLI
  • Auth: oauth (anthropic:claude-cli) (fallback path because primary token auth was unavailable for this model)
  • Surface: Discord channel session (agent:main:discord:channel:...)

Observed

Concrete numbers from a live session:

SidePathLinesLast write
OpenClaw~/.openclaw/agents/main/sessions/<id>.jsonl19300:13:44
Claude CLI~/.claude/projects/<wd>/<id>.jsonl22000:37:00

Over the ~24 minutes after the OpenClaw side stopped, the session continued normally end-to-end (replies delivered, tool calls executed and persisted, commits made on disk), but the OpenClaw transcript file's mtime and line count never advanced. Claude side advanced through ~7 additional turns in the same window.

Earlier in the same session, OpenClaw transcript was tracking the conversation correctly (lines were growing turn-over-turn), so the writer started fine and then silently stopped at some point after roughly the 193rd entry.

Expected

OpenClaw session transcript should continue to flush turn entries for the lifetime of the session, matching the Claude CLI side at its own granularity.

Impact

  • sessions_history / replays / session-logs skill miss recent turns silently
  • Long sessions on claude-cli runtime quietly lose transcript fidelity
  • No user-visible error; only detectable by comparing mtimes/line counts against the Claude CLI side

Notes

  • Distinct from #78194 (status display) — different code path: transcript writer vs. context-window formatter.
  • Related but distinct from #77974 (Telegram DM context loss from a missing-transcript race before flush) — this is not a startup race; the writer flushes successfully early in the session and then stops mid-session. Surface here is Discord, not Telegram.
  • Did not investigate root cause; flagging the symptom.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING