usage_report
Generate a read-only report of local Codex/Claude Code usage for a task or session, linking sources and subagents. Use when asked about work usage.
Instructions
Report local Codex/Claude Code usage when the user asks about work usage. Pass task (Task Passport id; omit for the current task) to report the sources linked to it; sessions that ran Agentpack for the task (and their subagents) are included automatically; if none are traced or linked, the result lists candidate sessions of the task worktree to link with usage_link. Task reports count only requests made while the task was the current Passport; a subagent counts whole for the task current when it started. Alternatively supply manifest, or client/files for a direct report. Same read-only report as CLI usage report; no collection, rates or ledger writes. Includes estimated Agentpack call overhead, not schema cost or billing. Optional byTurn shows boundaries and turns selects N, N: or N:M in one file. Monetary snapshots are source-session estimates, unavailable for filtered ranges. Supported clients: Codex and Claude Code.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Exclusive ISO timestamp with timezone. | |
| from | No | Inclusive ISO timestamp with timezone. | |
| json | No | Return aggregate report JSON as text instead of human-readable text. | |
| task | No | Task Passport id whose linked sources to report (omit for the current task). With client/files it is only a descriptive label. | |
| files | No | Explicit local JSONL paths; relative paths resolve from the pack root. | |
| turns | No | Inclusive N or N:M turn selection; exactly one file required. | |
| byTurn | No | Include source-local turn rows. | |
| client | No | ||
| manifest | No | Local task usage manifest; exclusive with direct source options. Paths inside it resolve from its directory. |