Instruction Surface Area and Prompt Design for Auditable Agents
Larger, well-structured prompts enable auditors to trace where agent behavior comes from.

Instruction surface area shapes how well an agent’s behavior can be understood, traced, and audited after the fact. Prompt design is therefore a reliability decision. The goal is not to make the instruction surface as small as possible, but to give every layer a clear role, a recorded version, and a place in the trace.
Why instruction surface area is the wrong thing to minimize
Short, simple prompts have an understandable appeal. Fewer instructions seem easier to keep up to date and less likely to clash. But an agent still has to make decisions when clear guidance is removed. It leaves more of those decisions to the model’s interpretation, while giving an auditor less evidence of what should have happened.
The better objective is to expand explicit guidance where needed and structure it so that each contribution can be inspected. An agent acts on the interaction of its instruction layers. The same input can lead to different tool calls, data access patterns, and outputs from one run to the next. The instructions behind those differences must be isolatable regardless of whether the prompt fits within a smaller block of text.
Where agents actually take their instructions from, and why each source is also a failure surface
Instruction surface area includes every natural-language directive an agent acts on at runtime, including the system prompt, tool descriptions, retrieved context, memory injections, and user turns. Each source can shape behavior, and each is therefore a possible failure or attack vector. Without controls built for the task, there is no reliable way to tell natural-language data apart from natural-language instructions. Their placement in context does not, by itself, establish their authority.
The system prompt supplies the role, goal, constraints, output format, stop criteria, and escalation logic. Developers control this layer most directly, but a wall of prose makes individual requirements difficult to inspect. Tool descriptions govern how and when the agent calls external capabilities. When similar tools have no when-not-to-use clause, the model has to use its own judgment to choose because it has no explicit rule to follow.
Retrieved context brings in outside material for the agent to base decisions on, but has no built-in way to tell facts apart from adversarial instructions hidden in that material. Memory injections carry state from earlier sessions, so poisoned content can shape how the agent reasons later in ways a single-turn monitor cannot see. User turns supply immediate task instructions, but external content can imitate that authority. The resulting map is not merely a catalog of inputs, but a map of where intent can change.
How silent failures — not crashes — expose the real cost of unstructured prompts
A crash announces that something went wrong. An agent that returns a success code while pursuing the wrong objective may announce nothing. Microsoft’s original April 2025 taxonomy distinguished security failures involving confidentiality, availability, or integrity from safety failures affecting responsible AI implementation. Differing quality of service between users without explicit instructions is a safety failure, for example. Monitoring built for the latter category alone does not cover the former.
The GitHub MCP indirect injection in May 2025 shows the consequence of confusing external content with authorized direction. An agent with elevated repository access processed a public GitHub Issue containing instructions to exfiltrate private repository code. The attack succeeded because the agent could not distinguish those instructions from legitimate direction, and no control evaluated the intent behind the tool call before execution. A well-formed call was not evidence of a legitimate action.
The postmark-mcp npm supply-chain attack in September 2025 exposed another route to silent deviation. Several versions built trust before a later version added a line that blind-carbon-copied every outgoing email to an address the attacker controlled. An injected agent can use its tools to take action as well as produce objectionable text. These failures share a structural precondition, namely instruction surfaces that were not designed to be audited.
What the updated failure taxonomy reveals about which prompt layers break most often
The Microsoft AI Red Team’s April 2026 v2.0 taxonomy grew the list of failure modes from 27 to 34. Its extended programme of red team engagements against deployed agentic systems informed seven new categories, driven by the adoption of open-source agentic frameworks, the MCP ecosystem, and computer-use agents. The taxonomy makes the patterns classifiable, although it does not establish a frequency ranking for prompt layers. Three new categories have a direct bearing on how instruction surfaces are designed.
Agentic Supply Chain Compromise covers cases where a compromised component injects natural-language instructions that change what the agent does without changing a binary. Goal Hijacking describes instructions that appear compatible with legitimate task completion but redirect the terminal goal. The first concerns the provenance of directives.
MCP / Plugin Abuse covers poisoned tool descriptions, server-injected instructions, and one server overriding another. Microsoft’s 2026 financial workflow scenario demonstrates how modified tool metadata can redirect behavior as effectively as a system prompt change. Session Context Contamination adds a separate failure mode for session context, while memory poisoning and theft was already a category. Together, these categories locate failures in instruction origin, goal preservation, tool authority, and carried state, giving design work specific targets.
Modularity as the design property that makes a prompt auditable
Those targets become addressable when instructions exist as discrete, inspectable components. A modular system prompt separates its role and goal from constraints, tool instructions, output requirements, and examples. Error handling, reflection, memory, escalation, stop criteria, and safety can likewise have named places. Each component must be independently editable, testable, and identifiable in the artifact used for a run.
This separation makes the specification itself available for diagnosis. A wrong tool call can reflect a misunderstood task, but it can also reflect a missing selection rule. If a tool description has no when-not-to-use clause despite overlapping capabilities elsewhere, the trace alone cannot establish which explanation applies. A module that an auditor can inspect lets them check whether the guidance the agent needed was there at all.
Ambiguity handling exposes the same distinction between faulty execution and an incomplete specification. An agent that silently interprets an ambiguous requirement may be acting within the discretion left by its instructions. A standing directive to surface ambiguities as questions changes that discretion into an explicit decision rule. The resulting behavior can then be assessed against a stated requirement rather than an expectation reconstructed after the failure.
Treating tool descriptions as first-class instruction artifacts, not documentation
Tool descriptions need the same governance as system prompts because agents use them to decide what to do. Microsoft’s 2026 MCP tool-description poisoning case makes this equivalence concrete. The tool name and user-facing summary remained unchanged while the natural-language metadata read by the agent was silently modified. A human reviewer could see what appeared to be a formatting update while the agent received a different directive.
The AliveMCP Q2 2026 audit of 196 healthy servers found that a sizable share had a tools/list canonical-JSON hash change over a short time. Downstream agents had already cached stale definitions. Their calls either failed visibly or quietly took a “no tools match” path that produced well-formed-but-wrong output. Server health therefore did not establish that the agent held the current tool definition.
These cases support concrete authoring and versioning practices. Tool descriptions should be versioned with the system prompt rather than held in a registry without change tracking. Tools with overlapping capabilities need explicit when-not-to-use clauses. Hash-checking tools/list at initialization and warning when the live schema differs from the cache makes drift detectable. MCP server-injected instructions also need a clear trust boundary in the architecture, because descriptive metadata can cause harm even when it sits outside the system prompt.
How retrieved context and memory injections extend the instruction surface into territory teams rarely audit
The same governance problem extends to retrieved content and memory, where control over incoming material is weaker. Neither layer has to be intended as instruction to influence reasoning or tool selection. A retrieved chunk can hide a directive in information that seems relevant. A memory injection can carry that influence into a later session. An audit of only the static prompt leaves both routes out of the record needed to explain what the agent did.
Every retrieved chunk and memory injection that enters the context window should therefore have its own label and be a separate input in the trace. These artifacts need the same first-class treatment as other parts that carry instructions, with their versions recorded and the artifacts captured outside the agent. Putting them all into an opaque context blob makes it impossible to look at them separately to find which input carried a directive. The trace must preserve what reached the agent, rather than depend on the agent to identify the source of its own failure.
That capture also requires an explicit instruction boundary. Retrieved content should be treated as data to reason about, with verification required before following any instructions it contains. External telemetry must record retrieval artifacts and memory inputs independently of the agent’s account of them. These design properties make investigation possible, but they matter operationally only if monitoring is built to use them.
What monitoring infrastructure needs to see, given a well-structured instruction surface
An auditable instruction surface is necessary for effective monitoring, but it is not sufficient. Monitoring must capture each layer as a discrete, labeled span and connect it to the relevant behavior. What the agent says it did may differ from what occurred at a tool call, retrieval step, or memory injection point.
A telemetry contract defines the required external record. It specifies which state transitions, tool-call outcomes, and decision points must be captured independently of self-reporting. Modular prompts provide identifiable requirements, while the contract specifies the evidence needed to assess execution against them. Without both, a trace can show activity without showing whether the activity complied with the task.
Plan and execution also need separate spans. The plan-vs-execute divergence fingerprint points to indirect prompt injection at the plan layer when the planner chooses one sequence of tools and the executor runs another. An undifferentiated sequence of tool calls cannot expose that contrast. The distinction matters because completed actions alone do not reveal whether execution departed from the plan.
The support-ticket agent that was wrong one in fourteen times for nine days illustrates the cost of monitoring outcomes without intent. Detecting such failures requires auditing traces against the agent’s instructions and grouping deviations into actionable patterns. Monitoring should surface failures in Slack and connect to coding agents so investigation and fixes remain in the developer’s workflow. A separate console that is checked less often cannot compensate for failures that accumulate quietly.
The practical design checklist that follows from treating prompt structure as a reliability decision
Apply version control, review, and testing to every prompt layer as an ongoing practice. For the system prompt, separate role, goal, constraints, tool instructions, output format, stop criteria, escalation, and ambiguity handling into named modules. Make each module separately editable and testable. Spell out the stop criteria, including max iterations, cost caps, and repeated-state detection. Require the agent to ask when something is ambiguous before it acts.
For tool descriptions, couple versioning with the system prompt and record changes. Add a when-not-to-use clause wherever a sibling tool has overlapping capability. Compare the live tools/list hash with the cached definition at initialization and surface differences as warnings. Treat MCP server-injected instructions as untrusted by default, with the trust boundary stated in the architecture.
For retrieved context and memory, keep each artifact that comes in as its own labeled span. Maintain the instruction boundary that keeps retrieved content in the role of data unless its directions have been verified. Before deployment, define the telemetry contract for external capture of state transitions, tool outcomes, and decision points. Keep plan-layer and execution-layer output separate, then audit the resulting traces against the instructions.
These practices make prompt design part of the operating discipline of the agent. As capabilities change, the specification and its evidence must change together. The deliberate structure of instruction surface area is the foundation that lets other reliability controls determine what the agent should have done, what it actually did, and where the two diverged.
Sources
- New whitepaper outlines the taxonomy of failure modes in AI agents
- Updating the taxonomy of failure modes in agentic AI systems: What a year of red teaming taught us
- Silent Failure in LLM Agent Systems: The Entropy Principle and the Inevitable Disorder of Autonomous Agents
- Model or Harness? An Interaction-Centric Taxonomy for Localizing Agent Failures


