Skip to content

[Claude Code] Token usage always 0 — "transcript flush sentinel not found within timeout" on every TurnEnd #956

@heychad

Description

@heychad

Summary

On Entire CLI 0.5.2 (5affe173) with Claude Code 2.1.100 (claude-opus-4-6[1m]), every TurnEnd logs a transcript flush sentinel not found within timeout, proceeding warning, the model field on the turn-end event is empty, and entire status reports tokens 0 even across many completed turns.

Environment

  • Entire CLI: 0.5.2 (5affe173), Go 1.26.1, darwin/arm64
  • Claude Code: 2.1.100
  • Model: claude-opus-4-6[1m] (Opus 4.6, 1M context)
  • macOS 15.x (Darwin 24.6.0)
  • Mode: manual-commit on main

Repro

  1. Start a Claude Code session in a repo with Entire enabled.
  2. Submit several prompts, let each turn complete.
  3. entire status → session shows tokens 0.
  4. tail .entire/logs/entire.log → every turn logged:
"transcript flush sentinel not found within timeout, proceeding"
  component: agent.claudecode
  timeout:   3000000000   (3s)

And every corresponding turn-end event has model:"" (empty), even though the session was started with model:"claude-opus-4-6[1m]".

Expected

entire status should reflect actual token usage after each stop, and model should populate on turn-end.

Actual

tokens 0 forever. Empty model on every turn-end. Token parsing silently fails.

Guess at root cause

Either (a) the 3 s sentinel timeout is too tight for Opus on long-context turns (Claude Code is still flushing the JSONL transcript when Entire reads it), or (b) the claude-code adapter's sentinel detection / transcript parser doesn't match the current Claude Code 2.1.x transcript format — the empty model field on turn-end suggests the parser is running but failing to find expected fields, not just timing out.

Willing to help

Happy to grab a redacted transcript sample and/or run a patched build with more verbose sentinel logging if it would help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions