Skip to content

Commit 5fb6a8f

Browse files
kevin-dpclaude
andcommitted
docs(agents): drop the confusing serialize-first tools comment
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent cbc764f commit 5fb6a8f

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

packages/agents-runtime/src/pi-adapter.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,6 @@ export function createPiAgentAdapter(
318318
// per step; the UI derives "messages" as the real total minus these.
319319
const tokenBreakdown = {
320320
system: approxTokens(opts.systemPrompt),
321-
// Serialize first: approxTokens' array branch charges a flat ~64 per
322-
// non-text block, so the raw AgentTool[] would estimate ~64×toolCount
323-
// regardless of real schema size. JSON.stringify captures each tool's
324-
// name + description + parameter schema, which is what fills the prompt.
325321
tools: approxTokens(JSON.stringify(opts.tools)),
326322
}
327323

0 commit comments

Comments
 (0)