From 5eeac6682404bbe66c8ed9e4437b2142dc7931b8 Mon Sep 17 00:00:00 2001 From: Ryan McMillan Date: Wed, 28 Jan 2026 15:56:15 -0600 Subject: [PATCH] fix: use correct path to usage in meta Usage is at result.meta.agentMeta.usage, not result.meta.usage Co-Authored-By: Claude Opus 4.5 --- src/commands/agent.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/agent.ts b/src/commands/agent.ts index 31c137d77..7fb256be2 100644 --- a/src/commands/agent.ts +++ b/src/commands/agent.ts @@ -492,7 +492,7 @@ export async function agentCommand( content: [{ type: "text", text: result.payloads[0].text }], timestamp: Date.now(), stopReason: "cli", - usage: result.meta?.usage ?? { input: 0, output: 0, totalTokens: 0 }, + usage: result.meta?.agentMeta?.usage ?? { input: 0, output: 0, totalTokens: 0 }, }, }; fs.appendFileSync(transcriptPath, JSON.stringify(messageEntry) + "\n", "utf-8");