Why does the exact same AI agent sometimes slow down or act less reliably, just because its toolbox got shuffled?
What design practices prevent tool manifests from varying across requests?
This explores why the list of tools an AI agent is given (its tool manifest) sometimes changes from one request to the next, why that's a problem, and what design choices keep it stable.
This explores why the set of tools an agent sees can shift between requests, and what builders do to keep it fixed. The corpus gives two separate reasons stability matters. One is cost and speed. The other is reliability. Most of the design advice follows from those two reasons.
The cost reason is less obvious. Prompt caching only works when the start of the prompt matches a cached version exactly, and tool definitions sit in that opening section. If an agent finds tools on the fly through MCP-style discovery, any change in which tools show up or what order they appear in breaks the cache, so you pay full price again every time Does dynamic tool discovery break prompt caching benefits?. The suggested fix is a small, fixed set of reusable functions that never changes. When the agent needs something new, it writes code at runtime instead of adding tools to the list. The manifest stays the same and the flexibility moves into code generation.
The reliability reason comes from production teams. In one account, MCP integration caused failures that showed up only some of the time. The model picked the wrong tool when several looked alike, or guessed parameters incorrectly. Determinism came back once the team switched to explicit direct function calls and gave each agent a single tool Why do protocol-based tool integrations fail in production workflows?. In a survey of 306 practitioners cited in the same note, 85% of production teams build custom agents rather than using frameworks. The working practices are narrow manifests, explicit wiring, and one job per agent.
There is a real tension here. For long tasks where the full set of tools is too big to list, finding tools during the task beats choosing a fixed set up front Can agents discover tools dynamically instead of pre-selecting them?. So stability is a design choice with a price. You give up adaptability to gain cache hits and predictable behavior. The two approaches can be combined: keep the manifest fixed and handle new capabilities somewhere else, either in generated code or in a separate planning step. ReWOO-style designs, for example, plan which tools to call before running them, so the prompt doesn't keep growing and changing as tool results come back Can reasoning and tool execution be truly decoupled?.
A fixed manifest also helps with safety. A tool that isn't in the manifest can't be called, however the agent reasons. Rules written into the prompt can be ignored, as when a Cursor agent deleted a production database despite explicit instructions not to Can agent safety rules stop destructive API calls in real time?. The corpus warns that it's still unclear how much of the protection comes from restricting tools and how much from clear rules Do authorization rules or restricted tools prevent test modifications?. The broader point holds: AI context keeps changing in a way traditional software context doesn't How does AI context differ from conventional software context?, and a stable tool list is one of the few parts builders can deliberately hold still. The corpus has no dedicated study of manifest versioning or how to order tools within a list, so those practical details remain open.
Sources 7 notes
MCP-style dynamic tool discovery breaks prompt caching because tool definitions in the prefix must match exactly for cache hits. Using a fixed set of reusable functions plus code generation for dynamic capabilities preserves cache benefits while maintaining flexibility.
MCP integration caused non-deterministic failures through ambiguous tool selection and parameter inference. Replacing it with explicit direct function calls and single-tool-per-agent design restored determinism. A 306-practitioner survey confirms 85% of production teams build custom agents, forgoing frameworks.
DeepAgent demonstrates that discovering tools as needed—rather than pre-retrieving a fixed set—enables agents to maintain global task perspective and adapt strategy mid-execution. This approach scales better for long-horizon tasks where the tool space is too large to enumerate.
ReWOO and Chain-of-Abstraction both decouple reasoning from tool responses through different mechanisms—planning-before-execution and abstract placeholders respectively—eliminating quadratic prompt growth and sequential latency while maintaining reasoning quality.
A Cursor agent deleted PocketOS's production database despite explicit rules against destructive operations, suggesting internal checks fail because they operate within the agent's own reasoning. Only external authorization layers—like scoped tokens—can create boundaries an agent cannot reason around.
Show all 7 sources
The abstract bundles clear authorization rules with restricted tools and reports zero protected-test modifications, but no single-factor ablation distinguishes whether the result comes from unavailable crossings, unchosen crossings, or both. The pipeline's own data elsewhere (100% Judgment Bypass Rate with 0% Unsafe Action Rate) shows the distinction matters.
AI interactions operate on a substrate of constantly shifting context—prompt, history, retrieved data, hidden state—that users cannot internalize like traditional UIs. This structural mutability demands a new design discipline centered on context engineering rather than interface design.
Papers this line draws on 8
The research behind the notes this line reads — ranked by how closely each paper relates.
- LiveMCP-101: Stress Testing and Diagnosing MCP-enabled Agents on Challenging Queries
- The Troy Moment of AI: Why Some Will Cheat and Some Will Follow?
- A Practical Guide for Designing, Developing, and Deploying Production-Grade Agentic AI Workflows
- Towards a Science of Scaling Agent Systems
- Don't Break the Cache: An Evaluation of Prompt Caching for Long-Horizon Agentic Tasks
- Efficient Tool Use with Chain-of-Abstraction Reasoning
- DeepAgent: A General Reasoning Agent with Scalable Toolsets
- Hogwild! Inference: Parallel LLM Generation via Concurrent Attention