Problem
The main Token Activity view starts local Codex history work even though Codex already returns account Token Activity. That work adds CPU, memory, sync code, and failure cases to the default product.
The current sync branch also treats facts from another Mac as local source rows. This requires source generations, projection merging, and partial-import recovery that the lightweight core does not need.
Decision
Use the Codex App Server as the only source for the lightweight core:
account/rateLimits/read for Usage remaining, reset times, Other limits, and banked resets;
account/rateLimits/updated as a sparse limit update after the first full read;
account/usage/read for account facts and daily Token Activity;
- the existing single persistent App Server connection.
Do not add a custom cross-Mac sync for account Token Activity. The account API is already account-scoped, so both Macs read the same source.
Keep the existing Usage remaining history sync. Move Task, agent, model, concurrency, receipt, and source-file analytics to the opt-in work in #40.
account/usage/read has no documented update notification. Read it at startup, after wake or reconnect, and when the Token Activity view needs a newer snapshot. Do not build a second event transport for it.
Scope
- Replace the current local Token Activity chart with daily account buckets.
- Label the chart and values as Account.
- Keep 24 hours, 3 days, 4 weeks, 12 weeks, and Current window ranges.
- Keep exact weekly account totals only when the lifetime counter has a valid boundary reading. Otherwise show the bounded complete-day sum as partial.
- Selecting Token Activity must not call
thread/list, open rollout JSONL, or create/read the local analytics SQLite store.
- Do not ship the current Token Activity file-sync work.
- Keep the existing persistent
CodexClient process and reconnect behavior.
Acceptance
Evidence
Problem
The main Token Activity view starts local Codex history work even though Codex already returns account Token Activity. That work adds CPU, memory, sync code, and failure cases to the default product.
The current sync branch also treats facts from another Mac as local source rows. This requires source generations, projection merging, and partial-import recovery that the lightweight core does not need.
Decision
Use the Codex App Server as the only source for the lightweight core:
account/rateLimits/readfor Usage remaining, reset times, Other limits, and banked resets;account/rateLimits/updatedas a sparse limit update after the first full read;account/usage/readfor account facts and daily Token Activity;Do not add a custom cross-Mac sync for account Token Activity. The account API is already account-scoped, so both Macs read the same source.
Keep the existing Usage remaining history sync. Move Task, agent, model, concurrency, receipt, and source-file analytics to the opt-in work in #40.
account/usage/readhas no documented update notification. Read it at startup, after wake or reconnect, and when the Token Activity view needs a newer snapshot. Do not build a second event transport for it.Scope
thread/list, open rollout JSONL, or create/read the local analytics SQLite store.CodexClientprocess and reconnect behavior.Acceptance
account/usage/readdaily buckets and shows Account provenance.Evidence