I Could Measure Claude and Codex Usage. I Still Couldn't Honestly Assign It to a Task. A developer built agent-cost, a tool that measures Claude Code and Codex CLI usage while keeping session measurement and task attribution separate. The tool reads local logs, normalizes usage events into auditable facts, and makes no network calls at runtime. It deliberately avoids inferring tasks from branches or timestamps, leaving unattributed usage as unknown rather than manufacturing precise allocations. Once you use Claude Code or Codex for real work, a total usage number stops being enough. You want to know which change consumed it. I did not build agent-cost because I had missed the existing token and cost trackers. I knew about multi-agent reporting CLIs, local dashboards, and OpenTelemetry-style observability stacks. I had even built a similar view in Notion before. The problem appeared when I tried to use that kind of reporting in an operational workflow. I needed agent logs to stay on the machine. I wanted a small runtime dependency surface, custom metrics I could audit, and a machine-readable result that another tool could consume. Most importantly, I needed session measurement and task attribution to remain two different claims. I did not need another universal dashboard. I needed a boundary underneath the dashboard that could answer: is this number supported well enough to enter task accounting? Different tools optimize for different jobs. A broad CLI such as ccusage is useful when coverage across agents matters. Local interfaces such as token-tracker or AgentMeter are a better fit for visual exploration of projects, sessions, subagents, and tools. An OpenTelemetry stack is the natural choice for fleet-level metrics, logs, and traces. Those are not inferior versions of agent-cost . They serve different use cases and trust models. The layer I wanted looked like this: php local observations - auditable normalized facts - explicit pricing status - caller-selected sessions - task-attribution policy - optional dashboard / Notion / spec-lane agent-cost reads logs that Claude Code and Codex CLI have already written locally. It normalizes each usage event into a fact with a model, token kind, timestamp, and count. At runtime it makes no network calls and declares no Python runtime dependencies. Its price catalog has a version and SHA-256 digest, both carried into machine-readable output. That “zero-network” claim is deliberately limited to runtime behavior. Installing from PyPI still means trusting a registry, installer, build backend, Python runtime, and operating system. The tool also needs access to the source logs. The design narrows runtime data egress and dependency surface; it does not make the supply chain disappear. There is an attractive shortcut when building task-level cost reports: This always produces numbers that add up. But the agreement comes from the allocation rule, not from an observation. One session can cover several tasks. One task can span several sessions. A branch can stay unchanged while the operator investigates a different issue or reviews someone else's work. Elapsed time does not describe the computational weight of prompts and tool calls. The invariant I wanted was: Session usage is observable. Session-to-task attribution is a separate claim. agent-cost measure accepts only session IDs selected by its caller: agent-cost measure \ --session-id