URL: https://usefewertokens.com/ # Use Fewer Tokens > The AI agent token optimizer: describe what your agent does and get the fixes that cut its tokens and wait time, ranked for your harness, with the exact setting and its source. By StackOne. Optimizer: https://usefewertokens.com/ (runs in the browser). The same optimizer on the StackOne blog: https://www.stackone.com/blog/ai-agent-token-optimizer/ Last checked: 30 Nov 2026, against the vendor's own pages. Every page in one file: https://usefewertokens.com/llms-full.txt ## Harness guides ### Building my own agent - [Reduce token usage in the Claude API and Agent SDK](https://usefewertokens.com/harnesses/claude-api/) - [Reduce token usage in the OpenAI Agents SDK](https://usefewertokens.com/harnesses/openai/) - [Reduce token usage in Vercel AI SDK](https://usefewertokens.com/harnesses/vercel-ai-sdk/) - [Reduce token usage in LangChain and LangGraph](https://usefewertokens.com/harnesses/langchain/) - [Reduce token usage in Mastra](https://usefewertokens.com/harnesses/mastra/) - [Reduce token usage in Pi](https://usefewertokens.com/harnesses/pi/) - [Reduce token usage in Flue](https://usefewertokens.com/harnesses/flue/) ### Using a coding agent - [Reduce token usage in Claude Code](https://usefewertokens.com/harnesses/claude-code/) - [Reduce token usage in Cursor](https://usefewertokens.com/harnesses/cursor/) - [Reduce token usage in Codex](https://usefewertokens.com/harnesses/codex/) - [Reduce token usage in OpenCode](https://usefewertokens.com/harnesses/opencode/) ### Using an enterprise assistant - [Reduce token usage in ChatGPT](https://usefewertokens.com/harnesses/chatgpt/) - [Reduce token usage in Microsoft Copilot Studio](https://usefewertokens.com/harnesses/copilot-studio/) - [Reduce token usage in Gemini Enterprise](https://usefewertokens.com/harnesses/gemini-enterprise/) - [Reduce token usage in Glean](https://usefewertokens.com/harnesses/glean/) - [Reduce token usage in Claude](https://usefewertokens.com/harnesses/claude-ai/) ### Using a workflow tool - [Reduce token usage in n8n](https://usefewertokens.com/harnesses/n8n/) - [Reduce token usage in Zapier](https://usefewertokens.com/harnesses/zapier/) - [Reduce token usage in Make](https://usefewertokens.com/harnesses/make/) ## Techniques ### Query instead of paging - [Deep Query](https://usefewertokens.com/techniques/deep-query/): Deep Query answers counts, filters and totals from a synced copy of a list action, so the agent gets one result instead of paging through every record. - [Keep live questions live](https://usefewertokens.com/techniques/keep-live/): Synced data reflects the last sync, so a question about the provider's state this minute, or a single record you already know, belongs on the live action. - [Let the agent run code over results](https://usefewertokens.com/techniques/code-execution/): When a task chains many tool calls, the agent can write a short program that calls the tools and returns only the final result, so intermediate results stay out of context. ### Load fewer tools - [Load tools when needed](https://usefewertokens.com/techniques/load-tools-when-needed/): Instead of sending every tool definition on every request, the agent sees a search tool and loads the few definitions a task needs. - [Turn off tools you don't use](https://usefewertokens.com/techniques/fewer-tools/): Every enabled tool costs tokens on every request where definitions load up front, and a long tool list makes the right one harder to pick. - [Keep instruction files short](https://usefewertokens.com/techniques/instruction-files/): Instruction files such as CLAUDE.md and Cursor rules load into every session, so every line is paid for on every run. ### Return less - [Ask for fewer fields](https://usefewertokens.com/techniques/field-selection/): A live list action returns whole records, so a question about two fields still reads every field. - [Clear old tool results](https://usefewertokens.com/techniques/context-editing/): Long sessions keep every earlier tool result in context, and most of it is never read again. - [Cap tool output](https://usefewertokens.com/techniques/output-caps/): A single chatty tool response can fill the window. - [Read web pages as text](https://usefewertokens.com/techniques/browser-snapshots/): An agent that browses by screenshot or by reading raw HTML pays for every pixel and tag. ### Pay less per token - [Prompt caching](https://usefewertokens.com/techniques/prompt-caching/): When every run opens with the same tools and system prompt, the model provider can cache that prefix and bill repeat reads at a fraction of the input price. - [Run side tasks on a smaller model](https://usefewertokens.com/techniques/smaller-subagents/): Searching, reading files and summarising rarely need a frontier model. - [Lower the effort setting](https://usefewertokens.com/techniques/effort/): Reasoning effort sets how much the model thinks before answering. - [Batch scheduled jobs](https://usefewertokens.com/techniques/batch/): Jobs nobody waits on, such as nightly reports, can go through a batch API at a discount in exchange for a slower turnaround. ### Measure and govern - [Measure what fills the window](https://usefewertokens.com/techniques/audit-commands/): Before changing anything, look at what fills the context window. - [Tool Policies](https://usefewertokens.com/techniques/tool-policies/): Tool Policies narrow which actions an agent can call and which fields it can read, per project. ## Also by StackOne - MCP clients scorecard: https://mcpclients.dev/ - Deep Query: https://www.stackone.com/platform/deep-query/ - How to reduce AI agent token usage: https://www.stackone.com/blog/reduce-ai-agent-token-usage/ --- URL: https://usefewertokens.com/harnesses/claude-api/ # Reduce token usage in the Claude API and Agent SDK > 7 settings cut more. Agent type: building my own agent. From Use Fewer Tokens, by StackOne. Last checked: 30 Nov 2026, against the vendor's own pages. ## Settings that cut more in Claude API and Agent SDK - **Load tools when needed**: defer_loading: true on your tools, plus the tool_search_tool_bm25_20251119 tool. ([source](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool), read 30 Nov 2026) - **Prompt caching**: cache_control: {"type": "ephemeral"} after the tools and system prompt. ([source](https://platform.claude.com/docs/en/build-with-claude/prompt-caching), read 30 Nov 2026) - **Let the agent run code over results**: code_execution_20260120 with allowed_callers on your tools. ([source](https://platform.claude.com/docs/en/agents-and-tools/tool-use/programmatic-tool-calling), read 30 Nov 2026) - **Clear old tool results** (beta): context_management with clear_tool_uses_20250919, or server-side compaction. ([source](https://platform.claude.com/docs/en/build-with-claude/context-editing), read 30 Nov 2026) - **Read web pages as text**: web_search_20260318 and web_fetch_20260318 filter results in code before they enter context. ([source](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool#dynamic-filtering), read 30 Nov 2026) - **Lower the effort setting**: effort: "low" for high-volume or latency-sensitive work (the default is high, or medium on Opus 5.5 and Haiku 5.5). ([source](https://platform.claude.com/docs/en/build-with-claude/effort), read 30 Nov 2026) - **Batch scheduled jobs**: Message Batches API: 50 percent off for work that can wait up to 24 hours. ([source](https://platform.claude.com/docs/en/build-with-claude/batch-processing), read 30 Nov 2026) ## With StackOne - **Deep Query**: Data Sync on the list action, then list_tickets_s1query({ filter, source, aggs }) - **Load tools when needed**: Add https://mcp.stackone.com/mcp; Advanced Tool Search is on by default - **Ask for fewer fields**: source on any _s1query call, listing only the fields the answer uses - **Keep live questions live**: Keep the live action next to the _s1query tool - **Tool Policies**: Tool Policies on the project ## Other techniques for your own agent - [Turn off tools you don't use](https://usefewertokens.com/techniques/fewer-tools/): fits. Filter the tool list per step. - [Cap tool output](https://usefewertokens.com/techniques/output-caps/): fits. Reshape results with toModelOutput in the Vercel AI SDK. - [Run side tasks on a smaller model](https://usefewertokens.com/techniques/smaller-subagents/): fits. Route side tasks to a smaller model. - [Keep instruction files short](https://usefewertokens.com/techniques/instruction-files/): partly. Keep the system prompt short. - [Measure what fills the window](https://usefewertokens.com/techniques/audit-commands/): partly. Log input tokens per request. ## Links - Optimizer set to Claude API and Agent SDK: https://usefewertokens.com/harnesses/claude-api/ - How to reduce AI agent token usage: https://www.stackone.com/blog/reduce-ai-agent-token-usage/ --- URL: https://usefewertokens.com/harnesses/openai/ # Reduce token usage in the OpenAI Agents SDK > OpenAI Responses and Agents SDK already does one of the fixes for you, and 5 settings cut more. Agent type: building my own agent. From Use Fewer Tokens, by StackOne. Last checked: 30 Nov 2026, against the vendor's own pages. ## What OpenAI Responses and Agents SDK already does - **Prompt caching**: Long, repeated prefixes are cached automatically; keep the prefix stable. ([source](https://developers.openai.com/api/docs/guides/prompt-caching), read 30 Nov 2026) ## Settings that cut more in OpenAI Responses and Agents SDK - **Load tools when needed**: defer_loading on your tools with the tool search tool (gpt-5.4 and later). ([source](https://developers.openai.com/api/docs/guides/tools-tool-search), read 30 Nov 2026) - **Turn off tools you don't use**: tool_filter on the MCP server, with cache_tools_list. ([source](https://openai.github.io/openai-agents-python/mcp), read 30 Nov 2026) - **Let the agent run code over results**: The programmatic_tool_calling tool, with allowed_callers: ["programmatic"] on your tools. ([source](https://developers.openai.com/api/docs/guides/tools-programmatic-tool-calling), read 30 Nov 2026) - **Clear old tool results**: context_management: [{ type: "compaction", compact_threshold }] on Responses requests. ([source](https://developers.openai.com/api/docs/guides/compaction), read 30 Nov 2026) - **Lower the effort setting**: reasoning.effort: "low" for routine calls; lower effort favors speed and fewer tokens. ([source](https://developers.openai.com/api/docs/guides/reasoning), read 30 Nov 2026) ## With StackOne - **Deep Query**: Data Sync on the list action, then list_tickets_s1query({ filter, source, aggs }) - **Load tools when needed**: Add https://mcp.stackone.com/mcp; Advanced Tool Search is on by default - **Ask for fewer fields**: source on any _s1query call, listing only the fields the answer uses - **Keep live questions live**: Keep the live action next to the _s1query tool - **Tool Policies**: Tool Policies on the project ## Other techniques for your own agent - [Cap tool output](https://usefewertokens.com/techniques/output-caps/): fits. Reshape results with toModelOutput in the Vercel AI SDK. - [Read web pages as text](https://usefewertokens.com/techniques/browser-snapshots/): fits. Text snapshots, or filtered web search and fetch on the Claude API. - [Run side tasks on a smaller model](https://usefewertokens.com/techniques/smaller-subagents/): fits. Route side tasks to a smaller model. - [Batch scheduled jobs](https://usefewertokens.com/techniques/batch/): fits. Message Batches API, 50% off. - [Keep instruction files short](https://usefewertokens.com/techniques/instruction-files/): partly. Keep the system prompt short. - [Measure what fills the window](https://usefewertokens.com/techniques/audit-commands/): partly. Log input tokens per request. ## Links - Optimizer set to OpenAI Responses and Agents SDK: https://usefewertokens.com/harnesses/openai/ - How to reduce AI agent token usage: https://www.stackone.com/blog/reduce-ai-agent-token-usage/ --- URL: https://usefewertokens.com/harnesses/vercel-ai-sdk/ # Reduce token usage in Vercel AI SDK > 3 settings cut more. Agent type: building my own agent. From Use Fewer Tokens, by StackOne. Last checked: 30 Nov 2026, against the vendor's own pages. ## Settings that cut more in Vercel AI SDK - **Load tools when needed**: toolSearch() with deferLoading on your tools. ([source](https://ai-sdk.dev/docs/ai-sdk-core/tool-search), read 30 Nov 2026) - **Turn off tools you don't use**: prepareStep returning activeTools. ([source](https://ai-sdk.dev/docs/agents/loop-control), read 30 Nov 2026) - **Cap tool output**: toModelOutput on the tool. ([source](https://ai-sdk.dev/docs/ai-sdk-core/tools-and-tool-calling), read 30 Nov 2026) ## With StackOne - **Deep Query**: Data Sync on the list action, then list_tickets_s1query({ filter, source, aggs }) - **Load tools when needed**: Add https://mcp.stackone.com/mcp; Advanced Tool Search is on by default - **Ask for fewer fields**: source on any _s1query call, listing only the fields the answer uses - **Keep live questions live**: Keep the live action next to the _s1query tool - **Tool Policies**: Tool Policies on the project ## Other techniques for your own agent - [Prompt caching](https://usefewertokens.com/techniques/prompt-caching/): fits. cache_control on the Claude API; automatic on OpenAI. - [Let the agent run code over results](https://usefewertokens.com/techniques/code-execution/): fits. Programmatic tool calling on the Claude and OpenAI APIs; Pi codemode. - [Clear old tool results](https://usefewertokens.com/techniques/context-editing/): fits. Context editing and compaction on the Claude API. - [Read web pages as text](https://usefewertokens.com/techniques/browser-snapshots/): fits. Text snapshots, or filtered web search and fetch on the Claude API. - [Run side tasks on a smaller model](https://usefewertokens.com/techniques/smaller-subagents/): fits. Route side tasks to a smaller model. - [Lower the effort setting](https://usefewertokens.com/techniques/effort/): fits. The effort parameter on the Claude API. - [Batch scheduled jobs](https://usefewertokens.com/techniques/batch/): fits. Message Batches API, 50% off. - [Keep instruction files short](https://usefewertokens.com/techniques/instruction-files/): partly. Keep the system prompt short. - [Measure what fills the window](https://usefewertokens.com/techniques/audit-commands/): partly. Log input tokens per request. ## Links - Optimizer set to Vercel AI SDK: https://usefewertokens.com/harnesses/vercel-ai-sdk/ - How to reduce AI agent token usage: https://www.stackone.com/blog/reduce-ai-agent-token-usage/ --- URL: https://usefewertokens.com/harnesses/langchain/ # Reduce token usage in LangChain and LangGraph > Which token fixes fit LangChain and LangGraph, and how to turn them on. Agent type: building my own agent. From Use Fewer Tokens, by StackOne. ## With StackOne - **Deep Query**: Data Sync on the list action, then list_tickets_s1query({ filter, source, aggs }) - **Load tools when needed**: Add https://mcp.stackone.com/mcp; Advanced Tool Search is on by default - **Ask for fewer fields**: source on any _s1query call, listing only the fields the answer uses - **Keep live questions live**: Keep the live action next to the _s1query tool - **Tool Policies**: Tool Policies on the project ## Other techniques for your own agent - [Turn off tools you don't use](https://usefewertokens.com/techniques/fewer-tools/): fits. Filter the tool list per step. - [Prompt caching](https://usefewertokens.com/techniques/prompt-caching/): fits. cache_control on the Claude API; automatic on OpenAI. - [Let the agent run code over results](https://usefewertokens.com/techniques/code-execution/): fits. Programmatic tool calling on the Claude and OpenAI APIs; Pi codemode. - [Clear old tool results](https://usefewertokens.com/techniques/context-editing/): fits. Context editing and compaction on the Claude API. - [Cap tool output](https://usefewertokens.com/techniques/output-caps/): fits. Reshape results with toModelOutput in the Vercel AI SDK. - [Read web pages as text](https://usefewertokens.com/techniques/browser-snapshots/): fits. Text snapshots, or filtered web search and fetch on the Claude API. - [Run side tasks on a smaller model](https://usefewertokens.com/techniques/smaller-subagents/): fits. Route side tasks to a smaller model. - [Lower the effort setting](https://usefewertokens.com/techniques/effort/): fits. The effort parameter on the Claude API. - [Batch scheduled jobs](https://usefewertokens.com/techniques/batch/): fits. Message Batches API, 50% off. - [Keep instruction files short](https://usefewertokens.com/techniques/instruction-files/): partly. Keep the system prompt short. - [Measure what fills the window](https://usefewertokens.com/techniques/audit-commands/): partly. Log input tokens per request. ## Links - Optimizer set to LangChain and LangGraph: https://usefewertokens.com/harnesses/langchain/ - How to reduce AI agent token usage: https://www.stackone.com/blog/reduce-ai-agent-token-usage/ --- URL: https://usefewertokens.com/harnesses/mastra/ # Reduce token usage in Mastra > One setting cuts more. Agent type: building my own agent. From Use Fewer Tokens, by StackOne. Last checked: 30 Nov 2026, against the vendor's own pages. ## Settings that cut more in Mastra - **Load tools when needed**: ToolSearchProcessor. ([source](https://mastra.ai/reference/processors/tool-search-processor), read 30 Nov 2026) ## With StackOne - **Deep Query**: Data Sync on the list action, then list_tickets_s1query({ filter, source, aggs }) - **Load tools when needed**: Add https://mcp.stackone.com/mcp; Advanced Tool Search is on by default - **Ask for fewer fields**: source on any _s1query call, listing only the fields the answer uses - **Keep live questions live**: Keep the live action next to the _s1query tool - **Tool Policies**: Tool Policies on the project ## Other techniques for your own agent - [Turn off tools you don't use](https://usefewertokens.com/techniques/fewer-tools/): fits. Filter the tool list per step. - [Prompt caching](https://usefewertokens.com/techniques/prompt-caching/): fits. cache_control on the Claude API; automatic on OpenAI. - [Let the agent run code over results](https://usefewertokens.com/techniques/code-execution/): fits. Programmatic tool calling on the Claude and OpenAI APIs; Pi codemode. - [Clear old tool results](https://usefewertokens.com/techniques/context-editing/): fits. Context editing and compaction on the Claude API. - [Cap tool output](https://usefewertokens.com/techniques/output-caps/): fits. Reshape results with toModelOutput in the Vercel AI SDK. - [Read web pages as text](https://usefewertokens.com/techniques/browser-snapshots/): fits. Text snapshots, or filtered web search and fetch on the Claude API. - [Run side tasks on a smaller model](https://usefewertokens.com/techniques/smaller-subagents/): fits. Route side tasks to a smaller model. - [Lower the effort setting](https://usefewertokens.com/techniques/effort/): fits. The effort parameter on the Claude API. - [Batch scheduled jobs](https://usefewertokens.com/techniques/batch/): fits. Message Batches API, 50% off. - [Keep instruction files short](https://usefewertokens.com/techniques/instruction-files/): partly. Keep the system prompt short. - [Measure what fills the window](https://usefewertokens.com/techniques/audit-commands/): partly. Log input tokens per request. ## Links - Optimizer set to Mastra: https://usefewertokens.com/harnesses/mastra/ - How to reduce AI agent token usage: https://www.stackone.com/blog/reduce-ai-agent-token-usage/ --- URL: https://usefewertokens.com/harnesses/pi/ # Reduce token usage in Pi > Pi already does 2 of the fixes for you, and 2 settings cut more. Agent type: building my own agent. From Use Fewer Tokens, by StackOne. Last checked: 30 Nov 2026, against the vendor's own pages. ## What Pi already does - **Load tools when needed**: MCP tools default to codemode exposure, so scripts find them with searchTools() instead of every tool loading up front. ([source](https://github.com/earendil-works/pi/blob/4a080252f06caf63a525d7873c5d94d3c23887e0/packages/coding-agent/docs/mcp.md#L195), read 30 Nov 2026) - **Let the agent run code over results**: MCP tools default to codemode exposure: the model calls them from one script instead of one call per tool. ([source](https://github.com/earendil-works/pi/blob/4a080252f06caf63a525d7873c5d94d3c23887e0/packages/coding-agent/docs/mcp.md#L195), read 30 Nov 2026) ## Settings that cut more in Pi - **Clear old tool results**: /compact, and the compaction settings for automatic compaction. ([source](https://github.com/earendil-works/pi/blob/4a080252f06caf63a525d7873c5d94d3c23887e0/packages/coding-agent/docs/compaction.md), read 30 Nov 2026) - **Read web pages as text**: npm i -g agent-browser, then add "run agent-browser skills get core and follow it" to AGENTS.md. ([source](https://github.com/vercel-labs/agent-browser), read 30 Nov 2026) ## With StackOne - **Deep Query**: Data Sync on the list action, then list_tickets_s1query({ filter, source, aggs }) - **Load tools when needed**: Add https://mcp.stackone.com/mcp; Advanced Tool Search is on by default - **Ask for fewer fields**: source on any _s1query call, listing only the fields the answer uses - **Keep live questions live**: Keep the live action next to the _s1query tool - **Tool Policies**: Tool Policies on the project ## Other techniques for your own agent - [Turn off tools you don't use](https://usefewertokens.com/techniques/fewer-tools/): fits. Filter the tool list per step. - [Prompt caching](https://usefewertokens.com/techniques/prompt-caching/): fits. cache_control on the Claude API; automatic on OpenAI. - [Cap tool output](https://usefewertokens.com/techniques/output-caps/): fits. Reshape results with toModelOutput in the Vercel AI SDK. - [Run side tasks on a smaller model](https://usefewertokens.com/techniques/smaller-subagents/): fits. Route side tasks to a smaller model. - [Lower the effort setting](https://usefewertokens.com/techniques/effort/): fits. The effort parameter on the Claude API. - [Batch scheduled jobs](https://usefewertokens.com/techniques/batch/): fits. Message Batches API, 50% off. - [Keep instruction files short](https://usefewertokens.com/techniques/instruction-files/): partly. Keep the system prompt short. - [Measure what fills the window](https://usefewertokens.com/techniques/audit-commands/): partly. Log input tokens per request. ## Links - Optimizer set to Pi: https://usefewertokens.com/harnesses/pi/ - Pi on the MCP clients scorecard: https://mcpclients.dev/clients/pi/ - How to reduce AI agent token usage: https://www.stackone.com/blog/reduce-ai-agent-token-usage/ --- URL: https://usefewertokens.com/harnesses/flue/ # Reduce token usage in Flue > Which token fixes fit Flue, and how to turn them on. Agent type: building my own agent. From Use Fewer Tokens, by StackOne. ## With StackOne - **Deep Query**: Data Sync on the list action, then list_tickets_s1query({ filter, source, aggs }) - **Load tools when needed**: Add https://mcp.stackone.com/mcp; Advanced Tool Search is on by default - **Ask for fewer fields**: source on any _s1query call, listing only the fields the answer uses - **Keep live questions live**: Keep the live action next to the _s1query tool - **Tool Policies**: Tool Policies on the project ## Other techniques for your own agent - [Turn off tools you don't use](https://usefewertokens.com/techniques/fewer-tools/): fits. Filter the tool list per step. - [Prompt caching](https://usefewertokens.com/techniques/prompt-caching/): fits. cache_control on the Claude API; automatic on OpenAI. - [Let the agent run code over results](https://usefewertokens.com/techniques/code-execution/): fits. Programmatic tool calling on the Claude and OpenAI APIs; Pi codemode. - [Clear old tool results](https://usefewertokens.com/techniques/context-editing/): fits. Context editing and compaction on the Claude API. - [Cap tool output](https://usefewertokens.com/techniques/output-caps/): fits. Reshape results with toModelOutput in the Vercel AI SDK. - [Read web pages as text](https://usefewertokens.com/techniques/browser-snapshots/): fits. Text snapshots, or filtered web search and fetch on the Claude API. - [Run side tasks on a smaller model](https://usefewertokens.com/techniques/smaller-subagents/): fits. Route side tasks to a smaller model. - [Lower the effort setting](https://usefewertokens.com/techniques/effort/): fits. The effort parameter on the Claude API. - [Batch scheduled jobs](https://usefewertokens.com/techniques/batch/): fits. Message Batches API, 50% off. - [Keep instruction files short](https://usefewertokens.com/techniques/instruction-files/): partly. Keep the system prompt short. - [Measure what fills the window](https://usefewertokens.com/techniques/audit-commands/): partly. Log input tokens per request. ## Links - Optimizer set to Flue: https://usefewertokens.com/harnesses/flue/ - How to reduce AI agent token usage: https://www.stackone.com/blog/reduce-ai-agent-token-usage/ --- URL: https://usefewertokens.com/harnesses/claude-code/ # Reduce token usage in Claude Code > Claude Code already does 3 of the fixes for you, and 8 settings cut more. Agent type: using a coding agent. From Use Fewer Tokens, by StackOne. Last checked: 30 Nov 2026, against the vendor's own pages. ## What Claude Code already does - **Load tools when needed**: Tool search defers MCP tools (ENABLE_TOOL_SEARCH, auto:N to tune). ([source](https://code.claude.com/docs/en/mcp#scale-with-mcp-tool-search), read 30 Nov 2026) - **Prompt caching**: The prompt is cached for you; ENABLE_PROMPT_CACHING_1H=1 keeps it an hour on API keys. ([source](https://code.claude.com/docs/en/prompt-caching), read 30 Nov 2026) - **Clear old tool results**: Auto-compaction summarises old turns; CLAUDE_AUTOCOMPACT_PCT_OVERRIDE=50 makes it compact earlier. ([source](https://code.claude.com/docs/en/env-vars), read 30 Nov 2026) ## Settings that cut more in Claude Code - **Measure what fills the window**: /context, /usage, /skill-doctor, /doctor prompt-audit. ([source](https://code.claude.com/docs/en/commands), read 30 Nov 2026) - **Turn off tools you don't use**: /mcp to switch off servers you don't use; prefer CLIs such as gh over an MCP server. ([source](https://code.claude.com/docs/en/costs#reduce-mcp-server-overhead), read 30 Nov 2026) - **Let the agent run code over results** (experimental): CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1 (v2.1.323 or later, interactive terminal). ([source](https://code.claude.com/docs/en/code-mode), read 30 Nov 2026) - **Cap tool output**: MAX_MCP_OUTPUT_TOKENS (default 25,000) and BASH_MAX_OUTPUT_LENGTH (default 30,000 characters). ([source](https://code.claude.com/docs/en/env-vars), read 30 Nov 2026) - **Read web pages as text**: npm i -g agent-browser, then npx skills add vercel-labs/agent-browser. ([source](https://github.com/vercel-labs/agent-browser), read 30 Nov 2026) - **Keep instruction files short**: Keep CLAUDE.md under 200 lines; move detail into skills. ([source](https://code.claude.com/docs/en/memory), read 30 Nov 2026) - **Run side tasks on a smaller model**: model: haiku in the subagent's file, or CLAUDE_CODE_SUBAGENT_MODEL=haiku for all. ([source](https://code.claude.com/docs/en/env-vars), read 30 Nov 2026) - **Lower the effort setting**: /effort low for lookups, or CLAUDE_CODE_EFFORT_LEVEL=low. ([source](https://code.claude.com/docs/en/env-vars), read 30 Nov 2026) ## With StackOne - **Deep Query**: Add https://mcp.stackone.com/mcp, then ask in plain words - **Load tools when needed**: Add https://mcp.stackone.com/mcp; Advanced Tool Search is on by default - **Ask for fewer fields**: source on any _s1query call - **Keep live questions live**: Keep the live action next to the _s1query tool - **Tool Policies**: Tool Policies on the project ## Other techniques for coding agents - [Batch scheduled jobs](https://usefewertokens.com/techniques/batch/): not available. Interactive. ## Links - Optimizer set to Claude Code: https://usefewertokens.com/harnesses/claude-code/ - Claude Code on the MCP clients scorecard: https://mcpclients.dev/clients/claude-code/ - Connect Claude Code to StackOne: https://www.stackone.com/platform/mcp/ai-agent/claude-code/ - How to reduce AI agent token usage: https://www.stackone.com/blog/reduce-ai-agent-token-usage/ --- URL: https://usefewertokens.com/harnesses/cursor/ # Reduce token usage in Cursor > Cursor already does 2 of the fixes for you, and 2 settings cut more. Agent type: using a coding agent. From Use Fewer Tokens, by StackOne. Last checked: 30 Nov 2026, against the vendor's own pages. ## What Cursor already does - **Load tools when needed**: Dynamic context discovery gives the agent tool names and loads definitions from files. ([source](https://cursor.com/blog/dynamic-context-discovery), read 30 Nov 2026) - **Prompt caching**: Cursor caches the stable part of the prompt itself. ## Settings that cut more in Cursor - **Read web pages as text**: npm i -g agent-browser, then add "run agent-browser skills get core and follow it" to AGENTS.md. ([source](https://github.com/vercel-labs/agent-browser), read 30 Nov 2026) - **Keep instruction files short**: Keep each rule under 500 lines. ([source](https://cursor.com/docs/rules), read 30 Nov 2026) ## With StackOne - **Deep Query**: Add https://mcp.stackone.com/mcp, then ask in plain words - **Load tools when needed**: Add https://mcp.stackone.com/mcp; Advanced Tool Search is on by default - **Ask for fewer fields**: source on any _s1query call - **Keep live questions live**: Keep the live action next to the _s1query tool - **Tool Policies**: Tool Policies on the project ## Other techniques for coding agents - [Turn off tools you don't use](https://usefewertokens.com/techniques/fewer-tools/): fits. Disable servers and tools you don't use. - [Clear old tool results](https://usefewertokens.com/techniques/context-editing/): fits. /compact and automatic compaction. - [Cap tool output](https://usefewertokens.com/techniques/output-caps/): fits. MAX_MCP_OUTPUT_TOKENS, tool_output_token_limit. - [Run side tasks on a smaller model](https://usefewertokens.com/techniques/smaller-subagents/): fits. model: haiku in a Claude Code subagent. - [Measure what fills the window](https://usefewertokens.com/techniques/audit-commands/): fits. /context, /usage, /skill-doctor in Claude Code. - [Lower the effort setting](https://usefewertokens.com/techniques/effort/): fits. /effort in Claude Code. - [Prompt caching](https://usefewertokens.com/techniques/prompt-caching/): partly. The harness caches for you. - [Batch scheduled jobs](https://usefewertokens.com/techniques/batch/): not available. Interactive. ## Not offered in Cursor - **Let the agent run code over results**: Cursor has no code mode for MCP tools ([source](https://github.com/StackOneHQ/mcp-clients-scorecard/blob/main/EVIDENCE.md#cursor), read 30 Nov 2026) ## Links - Optimizer set to Cursor: https://usefewertokens.com/harnesses/cursor/ - Cursor on the MCP clients scorecard: https://mcpclients.dev/clients/cursor/ - Connect Cursor to StackOne: https://www.stackone.com/platform/mcp/ai-agent/cursor/ - How to reduce AI agent token usage: https://www.stackone.com/blog/reduce-ai-agent-token-usage/ --- URL: https://usefewertokens.com/harnesses/codex/ # Reduce token usage in Codex > Codex already does 3 of the fixes for you, and 7 settings cut more. Agent type: using a coding agent. From Use Fewer Tokens, by StackOne. Last checked: 30 Nov 2026, against the vendor's own pages. ## What Codex already does - **Load tools when needed**: Models with tool search defer MCP tools and find them with BM25. ([source](https://github.com/openai/codex/blob/6ff1e1ca3b30fc8b914720681fcf5fe62e95f856/codex-rs/core/src/tools/handlers/tool_search.rs#L171), read 30 Nov 2026) - **Clear old tool results**: Automatic compaction at the model's default threshold; model_auto_compact_token_limit moves it. ([source](https://learn.chatgpt.com/docs/config-file/config-reference), read 30 Nov 2026) - **Prompt caching**: Codex caches the stable part of the prompt itself. ## Settings that cut more in Codex - **Turn off tools you don't use**: enabled_tools or disabled_tools per MCP server; tool_input_schema_max_bytes trims long schemas (default 5,000). ([source](https://learn.chatgpt.com/docs/config-file/config-reference), read 30 Nov 2026) - **Let the agent run code over results** (experimental): [features.code_mode] enabled = true in config.toml. ([source](https://learn.chatgpt.com/docs/config-file/config-reference), read 30 Nov 2026) - **Cap tool output**: tool_output_token_limit. ([source](https://learn.chatgpt.com/docs/config-file/config-reference), read 30 Nov 2026) - **Read web pages as text**: npm i -g agent-browser, then add "run agent-browser skills get core and follow it" to AGENTS.md. ([source](https://github.com/vercel-labs/agent-browser), read 30 Nov 2026) - **Keep instruction files short**: project_doc_max_bytes. ([source](https://learn.chatgpt.com/docs/config-file/config-reference), read 30 Nov 2026) - **Run side tasks on a smaller model**: agents.default_subagent_model and agents.default_subagent_reasoning_effort in config.toml. ([source](https://learn.chatgpt.com/docs/config-file/config-reference), read 30 Nov 2026) - **Lower the effort setting**: model_reasoning_effort = "low" and model_verbosity = "low". ([source](https://learn.chatgpt.com/docs/config-file/config-reference), read 30 Nov 2026) ## With StackOne - **Deep Query**: Add https://mcp.stackone.com/mcp, then ask in plain words - **Load tools when needed**: Add https://mcp.stackone.com/mcp; Advanced Tool Search is on by default - **Ask for fewer fields**: source on any _s1query call - **Keep live questions live**: Keep the live action next to the _s1query tool - **Tool Policies**: Tool Policies on the project ## Other techniques for coding agents - [Measure what fills the window](https://usefewertokens.com/techniques/audit-commands/): fits. /context, /usage, /skill-doctor in Claude Code. - [Prompt caching](https://usefewertokens.com/techniques/prompt-caching/): partly. The harness caches for you. - [Batch scheduled jobs](https://usefewertokens.com/techniques/batch/): not available. Interactive. ## Links - Optimizer set to Codex: https://usefewertokens.com/harnesses/codex/ - Codex on the MCP clients scorecard: https://mcpclients.dev/clients/codex/ - Connect Codex to StackOne: https://www.stackone.com/platform/mcp/ai-agent/codex/ - How to reduce AI agent token usage: https://www.stackone.com/blog/reduce-ai-agent-token-usage/ --- URL: https://usefewertokens.com/harnesses/opencode/ # Reduce token usage in OpenCode > OpenCode already does 3 of the fixes for you, and 4 settings cut more. Agent type: using a coding agent. From Use Fewer Tokens, by StackOne. Last checked: 30 Nov 2026, against the vendor's own pages. ## What OpenCode already does - **Load tools when needed**: With Code Mode on, which it is by default for MCP servers, the model finds tools with search() instead of loading them all. ([source](https://github.com/anomalyco/opencode/releases/tag/v2.3.1), read 30 Nov 2026) - **Let the agent run code over results**: MCP servers run through Code Mode by default in OpenCode 2; "codemode": false on a server exposes its tools directly. ([source](https://opencode.ai/docs/mcp-servers/), read 30 Nov 2026) - **Prompt caching**: OpenCode caches the stable part of the prompt itself. ## Settings that cut more in OpenCode - **Turn off tools you don't use**: "disabled": true on an MCP server, or a deny permission for its tools. ([source](https://opencode.ai/docs/mcp-servers/), read 30 Nov 2026) - **Clear old tool results**: compaction: { auto: true, keep: { tokens: 15000 } } in opencode.json. ([source](https://opencode.ai/docs/config/), read 30 Nov 2026) - **Read web pages as text**: npm i -g agent-browser, then add "run agent-browser skills get core and follow it" to AGENTS.md. ([source](https://github.com/vercel-labs/agent-browser), read 30 Nov 2026) - **Run side tasks on a smaller model**: A subagent with its own model. ([source](https://opencode.ai/docs/agents/), read 30 Nov 2026) ## With StackOne - **Deep Query**: Add https://mcp.stackone.com/mcp, then ask in plain words - **Load tools when needed**: Add https://mcp.stackone.com/mcp; Advanced Tool Search is on by default - **Ask for fewer fields**: source on any _s1query call - **Keep live questions live**: Keep the live action next to the _s1query tool - **Tool Policies**: Tool Policies on the project ## Other techniques for coding agents - [Cap tool output](https://usefewertokens.com/techniques/output-caps/): fits. MAX_MCP_OUTPUT_TOKENS, tool_output_token_limit. - [Keep instruction files short](https://usefewertokens.com/techniques/instruction-files/): fits. CLAUDE.md under 200 lines; Cursor rules under 500. - [Measure what fills the window](https://usefewertokens.com/techniques/audit-commands/): fits. /context, /usage, /skill-doctor in Claude Code. - [Lower the effort setting](https://usefewertokens.com/techniques/effort/): fits. /effort in Claude Code. - [Prompt caching](https://usefewertokens.com/techniques/prompt-caching/): partly. The harness caches for you. - [Batch scheduled jobs](https://usefewertokens.com/techniques/batch/): not available. Interactive. ## Links - Optimizer set to OpenCode: https://usefewertokens.com/harnesses/opencode/ - OpenCode on the MCP clients scorecard: https://mcpclients.dev/clients/opencode/ - How to reduce AI agent token usage: https://www.stackone.com/blog/reduce-ai-agent-token-usage/ --- URL: https://usefewertokens.com/harnesses/chatgpt/ # Reduce token usage in ChatGPT > ChatGPT already does one of the fixes for you, and one setting cuts more. Agent type: using an enterprise assistant. From Use Fewer Tokens, by StackOne. Last checked: 30 Nov 2026, against the vendor's own pages. ## What ChatGPT already does - **Prompt caching**: ChatGPT caches the stable part of the prompt itself. ## Settings that cut more in ChatGPT - **Turn off tools you don't use**: Switch individual tools off on the app's details page in settings. ([source](https://developers.openai.com/api/docs/guides/custom-mcp-server), read 30 Nov 2026) ## With StackOne - **Load tools when needed**: Add https://mcp.stackone.com/mcp; it exposes 2 tools and finds the rest - **Deep Query**: Add https://mcp.stackone.com/mcp as one MCP server - **Ask for fewer fields**: source on any _s1query call - **Keep live questions live**: Keep the live action next to the _s1query tool - **Tool Policies**: Tool Policies on the project ## Other techniques for enterprise assistants - [Prompt caching](https://usefewertokens.com/techniques/prompt-caching/): partly. The vendor caches for you. - [Clear old tool results](https://usefewertokens.com/techniques/context-editing/): partly. Handled by the vendor. - [Read web pages as text](https://usefewertokens.com/techniques/browser-snapshots/): partly. The vendor's browsing tool decides. - [Keep instruction files short](https://usefewertokens.com/techniques/instruction-files/): partly. Keep agent instructions short. - [Cap tool output](https://usefewertokens.com/techniques/output-caps/): not available. No setting exposed. - [Run side tasks on a smaller model](https://usefewertokens.com/techniques/smaller-subagents/): not available. The vendor picks the model. - [Measure what fills the window](https://usefewertokens.com/techniques/audit-commands/): not available. No per-request view. - [Lower the effort setting](https://usefewertokens.com/techniques/effort/): not available. The vendor picks. - [Batch scheduled jobs](https://usefewertokens.com/techniques/batch/): not available. Interactive. ## Not offered in ChatGPT - **Load tools when needed**: ChatGPT loads every tool an app exposes up front; tool search is API-only ([source](https://github.com/StackOneHQ/mcp-clients-scorecard/blob/main/EVIDENCE.md#chatgpt), read 30 Nov 2026) - **Let the agent run code over results**: ChatGPT has no code mode for MCP tools ([source](https://github.com/StackOneHQ/mcp-clients-scorecard/blob/main/EVIDENCE.md#chatgpt), read 30 Nov 2026) ## Links - Optimizer set to ChatGPT: https://usefewertokens.com/harnesses/chatgpt/ - ChatGPT on the MCP clients scorecard: https://mcpclients.dev/clients/chatgpt/ - Connect ChatGPT to StackOne: https://www.stackone.com/platform/mcp/ai-agent/chatgpt/ - How to reduce AI agent token usage: https://www.stackone.com/blog/reduce-ai-agent-token-usage/ --- URL: https://usefewertokens.com/harnesses/copilot-studio/ # Reduce token usage in Microsoft Copilot Studio > Microsoft Copilot Studio already does one of the fixes for you, and one setting cuts more. Agent type: using an enterprise assistant. From Use Fewer Tokens, by StackOne. Last checked: 30 Nov 2026, against the vendor's own pages. ## What Microsoft Copilot Studio already does - **Prompt caching**: Microsoft Copilot Studio caches the stable part of the prompt itself. - **Tool cap**: Copilot Studio allows 128 tools per agent, and Microsoft suggests 25 to 30 for the best results. ([source](https://learn.microsoft.com/en-us/microsoft-copilot-studio/add-tools-custom-agent)) ## Settings that cut more in Microsoft Copilot Studio - **Turn off tools you don't use**: Keep 25 to 30 tools per agent. ([source](https://learn.microsoft.com/en-us/microsoft-copilot-studio/add-tools-custom-agent), read 30 Nov 2026) ## With StackOne - **Load tools when needed**: Add https://mcp.stackone.com/mcp; it exposes 2 tools and finds the rest - **Deep Query**: Add https://mcp.stackone.com/mcp as one MCP server - **Ask for fewer fields**: source on any _s1query call - **Keep live questions live**: Keep the live action next to the _s1query tool - **Tool Policies**: Tool Policies on the project ## Other techniques for enterprise assistants - [Prompt caching](https://usefewertokens.com/techniques/prompt-caching/): partly. The vendor caches for you. - [Clear old tool results](https://usefewertokens.com/techniques/context-editing/): partly. Handled by the vendor. - [Read web pages as text](https://usefewertokens.com/techniques/browser-snapshots/): partly. The vendor's browsing tool decides. - [Keep instruction files short](https://usefewertokens.com/techniques/instruction-files/): partly. Keep agent instructions short. - [Let the agent run code over results](https://usefewertokens.com/techniques/code-execution/): not available. Not offered in enterprise assistants. - [Cap tool output](https://usefewertokens.com/techniques/output-caps/): not available. No setting exposed. - [Run side tasks on a smaller model](https://usefewertokens.com/techniques/smaller-subagents/): not available. The vendor picks the model. - [Measure what fills the window](https://usefewertokens.com/techniques/audit-commands/): not available. No per-request view. - [Lower the effort setting](https://usefewertokens.com/techniques/effort/): not available. The vendor picks. - [Batch scheduled jobs](https://usefewertokens.com/techniques/batch/): not available. Interactive. ## Links - Optimizer set to Microsoft Copilot Studio: https://usefewertokens.com/harnesses/copilot-studio/ - Connect Microsoft Copilot Studio to StackOne: https://www.stackone.com/platform/mcp/ai-agent/m365-copilot/ - How to reduce AI agent token usage: https://www.stackone.com/blog/reduce-ai-agent-token-usage/ --- URL: https://usefewertokens.com/harnesses/gemini-enterprise/ # Reduce token usage in Gemini Enterprise > Gemini Enterprise already does one of the fixes for you, and one setting cuts more. Agent type: using an enterprise assistant. From Use Fewer Tokens, by StackOne. Last checked: 30 Nov 2026, against the vendor's own pages. ## What Gemini Enterprise already does - **Prompt caching**: Gemini Enterprise caches the stable part of the prompt itself. - **Tool cap**: Gemini Enterprise allows 100 enabled actions on a custom MCP server. ([source](https://docs.cloud.google.com/gemini/enterprise/docs/connectors/custom-mcp-server/set-up-custom-mcp-server)) ## Settings that cut more in Gemini Enterprise - **Turn off tools you don't use**: Enable only the actions the agent uses. ([source](https://docs.cloud.google.com/gemini/enterprise/docs/connectors/custom-mcp-server/set-up-custom-mcp-server), read 30 Nov 2026) ## With StackOne - **Load tools when needed**: Add https://mcp.stackone.com/mcp; it exposes 2 tools and finds the rest - **Deep Query**: Add https://mcp.stackone.com/mcp as one MCP server - **Ask for fewer fields**: source on any _s1query call - **Keep live questions live**: Keep the live action next to the _s1query tool - **Tool Policies**: Tool Policies on the project ## Other techniques for enterprise assistants - [Prompt caching](https://usefewertokens.com/techniques/prompt-caching/): partly. The vendor caches for you. - [Clear old tool results](https://usefewertokens.com/techniques/context-editing/): partly. Handled by the vendor. - [Read web pages as text](https://usefewertokens.com/techniques/browser-snapshots/): partly. The vendor's browsing tool decides. - [Keep instruction files short](https://usefewertokens.com/techniques/instruction-files/): partly. Keep agent instructions short. - [Let the agent run code over results](https://usefewertokens.com/techniques/code-execution/): not available. Not offered in enterprise assistants. - [Cap tool output](https://usefewertokens.com/techniques/output-caps/): not available. No setting exposed. - [Run side tasks on a smaller model](https://usefewertokens.com/techniques/smaller-subagents/): not available. The vendor picks the model. - [Measure what fills the window](https://usefewertokens.com/techniques/audit-commands/): not available. No per-request view. - [Lower the effort setting](https://usefewertokens.com/techniques/effort/): not available. The vendor picks. - [Batch scheduled jobs](https://usefewertokens.com/techniques/batch/): not available. Interactive. ## Links - Optimizer set to Gemini Enterprise: https://usefewertokens.com/harnesses/gemini-enterprise/ - Connect Gemini Enterprise to StackOne: https://www.stackone.com/platform/mcp/ai-agent/gemini-enterprise-assistant/ - How to reduce AI agent token usage: https://www.stackone.com/blog/reduce-ai-agent-token-usage/ --- URL: https://usefewertokens.com/harnesses/glean/ # Reduce token usage in Glean > Glean already does 2 of the fixes for you. Agent type: using an enterprise assistant. From Use Fewer Tokens, by StackOne. Last checked: 30 Nov 2026, against the vendor's own pages. ## What Glean already does - **Load tools when needed**: Tool search hands agents a small set of the MCP tools that fit each request. ([source](https://www.glean.com/blog/mcp-mar-drop-2026), read 30 Nov 2026) - **Prompt caching**: Glean caches the stable part of the prompt itself. ## With StackOne - **Load tools when needed**: Add https://mcp.stackone.com/mcp; it exposes 2 tools and finds the rest - **Deep Query**: Add https://mcp.stackone.com/mcp as one MCP server - **Ask for fewer fields**: source on any _s1query call - **Keep live questions live**: Keep the live action next to the _s1query tool - **Tool Policies**: Tool Policies on the project ## Other techniques for enterprise assistants - [Turn off tools you don't use](https://usefewertokens.com/techniques/fewer-tools/): fits. Copilot Studio and Gemini Enterprise cap tools per agent. - [Prompt caching](https://usefewertokens.com/techniques/prompt-caching/): partly. The vendor caches for you. - [Clear old tool results](https://usefewertokens.com/techniques/context-editing/): partly. Handled by the vendor. - [Read web pages as text](https://usefewertokens.com/techniques/browser-snapshots/): partly. The vendor's browsing tool decides. - [Keep instruction files short](https://usefewertokens.com/techniques/instruction-files/): partly. Keep agent instructions short. - [Let the agent run code over results](https://usefewertokens.com/techniques/code-execution/): not available. Not offered in enterprise assistants. - [Cap tool output](https://usefewertokens.com/techniques/output-caps/): not available. No setting exposed. - [Run side tasks on a smaller model](https://usefewertokens.com/techniques/smaller-subagents/): not available. The vendor picks the model. - [Measure what fills the window](https://usefewertokens.com/techniques/audit-commands/): not available. No per-request view. - [Lower the effort setting](https://usefewertokens.com/techniques/effort/): not available. The vendor picks. - [Batch scheduled jobs](https://usefewertokens.com/techniques/batch/): not available. Interactive. ## Links - Optimizer set to Glean: https://usefewertokens.com/harnesses/glean/ - Connect Glean to StackOne: https://www.stackone.com/platform/mcp/ai-agent/glean/ - How to reduce AI agent token usage: https://www.stackone.com/blog/reduce-ai-agent-token-usage/ --- URL: https://usefewertokens.com/harnesses/claude-ai/ # Reduce token usage in Claude > Claude already does 2 of the fixes for you. Agent type: using an enterprise assistant. From Use Fewer Tokens, by StackOne. Last checked: 30 Nov 2026, against the vendor's own pages. ## What Claude already does - **Load tools when needed**: Tool access "Auto" loads connectors as needed; "On demand" defers every connector. ([source](https://support.claude.com/en/articles/13730515-manage-claude-s-tool-access), read 30 Nov 2026) - **Prompt caching**: Claude caches the stable part of the prompt itself. ## With StackOne - **Load tools when needed**: Add https://mcp.stackone.com/mcp; it exposes 2 tools and finds the rest - **Deep Query**: Add https://mcp.stackone.com/mcp as one MCP server - **Ask for fewer fields**: source on any _s1query call - **Keep live questions live**: Keep the live action next to the _s1query tool - **Tool Policies**: Tool Policies on the project ## Other techniques for enterprise assistants - [Turn off tools you don't use](https://usefewertokens.com/techniques/fewer-tools/): fits. Copilot Studio and Gemini Enterprise cap tools per agent. - [Prompt caching](https://usefewertokens.com/techniques/prompt-caching/): partly. The vendor caches for you. - [Clear old tool results](https://usefewertokens.com/techniques/context-editing/): partly. Handled by the vendor. - [Read web pages as text](https://usefewertokens.com/techniques/browser-snapshots/): partly. The vendor's browsing tool decides. - [Keep instruction files short](https://usefewertokens.com/techniques/instruction-files/): partly. Keep agent instructions short. - [Cap tool output](https://usefewertokens.com/techniques/output-caps/): not available. No setting exposed. - [Run side tasks on a smaller model](https://usefewertokens.com/techniques/smaller-subagents/): not available. The vendor picks the model. - [Measure what fills the window](https://usefewertokens.com/techniques/audit-commands/): not available. No per-request view. - [Lower the effort setting](https://usefewertokens.com/techniques/effort/): not available. The vendor picks. - [Batch scheduled jobs](https://usefewertokens.com/techniques/batch/): not available. Interactive. ## Not offered in Claude - **Let the agent run code over results**: The Claude app has no code mode for MCP tools ([source](https://github.com/StackOneHQ/mcp-clients-scorecard/blob/main/EVIDENCE.md#claude-app), read 30 Nov 2026) ## Links - Optimizer set to Claude: https://usefewertokens.com/harnesses/claude-ai/ - Claude on the MCP clients scorecard: https://mcpclients.dev/clients/claude-app/ - Connect Claude to StackOne: https://www.stackone.com/platform/mcp/ai-agent/claude/ - How to reduce AI agent token usage: https://www.stackone.com/blog/reduce-ai-agent-token-usage/ --- URL: https://usefewertokens.com/harnesses/n8n/ # Reduce token usage in n8n > One setting cuts more. Agent type: using a workflow tool. From Use Fewer Tokens, by StackOne. Last checked: 30 Nov 2026, against the vendor's own pages. ## Settings that cut more in n8n - **Turn off tools you don't use**: MCP Client Tool: Tools to Include, "Selected". ([source](https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolmcp/), read 30 Nov 2026) ## With StackOne - **Load tools when needed**: MCP Client Tool pointed at https://mcp.stackone.com/mcp - **Keep live questions live**: Keep the live action next to the _s1query tool - **Deep Query**: MCP Client Tool pointed at https://mcp.stackone.com/mcp - **Ask for fewer fields**: source on any _s1query call - **Tool Policies**: Tool Policies on the project ## Other techniques for workflow tools - [Prompt caching](https://usefewertokens.com/techniques/prompt-caching/): partly. Depends on the model node. - [Cap tool output](https://usefewertokens.com/techniques/output-caps/): partly. Cap history and output in Make. - [Read web pages as text](https://usefewertokens.com/techniques/browser-snapshots/): partly. Fetch the page as text, not a screenshot. - [Keep instruction files short](https://usefewertokens.com/techniques/instruction-files/): partly. Keep the agent prompt short. - [Run side tasks on a smaller model](https://usefewertokens.com/techniques/smaller-subagents/): partly. Pick the model per node. - [Measure what fills the window](https://usefewertokens.com/techniques/audit-commands/): partly. Execution logs show each step. - [Lower the effort setting](https://usefewertokens.com/techniques/effort/): partly. Where the model node exposes it. - [Batch scheduled jobs](https://usefewertokens.com/techniques/batch/): partly. Scheduled runs only. - [Let the agent run code over results](https://usefewertokens.com/techniques/code-execution/): not available. Use a code step instead. - [Clear old tool results](https://usefewertokens.com/techniques/context-editing/): not available. Runs are short. ## Links - Optimizer set to n8n: https://usefewertokens.com/harnesses/n8n/ - How to reduce AI agent token usage: https://www.stackone.com/blog/reduce-ai-agent-token-usage/ --- URL: https://usefewertokens.com/harnesses/zapier/ # Reduce token usage in Zapier > One setting cuts more. Agent type: using a workflow tool. From Use Fewer Tokens, by StackOne. Last checked: 30 Nov 2026, against the vendor's own pages. ## Settings that cut more in Zapier - **Turn off tools you don't use**: 3 to 5 actions per agent. ([source](https://help.zapier.com/hc/en-us/articles/24593355420429-Best-practices-for-working-with-Zapier-Agents), read 30 Nov 2026) ## With StackOne - **Load tools when needed**: MCP Client Tool pointed at https://mcp.stackone.com/mcp - **Keep live questions live**: Keep the live action next to the _s1query tool - **Deep Query**: MCP Client Tool pointed at https://mcp.stackone.com/mcp - **Ask for fewer fields**: source on any _s1query call - **Tool Policies**: Tool Policies on the project ## Other techniques for workflow tools - [Prompt caching](https://usefewertokens.com/techniques/prompt-caching/): partly. Depends on the model node. - [Cap tool output](https://usefewertokens.com/techniques/output-caps/): partly. Cap history and output in Make. - [Read web pages as text](https://usefewertokens.com/techniques/browser-snapshots/): partly. Fetch the page as text, not a screenshot. - [Keep instruction files short](https://usefewertokens.com/techniques/instruction-files/): partly. Keep the agent prompt short. - [Run side tasks on a smaller model](https://usefewertokens.com/techniques/smaller-subagents/): partly. Pick the model per node. - [Measure what fills the window](https://usefewertokens.com/techniques/audit-commands/): partly. Execution logs show each step. - [Lower the effort setting](https://usefewertokens.com/techniques/effort/): partly. Where the model node exposes it. - [Batch scheduled jobs](https://usefewertokens.com/techniques/batch/): partly. Scheduled runs only. - [Let the agent run code over results](https://usefewertokens.com/techniques/code-execution/): not available. Use a code step instead. - [Clear old tool results](https://usefewertokens.com/techniques/context-editing/): not available. Runs are short. ## Links - Optimizer set to Zapier: https://usefewertokens.com/harnesses/zapier/ - How to reduce AI agent token usage: https://www.stackone.com/blog/reduce-ai-agent-token-usage/ --- URL: https://usefewertokens.com/harnesses/make/ # Reduce token usage in Make > One setting cuts more. Agent type: using a workflow tool. From Use Fewer Tokens, by StackOne. Last checked: 30 Nov 2026, against the vendor's own pages. ## Settings that cut more in Make - **Turn off tools you don't use**: Select only the MCP tools the agent needs; extra servers and tools raise token use. ([source](https://help.make.com/create-your-first-ai-agent), read 30 Nov 2026) ## With StackOne - **Load tools when needed**: MCP Client Tool pointed at https://mcp.stackone.com/mcp - **Keep live questions live**: Keep the live action next to the _s1query tool - **Deep Query**: MCP Client Tool pointed at https://mcp.stackone.com/mcp - **Ask for fewer fields**: source on any _s1query call - **Tool Policies**: Tool Policies on the project ## Other techniques for workflow tools - [Prompt caching](https://usefewertokens.com/techniques/prompt-caching/): partly. Depends on the model node. - [Cap tool output](https://usefewertokens.com/techniques/output-caps/): partly. Cap history and output in Make. - [Read web pages as text](https://usefewertokens.com/techniques/browser-snapshots/): partly. Fetch the page as text, not a screenshot. - [Keep instruction files short](https://usefewertokens.com/techniques/instruction-files/): partly. Keep the agent prompt short. - [Run side tasks on a smaller model](https://usefewertokens.com/techniques/smaller-subagents/): partly. Pick the model per node. - [Measure what fills the window](https://usefewertokens.com/techniques/audit-commands/): partly. Execution logs show each step. - [Lower the effort setting](https://usefewertokens.com/techniques/effort/): partly. Where the model node exposes it. - [Batch scheduled jobs](https://usefewertokens.com/techniques/batch/): partly. Scheduled runs only. - [Let the agent run code over results](https://usefewertokens.com/techniques/code-execution/): not available. Use a code step instead. - [Clear old tool results](https://usefewertokens.com/techniques/context-editing/): not available. Runs are short. ## Links - Optimizer set to Make: https://usefewertokens.com/harnesses/make/ - How to reduce AI agent token usage: https://www.stackone.com/blog/reduce-ai-agent-token-usage/ --- URL: https://usefewertokens.com/techniques/deep-query/ # Deep Query > Deep Query answers counts, filters and totals from a synced copy of a list action, so the agent gets one result instead of paging through every record. Data Sync keeps the copy fresh, and the agent calls the matching _s1query tool with a filter, the fields it needs and any aggregation. 33% to 74% fewer tokens per connector across 1,345 benchmark tasks; 0.3 s per read against 2.9 s per live call in production. ([source](https://www.stackone.com/platform/deep-query/#benchmark)) Family: Query instead of paging. A StackOne feature. ## Where it fits - **Building my own agent**: fits. Call the _s1query tool over MCP or the API. With StackOne: Data Sync on the list action, then list_tickets_s1query({ filter, source, aggs }). - **Using a coding agent**: fits. Through the Tool Gateway MCP. With StackOne: Add https://mcp.stackone.com/mcp, then ask in plain words. - **Using an enterprise assistant**: fits. Through the Tool Gateway MCP. With StackOne: Add https://mcp.stackone.com/mcp as one MCP server. - **Using a workflow tool**: partly (not confirmed). n8n's MCP Client Tool; Zapier and Make not confirmed. With StackOne: MCP Client Tool pointed at https://mcp.stackone.com/mcp. ## The setting in each harness ## Read more - [Deep Query in the StackOne docs](https://docs.stackone.com/optimize/deep-query) - [How to reduce AI agent token usage on large datasets](https://www.stackone.com/blog/reduce-ai-agent-token-usage/) --- URL: https://usefewertokens.com/techniques/load-tools-when-needed/ # Load tools when needed > Instead of sending every tool definition on every request, the agent sees a search tool and loads the few definitions a task needs. StackOne's Tool Gateway MCP does this with Advanced Tool Search, on by default; several harnesses also offer their own tool search for tools defined in code. Last checked: 30 Nov 2026, against the vendor's own pages. 3.8x cheaper per request than loading every tool, across 824 tasks; Anthropic reported over 85% fewer tool-definition tokens with its tool search. ([source](https://www.stackone.com/platform/tools-discovery/)) Family: Load fewer tools. A StackOne feature. ## Where it fits - **Building my own agent**: fits. Tool Gateway MCP, or the SDK's own tool search. With StackOne: Add https://mcp.stackone.com/mcp; Advanced Tool Search is on by default. - **Using a coding agent**: fits. Claude Code and Cursor do it by default. With StackOne: Add https://mcp.stackone.com/mcp; Advanced Tool Search is on by default. - **Using an enterprise assistant**: fits. One Tool Gateway MCP server exposes two tools. With StackOne: Add https://mcp.stackone.com/mcp; it exposes 2 tools and finds the rest. - **Using a workflow tool**: fits. One MCP server with Advanced Tool Search in n8n. With StackOne: MCP Client Tool pointed at https://mcp.stackone.com/mcp. ## The setting in each harness - [Claude API and Agent SDK](https://usefewertokens.com/harnesses/claude-api/): defer_loading: true on your tools, plus the tool_search_tool_bm25_20251119 tool ([source](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool), read 30 Nov 2026) - [OpenAI Responses and Agents SDK](https://usefewertokens.com/harnesses/openai/): defer_loading on your tools with the tool search tool (gpt-5.4 and later) ([source](https://developers.openai.com/api/docs/guides/tools-tool-search), read 30 Nov 2026) - [Vercel AI SDK](https://usefewertokens.com/harnesses/vercel-ai-sdk/): toolSearch() with deferLoading on your tools ([source](https://ai-sdk.dev/docs/ai-sdk-core/tool-search), read 30 Nov 2026) - [Mastra](https://usefewertokens.com/harnesses/mastra/): ToolSearchProcessor ([source](https://mastra.ai/reference/processors/tool-search-processor), read 30 Nov 2026) - [Pi](https://usefewertokens.com/harnesses/pi/): on by default, MCP tools default to codemode exposure, so scripts find them with searchTools() instead of every tool loading up front ([source](https://github.com/earendil-works/pi/blob/4a080252f06caf63a525d7873c5d94d3c23887e0/packages/coding-agent/docs/mcp.md#L195), read 30 Nov 2026) - [Claude Code](https://usefewertokens.com/harnesses/claude-code/): on by default, tool search defers MCP tools (ENABLE_TOOL_SEARCH, auto:N to tune) ([source](https://code.claude.com/docs/en/mcp#scale-with-mcp-tool-search), read 30 Nov 2026) - [Cursor](https://usefewertokens.com/harnesses/cursor/): on by default, dynamic context discovery gives the agent tool names and loads definitions from files ([source](https://cursor.com/blog/dynamic-context-discovery), read 30 Nov 2026) - [Codex](https://usefewertokens.com/harnesses/codex/): on by default, models with tool search defer MCP tools and find them with BM25 ([source](https://github.com/openai/codex/blob/6ff1e1ca3b30fc8b914720681fcf5fe62e95f856/codex-rs/core/src/tools/handlers/tool_search.rs#L171), read 30 Nov 2026) - [OpenCode](https://usefewertokens.com/harnesses/opencode/): on by default, With Code Mode on, which it is by default for MCP servers, the model finds tools with search() instead of loading them all ([source](https://github.com/anomalyco/opencode/releases/tag/v2.3.1), read 30 Nov 2026) - [ChatGPT](https://usefewertokens.com/harnesses/chatgpt/): not offered. ChatGPT loads every tool an app exposes up front; tool search is API-only ([source](https://github.com/StackOneHQ/mcp-clients-scorecard/blob/main/EVIDENCE.md#chatgpt), read 30 Nov 2026) - [Glean](https://usefewertokens.com/harnesses/glean/): on by default, tool search hands agents a small set of the MCP tools that fit each request ([source](https://www.glean.com/blog/mcp-mar-drop-2026), read 30 Nov 2026) - [Claude](https://usefewertokens.com/harnesses/claude-ai/): on by default, tool access "Auto" loads connectors as needed; "On demand" defers every connector ([source](https://support.claude.com/en/articles/13730515-manage-claude-s-tool-access), read 30 Nov 2026) ## Read more - [Advanced Tool Search in the StackOne docs](https://docs.stackone.com/optimize/advanced-tool-search) - [Anthropic's tool search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool) --- URL: https://usefewertokens.com/techniques/fewer-tools/ # Turn off tools you don't use > Every enabled tool costs tokens on every request where definitions load up front, and a long tool list makes the right one harder to pick. Most harnesses let you switch off whole servers or single tools, and several enterprise assistants cap how many tools one agent can hold. Last checked: 30 Nov 2026, against the vendor's own pages. Family: Load fewer tools. ## Where it fits - **Building my own agent**: fits. Filter the tool list per step. - **Using a coding agent**: fits. Disable servers and tools you don't use. - **Using an enterprise assistant**: fits. Copilot Studio and Gemini Enterprise cap tools per agent. - **Using a workflow tool**: fits. Zapier suggests 3 to 5 actions per agent. ## The setting in each harness - [OpenAI Responses and Agents SDK](https://usefewertokens.com/harnesses/openai/): tool_filter on the MCP server, with cache_tools_list ([source](https://openai.github.io/openai-agents-python/mcp), read 30 Nov 2026) - [Vercel AI SDK](https://usefewertokens.com/harnesses/vercel-ai-sdk/): prepareStep returning activeTools ([source](https://ai-sdk.dev/docs/agents/loop-control), read 30 Nov 2026) - [Claude Code](https://usefewertokens.com/harnesses/claude-code/): /mcp to switch off servers you don't use; prefer CLIs such as gh over an MCP server ([source](https://code.claude.com/docs/en/costs#reduce-mcp-server-overhead), read 30 Nov 2026) - [Codex](https://usefewertokens.com/harnesses/codex/): enabled_tools or disabled_tools per MCP server; tool_input_schema_max_bytes trims long schemas (default 5,000) ([source](https://learn.chatgpt.com/docs/config-file/config-reference), read 30 Nov 2026) - [OpenCode](https://usefewertokens.com/harnesses/opencode/): "disabled": true on an MCP server, or a deny permission for its tools ([source](https://opencode.ai/docs/mcp-servers/), read 30 Nov 2026) - [ChatGPT](https://usefewertokens.com/harnesses/chatgpt/): Switch individual tools off on the app's details page in settings ([source](https://developers.openai.com/api/docs/guides/custom-mcp-server), read 30 Nov 2026) - [Microsoft Copilot Studio](https://usefewertokens.com/harnesses/copilot-studio/): Keep 25 to 30 tools per agent ([source](https://learn.microsoft.com/en-us/microsoft-copilot-studio/add-tools-custom-agent), read 30 Nov 2026) - [Gemini Enterprise](https://usefewertokens.com/harnesses/gemini-enterprise/): Enable only the actions the agent uses ([source](https://docs.cloud.google.com/gemini/enterprise/docs/connectors/custom-mcp-server/set-up-custom-mcp-server), read 30 Nov 2026) - [n8n](https://usefewertokens.com/harnesses/n8n/): MCP Client Tool: Tools to Include, "Selected" ([source](https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolmcp/), read 30 Nov 2026) - [Zapier](https://usefewertokens.com/harnesses/zapier/): 3 to 5 actions per agent ([source](https://help.zapier.com/hc/en-us/articles/24593355420429-Best-practices-for-working-with-Zapier-Agents), read 30 Nov 2026) - [Make](https://usefewertokens.com/harnesses/make/): Select only the MCP tools the agent needs; extra servers and tools raise token use ([source](https://help.make.com/create-your-first-ai-agent), read 30 Nov 2026) ## Read more - [Why agent accuracy drops as tool count grows](https://www.stackone.com/blog/agent-tool-count-ceiling/) - [Adding tools to a Copilot Studio agent](https://learn.microsoft.com/en-us/microsoft-copilot-studio/add-tools-custom-agent) --- URL: https://usefewertokens.com/techniques/field-selection/ # Ask for fewer fields > A live list action returns whole records, so a question about two fields still reads every field. Deep Query's source parameter returns only the fields the answer needs, which keeps large lists out of the context window. The saving depends on how wide the records are. One benchmark list went from 1.33M tokens to 18.9K for the same correct answer. ([source](https://www.stackone.com/blog/reduce-ai-agent-token-usage/)) Family: Return less. A StackOne feature. ## Where it fits - **Building my own agent**: fits. source on any _s1query call. With StackOne: source on any _s1query call, listing only the fields the answer uses. - **Using a coding agent**: fits. source on any _s1query call. With StackOne: source on any _s1query call. - **Using an enterprise assistant**: fits. source on any _s1query call. With StackOne: source on any _s1query call. - **Using a workflow tool**: partly (not confirmed). Where the workflow calls _s1query. With StackOne: source on any _s1query call. ## The setting in each harness ## Read more - [Choosing fields with Deep Query](https://docs.stackone.com/optimize/deep-query) - [Response filtering in MCP token optimization](https://www.stackone.com/blog/mcp-token-optimization/#mcp-response-filtering-reduce-tool-output-tokens) --- URL: https://usefewertokens.com/techniques/keep-live/ # Keep live questions live > Synced data reflects the last sync, so a question about the provider's state this minute, or a single record you already know, belongs on the live action. Keep both tools available and let the agent choose per question; for one known record, the live call is already the shortest path. Family: Query instead of paging. A StackOne feature. ## Where it fits - **Building my own agent**: fits. Keep the live action next to the query tool. With StackOne: Keep the live action next to the _s1query tool. - **Using a coding agent**: fits. Keep the live action next to the query tool. With StackOne: Keep the live action next to the _s1query tool. - **Using an enterprise assistant**: fits. Keep the live action next to the query tool. With StackOne: Keep the live action next to the _s1query tool. - **Using a workflow tool**: fits. Keep the live action next to the query tool. With StackOne: Keep the live action next to the _s1query tool. ## The setting in each harness ## Read more - [When the agent should still call the live action](https://www.stackone.com/blog/reduce-ai-agent-token-usage/#when-should-the-agent-still-call-the-live-action) --- URL: https://usefewertokens.com/techniques/prompt-caching/ # Prompt caching > When every run opens with the same tools and system prompt, the model provider can cache that prefix and bill repeat reads at a fraction of the input price. Put stable content first and changing content last, so the cached prefix survives from one run to the next. Last checked: 30 Nov 2026, against the vendor's own pages. Cache hits bill at $0.20 per million tokens on Claude Opus 5.5 and $0.10 on Sonnet 5.5 (0.05x their input price), and $0.01 on Haiku 5.5 (0.1x). ([source](https://platform.claude.com/docs/en/about-claude/pricing)) Family: Pay less per token. ## Where it fits - **Building my own agent**: fits. cache_control on the Claude API; automatic on OpenAI. - **Using a coding agent**: partly. The harness caches for you. - **Using an enterprise assistant**: partly. The vendor caches for you. - **Using a workflow tool**: partly (not confirmed). Depends on the model node. ## The setting in each harness - [Claude API and Agent SDK](https://usefewertokens.com/harnesses/claude-api/): cache_control: {"type": "ephemeral"} after the tools and system prompt ([source](https://platform.claude.com/docs/en/build-with-claude/prompt-caching), read 30 Nov 2026) - [OpenAI Responses and Agents SDK](https://usefewertokens.com/harnesses/openai/): on by default, long, repeated prefixes are cached automatically; keep the prefix stable ([source](https://developers.openai.com/api/docs/guides/prompt-caching), read 30 Nov 2026) - [Claude Code](https://usefewertokens.com/harnesses/claude-code/): on by default, the prompt is cached for you; ENABLE_PROMPT_CACHING_1H=1 keeps it an hour on API keys ([source](https://code.claude.com/docs/en/prompt-caching), read 30 Nov 2026) ## Read more - [Anthropic's prompt caching guide](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) - [OpenAI's prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) --- URL: https://usefewertokens.com/techniques/code-execution/ # Let the agent run code over results > When a task chains many tool calls, the agent can write a short program that calls the tools and returns only the final result, so intermediate results stay out of context. Anthropic and OpenAI call it programmatic tool calling; Pi runs it by default, OpenCode runs its MCP tools through it by default, and Claude Code and Codex have an experimental code mode. Last checked: 30 Nov 2026, against the vendor's own pages. Anthropic reported 37% fewer tokens, and no gain on flows of one or two calls. ([source](https://platform.claude.com/docs/en/agents-and-tools/tool-use/programmatic-tool-calling)) Family: Query instead of paging. ## Where it fits - **Building my own agent**: fits. Programmatic tool calling on the Claude and OpenAI APIs; Pi codemode. - **Using a coding agent**: partly. Experimental in Claude Code and Codex, on by default in OpenCode. - **Using an enterprise assistant**: not available. Not offered in enterprise assistants. - **Using a workflow tool**: not available. Use a code step instead. ## The setting in each harness - [Claude API and Agent SDK](https://usefewertokens.com/harnesses/claude-api/): code_execution_20260120 with allowed_callers on your tools ([source](https://platform.claude.com/docs/en/agents-and-tools/tool-use/programmatic-tool-calling), read 30 Nov 2026) - [OpenAI Responses and Agents SDK](https://usefewertokens.com/harnesses/openai/): The programmatic_tool_calling tool, with allowed_callers: ["programmatic"] on your tools ([source](https://developers.openai.com/api/docs/guides/tools-programmatic-tool-calling), read 30 Nov 2026) - [Pi](https://usefewertokens.com/harnesses/pi/): on by default, MCP tools default to codemode exposure: the model calls them from one script instead of one call per tool ([source](https://github.com/earendil-works/pi/blob/4a080252f06caf63a525d7873c5d94d3c23887e0/packages/coding-agent/docs/mcp.md#L195), read 30 Nov 2026) - [Claude Code](https://usefewertokens.com/harnesses/claude-code/): CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1 (v2.1.323 or later, interactive terminal) ([source](https://code.claude.com/docs/en/code-mode), read 30 Nov 2026) - [Cursor](https://usefewertokens.com/harnesses/cursor/): not offered. Cursor has no code mode for MCP tools ([source](https://github.com/StackOneHQ/mcp-clients-scorecard/blob/main/EVIDENCE.md#cursor), read 30 Nov 2026) - [Codex](https://usefewertokens.com/harnesses/codex/): [features.code_mode] enabled = true in config.toml ([source](https://learn.chatgpt.com/docs/config-file/config-reference), read 30 Nov 2026) - [OpenCode](https://usefewertokens.com/harnesses/opencode/): on by default, MCP servers run through Code Mode by default in OpenCode 2; "codemode": false on a server exposes its tools directly ([source](https://opencode.ai/docs/mcp-servers/), read 30 Nov 2026) - [ChatGPT](https://usefewertokens.com/harnesses/chatgpt/): not offered. ChatGPT has no code mode for MCP tools ([source](https://github.com/StackOneHQ/mcp-clients-scorecard/blob/main/EVIDENCE.md#chatgpt), read 30 Nov 2026) - [Claude](https://usefewertokens.com/harnesses/claude-ai/): not offered. The Claude app has no code mode for MCP tools ([source](https://github.com/StackOneHQ/mcp-clients-scorecard/blob/main/EVIDENCE.md#claude-app), read 30 Nov 2026) ## Read more - [MCP code mode: keeping tool responses out of context](https://www.stackone.com/blog/mcp-code-mode-agent-context-architecture/) - [Code Mode in Claude Code](https://code.claude.com/docs/en/code-mode) - [OpenAI's Programmatic Tool Calling](https://developers.openai.com/api/docs/guides/tools-programmatic-tool-calling) --- URL: https://usefewertokens.com/techniques/context-editing/ # Clear old tool results > Long sessions keep every earlier tool result in context, and most of it is never read again. Context editing drops stale tool results as the conversation grows, and compaction summarises older turns. Both keep long runs inside the window without starting over. Last checked: 30 Nov 2026, against the vendor's own pages. Family: Return less. ## Where it fits - **Building my own agent**: fits. Context editing and compaction on the Claude API. - **Using a coding agent**: fits. /compact and automatic compaction. - **Using an enterprise assistant**: partly. Handled by the vendor. - **Using a workflow tool**: not available. Runs are short. ## The setting in each harness - [Claude API and Agent SDK](https://usefewertokens.com/harnesses/claude-api/): context_management with clear_tool_uses_20250919, or server-side compaction ([source](https://platform.claude.com/docs/en/build-with-claude/context-editing), read 30 Nov 2026) - [OpenAI Responses and Agents SDK](https://usefewertokens.com/harnesses/openai/): context_management: [{ type: "compaction", compact_threshold }] on Responses requests ([source](https://developers.openai.com/api/docs/guides/compaction), read 30 Nov 2026) - [Pi](https://usefewertokens.com/harnesses/pi/): /compact, and the compaction settings for automatic compaction ([source](https://github.com/earendil-works/pi/blob/4a080252f06caf63a525d7873c5d94d3c23887e0/packages/coding-agent/docs/compaction.md), read 30 Nov 2026) - [Claude Code](https://usefewertokens.com/harnesses/claude-code/): on by default, auto-compaction summarises old turns; CLAUDE_AUTOCOMPACT_PCT_OVERRIDE=50 makes it compact earlier ([source](https://code.claude.com/docs/en/env-vars), read 30 Nov 2026) - [Codex](https://usefewertokens.com/harnesses/codex/): on by default, automatic compaction at the model's default threshold; model_auto_compact_token_limit moves it ([source](https://learn.chatgpt.com/docs/config-file/config-reference), read 30 Nov 2026) - [OpenCode](https://usefewertokens.com/harnesses/opencode/): compaction: { auto: true, keep: { tokens: 15000 } } in opencode.json ([source](https://opencode.ai/docs/config/), read 30 Nov 2026) ## Read more - [Why AI agents kill their own context windows](https://www.stackone.com/blog/agent-suicide-by-context/) - [Effective context engineering for AI agents, from Anthropic](https://www.anthropic.com/research/effective-context-engineering-for-ai-agents) --- URL: https://usefewertokens.com/techniques/output-caps/ # Cap tool output > A single chatty tool response can fill the window. Coding agents and SDKs let you cap how many tokens one tool result may return, or reshape the result before the model sees it, so one broad list call can't crowd out the rest of the task. Last checked: 30 Nov 2026, against the vendor's own pages. Family: Return less. ## Where it fits - **Building my own agent**: fits. Reshape results with toModelOutput in the Vercel AI SDK. - **Using a coding agent**: fits. MAX_MCP_OUTPUT_TOKENS, tool_output_token_limit. - **Using an enterprise assistant**: not available. No setting exposed. - **Using a workflow tool**: partly (not confirmed). Cap history and output in Make. ## The setting in each harness - [Vercel AI SDK](https://usefewertokens.com/harnesses/vercel-ai-sdk/): toModelOutput on the tool ([source](https://ai-sdk.dev/docs/ai-sdk-core/tools-and-tool-calling), read 30 Nov 2026) - [Claude Code](https://usefewertokens.com/harnesses/claude-code/): MAX_MCP_OUTPUT_TOKENS (default 25,000) and BASH_MAX_OUTPUT_LENGTH (default 30,000 characters) ([source](https://code.claude.com/docs/en/env-vars), read 30 Nov 2026) - [Codex](https://usefewertokens.com/harnesses/codex/): tool_output_token_limit ([source](https://learn.chatgpt.com/docs/config-file/config-reference), read 30 Nov 2026) ## Read more - [MCP output limits in Claude Code](https://code.claude.com/docs/en/mcp) - [Codex configuration reference](https://learn.chatgpt.com/docs/config-file/config-reference) --- URL: https://usefewertokens.com/techniques/browser-snapshots/ # Read web pages as text > An agent that browses by screenshot or by reading raw HTML pays for every pixel and tag. Open-source tools such as agent-browser and Playwright return the page as compact text with a ref per element. On the Claude API, web search and fetch can filter results in code first. Last checked: 30 Nov 2026, against the vendor's own pages. Family: Return less. ## Where it fits - **Building my own agent**: fits. Text snapshots, or filtered web search and fetch on the Claude API. - **Using a coding agent**: fits. agent-browser or Playwright CLI with a skill. - **Using an enterprise assistant**: partly (not confirmed). The vendor's browsing tool decides. - **Using a workflow tool**: partly (not confirmed). Fetch the page as text, not a screenshot. ## The setting in each harness - [Claude API and Agent SDK](https://usefewertokens.com/harnesses/claude-api/): web_search_20260318 and web_fetch_20260318 filter results in code before they enter context ([source](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool#dynamic-filtering), read 30 Nov 2026) - [Pi](https://usefewertokens.com/harnesses/pi/): npm i -g agent-browser, then add "run agent-browser skills get core and follow it" to AGENTS.md ([source](https://github.com/vercel-labs/agent-browser), read 30 Nov 2026) - [Claude Code](https://usefewertokens.com/harnesses/claude-code/): npm i -g agent-browser, then npx skills add vercel-labs/agent-browser ([source](https://github.com/vercel-labs/agent-browser), read 30 Nov 2026) - [Cursor](https://usefewertokens.com/harnesses/cursor/): npm i -g agent-browser, then add "run agent-browser skills get core and follow it" to AGENTS.md ([source](https://github.com/vercel-labs/agent-browser), read 30 Nov 2026) - [Codex](https://usefewertokens.com/harnesses/codex/): npm i -g agent-browser, then add "run agent-browser skills get core and follow it" to AGENTS.md ([source](https://github.com/vercel-labs/agent-browser), read 30 Nov 2026) - [OpenCode](https://usefewertokens.com/harnesses/opencode/): npm i -g agent-browser, then add "run agent-browser skills get core and follow it" to AGENTS.md ([source](https://github.com/vercel-labs/agent-browser), read 30 Nov 2026) ## Read more - [agent-browser, from Vercel Labs](https://github.com/vercel-labs/agent-browser) - [Playwright CLI with skills, from Microsoft](https://github.com/microsoft/playwright-cli) - [Dynamic filtering in Anthropic's web fetch tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool#dynamic-filtering) --- URL: https://usefewertokens.com/techniques/instruction-files/ # Keep instruction files short > Instruction files such as CLAUDE.md and Cursor rules load into every session, so every line is paid for on every run. Keep them short, move detail into skills or docs the agent opens when needed, and check what loads at the start of a session. Last checked: 30 Nov 2026, against the vendor's own pages. Family: Load fewer tools. ## Where it fits - **Building my own agent**: partly. Keep the system prompt short. - **Using a coding agent**: fits. CLAUDE.md under 200 lines; Cursor rules under 500. - **Using an enterprise assistant**: partly. Keep agent instructions short. - **Using a workflow tool**: partly. Keep the agent prompt short. ## The setting in each harness - [Claude Code](https://usefewertokens.com/harnesses/claude-code/): Keep CLAUDE.md under 200 lines; move detail into skills ([source](https://code.claude.com/docs/en/memory), read 30 Nov 2026) - [Cursor](https://usefewertokens.com/harnesses/cursor/): Keep each rule under 500 lines ([source](https://cursor.com/docs/rules), read 30 Nov 2026) - [Codex](https://usefewertokens.com/harnesses/codex/): project_doc_max_bytes ([source](https://learn.chatgpt.com/docs/config-file/config-reference), read 30 Nov 2026) ## Read more - [How Claude Code loads CLAUDE.md](https://code.claude.com/docs/en/memory) - [Rules in Cursor](https://cursor.com/docs/rules) --- URL: https://usefewertokens.com/techniques/smaller-subagents/ # Run side tasks on a smaller model > Searching, reading files and summarising rarely need a frontier model. Coding agents let a subagent run on a smaller, cheaper model and hand back only its conclusion, which keeps both the bill and the main context smaller. Last checked: 30 Nov 2026, against the vendor's own pages. Family: Pay less per token. ## Where it fits - **Building my own agent**: fits. Route side tasks to a smaller model. - **Using a coding agent**: fits. model: haiku in a Claude Code subagent. - **Using an enterprise assistant**: not available. The vendor picks the model. - **Using a workflow tool**: partly. Pick the model per node. ## The setting in each harness - [Claude Code](https://usefewertokens.com/harnesses/claude-code/): model: haiku in the subagent's file, or CLAUDE_CODE_SUBAGENT_MODEL=haiku for all ([source](https://code.claude.com/docs/en/env-vars), read 30 Nov 2026) - [Codex](https://usefewertokens.com/harnesses/codex/): agents.default_subagent_model and agents.default_subagent_reasoning_effort in config.toml ([source](https://learn.chatgpt.com/docs/config-file/config-reference), read 30 Nov 2026) - [OpenCode](https://usefewertokens.com/harnesses/opencode/): A subagent with its own model ([source](https://opencode.ai/docs/agents/), read 30 Nov 2026) ## Read more - [Custom subagents in Claude Code](https://code.claude.com/docs/en/sub-agents) --- URL: https://usefewertokens.com/techniques/audit-commands/ # Measure what fills the window > Before changing anything, look at what fills the context window. Claude Code shows it per source with /context, ranks skills by context cost against use with /skill-doctor, and suggests fixes from /usage. Measure again after each change, on the same tasks. Last checked: 30 Nov 2026, against the vendor's own pages. Family: Measure and govern. ## Where it fits - **Building my own agent**: partly. Log input tokens per request. - **Using a coding agent**: fits. /context, /usage, /skill-doctor in Claude Code. - **Using an enterprise assistant**: not available. No per-request view. - **Using a workflow tool**: partly. Execution logs show each step. ## The setting in each harness - [Claude Code](https://usefewertokens.com/harnesses/claude-code/): /context, /usage, /skill-doctor, /doctor prompt-audit ([source](https://code.claude.com/docs/en/commands), read 30 Nov 2026) ## Read more - [Where your agent's tokens actually go](https://www.stackone.com/blog/where-agent-tokens-actually-go/) - [Managing costs in Claude Code](https://code.claude.com/docs/en/costs) --- URL: https://usefewertokens.com/techniques/effort/ # Lower the effort setting > Reasoning effort sets how much the model thinks before answering. Retrieval and counting tasks rarely need high effort, so lowering it cuts output tokens and latency. Check completion on your own tasks before and after, because a cheaper failed run costs more than a dearer successful one. Last checked: 30 Nov 2026, against the vendor's own pages. Family: Pay less per token. ## Where it fits - **Building my own agent**: fits. The effort parameter on the Claude API. - **Using a coding agent**: fits. /effort in Claude Code. - **Using an enterprise assistant**: not available. The vendor picks. - **Using a workflow tool**: partly (not confirmed). Where the model node exposes it. ## The setting in each harness - [Claude API and Agent SDK](https://usefewertokens.com/harnesses/claude-api/): effort: "low" for high-volume or latency-sensitive work (the default is high, or medium on Opus 5.5 and Haiku 5.5) ([source](https://platform.claude.com/docs/en/build-with-claude/effort), read 30 Nov 2026) - [OpenAI Responses and Agents SDK](https://usefewertokens.com/harnesses/openai/): reasoning.effort: "low" for routine calls; lower effort favors speed and fewer tokens ([source](https://developers.openai.com/api/docs/guides/reasoning), read 30 Nov 2026) - [Claude Code](https://usefewertokens.com/harnesses/claude-code/): /effort low for lookups, or CLAUDE_CODE_EFFORT_LEVEL=low ([source](https://code.claude.com/docs/en/env-vars), read 30 Nov 2026) - [Codex](https://usefewertokens.com/harnesses/codex/): model_reasoning_effort = "low" and model_verbosity = "low" ([source](https://learn.chatgpt.com/docs/config-file/config-reference), read 30 Nov 2026) ## Read more - [Why cost per task replaced price per token](https://www.stackone.com/blog/cost-per-task-model-pricing/) - [Anthropic's effort parameter](https://platform.claude.com/docs/en/build-with-claude/effort) --- URL: https://usefewertokens.com/techniques/batch/ # Batch scheduled jobs > Jobs nobody waits on, such as nightly reports, can go through a batch API at a discount in exchange for a slower turnaround. It suits scheduled workflows, not an assistant answering a person. Last checked: 30 Nov 2026, against the vendor's own pages. Anthropic's Message Batches API bills at 50% of standard prices. ([source](https://platform.claude.com/docs/en/build-with-claude/batch-processing)) Family: Pay less per token. ## Where it fits - **Building my own agent**: fits. Message Batches API, 50% off. - **Using a coding agent**: not available. Interactive. - **Using an enterprise assistant**: not available. Interactive. - **Using a workflow tool**: partly (not confirmed). Scheduled runs only. ## The setting in each harness - [Claude API and Agent SDK](https://usefewertokens.com/harnesses/claude-api/): Message Batches API: 50 percent off for work that can wait up to 24 hours ([source](https://platform.claude.com/docs/en/build-with-claude/batch-processing), read 30 Nov 2026) ## Read more - [Anthropic's batch processing guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing) - [OpenAI's Batch API guide](https://developers.openai.com/api/docs/guides/batch) --- URL: https://usefewertokens.com/techniques/tool-policies/ # Tool Policies > Tool Policies narrow which actions an agent can call and which fields it can read, per project. Fewer allowed actions means fewer definitions to load and fewer wrong turns. Rules apply to synced reads too: a refused action's copy is refused, and withheld fields are masked. Family: Measure and govern. A StackOne feature. ## Where it fits - **Building my own agent**: fits. Per project in StackOne. With StackOne: Tool Policies on the project. - **Using a coding agent**: fits. Per project in StackOne. With StackOne: Tool Policies on the project. - **Using an enterprise assistant**: fits. Per project in StackOne. With StackOne: Tool Policies on the project. - **Using a workflow tool**: fits. Per project in StackOne. With StackOne: Tool Policies on the project. ## The setting in each harness ## Read more - [Tool Policies in the StackOne docs](https://docs.stackone.com/secure/policies)