Skip to content

Persist per-issue token usage#60

Open
danielmcauley wants to merge 1 commit intomainfrom
codex/persist-token-usage-ledger
Open

Persist per-issue token usage#60
danielmcauley wants to merge 1 commit intomainfrom
codex/persist-token-usage-ledger

Conversation

@danielmcauley
Copy link
Copy Markdown

@danielmcauley danielmcauley commented Apr 21, 2026

Context

Symphony shows live token totals, but completed tickets lose per-issue token observability after the run exits or the process restarts.

TL;DR

Persist per-issue Codex token totals in a JSONL ledger.

Summary

  • Add a durable token usage ledger next to Symphony logs.
  • Record live and final high-water token observations per issue/session.
  • Expose ledger summaries in the observability API.
  • Document durable token accounting and API behavior.

Alternatives

  • SQLite was considered, but JSONL fits the existing logs-root model.
  • Linear comments were avoided because they are a display surface, not a ledger.

Test Plan

  • mise exec -- make all
  • mise exec -- mix test test/symphony_elixir/token_usage_ledger_test.exs test/symphony_elixir/orchestrator_status_test.exs test/symphony_elixir/extensions_test.exs
  • mise exec -- mix specs.check

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