Skip to content

Meter Claude Code sessions in context-economy - #7

Merged
Zulut30 merged 1 commit into
mainfrom
codex/claude-meter-20260924
Sep 24, 2026
Merged

Zulut30 merged 1 commit into
mainfrom
codex/claude-meter-20260924

Conversation

@Zulut30

@Zulut30 Zulut30 commented Sep 24, 2026

Copy link
Copy Markdown
Member

Claude Code sessions now work with the existing task meter. meter-start --current-session resolves the exact CLAUDE_CODE_SESSION_ID inside Claude Code, while explicit --session-format claude supports attached helper sessions. The parser counts each streamed API request once, includes cache creation and reads in total input, retains only aggregate counters and hashed request/tool IDs, and marks incomplete usage as unknown.

Validation: make verify passed; 7 focused Claude/Codex session tests passed with CLAUDECODE=1; an actual Claude Code Bash call through OpenRouter resolved its own session successfully. An inspected completed Claude session matched its recorded cost-state token totals.

@Zulut30
Zulut30 merged commit 7e54878 into main Sep 24, 2026
2 checks passed
@Zulut30
Zulut30 deleted the codex/claude-meter-20260924 branch October 21, 2026 20:31
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