Skip to content

docs(roadmap): add #330 — resume mode stats/cost always zero#2839

Merged
code-yeongyu merged 1 commit into
mainfrom
docs/roadmap-324-resume-stats-zero
May 25, 2026
Merged

docs(roadmap): add #330 — resume mode stats/cost always zero#2839
code-yeongyu merged 1 commit into
mainfrom
docs/roadmap-324-resume-stats-zero

Conversation

@code-yeongyu
Copy link
Copy Markdown
Collaborator

Pinpoint #324

Gap: claw --output-format json --resume latest /stats and /cost always return zero token counts.

Live reproduction on e7074f4:

claw --output-format json --resume latest /stats
# → {"input_tokens": 0, "output_tokens": 0, "total_tokens": 0, ...}

claw --output-format json --resume latest /cost  
# → {"input_tokens": 0, "output_tokens": 0, "total_tokens": 0, ...}

Root cause candidates:

  • (a) Session JSONL serialization never writes per-turn usage records, so resume replay has nothing to count
  • (b) Resume-mode stat accumulation reads memory-side live counters (always 0 since no API calls made in resume-only invocation)

Fix shape: persist usage records per turn into session JSONL; add total_usage summary block at tail; make /stats//cost in resume-mode sum persisted records; add regression test.

ROADMAP.md only diff: 1 file changed, 2 insertions(+)

Source: Jobdori live dogfood, e7074f4, 2026-04-29.

@code-yeongyu code-yeongyu changed the title docs(roadmap): add #324 — resume mode stats/cost always zero docs(roadmap): add #326 — resume mode stats/cost always zero Apr 29, 2026
@code-yeongyu code-yeongyu force-pushed the docs/roadmap-324-resume-stats-zero branch from b878b3c to 8a45448 Compare April 29, 2026 12:36
@code-yeongyu code-yeongyu changed the title docs(roadmap): add #326 — resume mode stats/cost always zero docs(roadmap): add #330 — resume mode stats/cost always zero Apr 29, 2026
@code-yeongyu code-yeongyu force-pushed the docs/roadmap-324-resume-stats-zero branch from 8a45448 to 52161c7 Compare April 29, 2026 12:36
@code-yeongyu code-yeongyu force-pushed the docs/roadmap-324-resume-stats-zero branch from 52161c7 to 8806e62 Compare May 25, 2026 04:01
@code-yeongyu code-yeongyu merged commit bb2a923 into main May 25, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant