Lecture 5 · COMS W4995 Agentic Engineering

Agent tools in pictures

Chapter ten

What is still open

Five questions the field has not settled; for each, what the sources establish, what nobody has published, why it matters for a tool you build now, and what evidence would settle it.

After this chapter you can

  1. For each open question, separate what the sources establish from what has not been published.
  2. Explain why each question matters for a tool you would build now, such as your Studio tool server.
  3. Name the evidence that would settle one of the questions, and say why weaker evidence would not.

14 minutes to read6 sections5 quiz questions

Start reading →

Your Studio tool server works. The agent finds the right tool, fills in the arguments, and gets an answer back. Then you ask five plain questions about it, and the sources in this book cannot fully answer any of them. Did a timed-out write run? Has a tool you approved changed since? Who decided that a call could run without asking? Does the skill you wrote still help the next model? Whose identity is the agent using? This chapter takes each question in four parts: what is known, what has not been published, why it matters for you now, and what evidence would settle it. Knowing where the evidence stops is part of your judgment.

Section 10.1

Did the call run? There is still no standard answer

Four stages of the "did it run?" question. In 1984 Birrell and Nelson state that after a failed call the procedure ran once or not at all and the caller is not told which. In 1988 Sun RPC lets a server choose to remember transaction IDs for some degree of at-most-once execution. Today MCP offers idempotentHint, a hint that clients must treat as untrusted. As of October 2026 the vendor tool-calling guides give no retry guidance. The question is still open. What each step offered the caller 1984 Birrell and Nelson: after a failed call it ran once or not at all, and the caller is not told which 1988 Sun RPC: a server may choose to remember transaction IDs, for "some degree" of at-most-once MCP idempotentHint: a claim the server makes about itself; clients must treat it as untrusted, and it is not enforcement Guides OpenAI, Anthropic and Google tool-calling guides, October 2026: no guidance on a call that may already have run
Forty years of partial answers. Each step gave the caller something, and none of them closed the question.

Your agent calls create_ticket. The call times out. The harness or the model tries again. Does this create one ticket or two?

Chapter 1 traced this question back to 1984. When a remote call fails, the procedure “will have been invoked either once or not at all—the user is not told which”4. Four years later, Sun’s RPC offered servers a partial fix: a server “may choose to remember this ID after executing a call and not execute calls with the same ID in order to achieve some degree of execute-at-most-once semantics”3. The server can choose to use this, and it gets some protection. Nothing forces it to.

MCP’s answer is a hint. An MCP tool can advertise idempotentHint, one of four hints about its behavior2. A hint is the server describing itself. The specification says clients “MUST consider tool annotations to be untrusted unless they come from trusted servers”1, and the maintainers are blunt: annotations “aren’t enforcement”2. The tools page of the MCP specification (version 2026-07-28), as read for this book, describes no mechanism that requires a server to refuse a repeated call1. As of October 2026, the tool-calling guides from OpenAI, Anthropic, and Google say nothing about what to do when a call may have already run or may run twice5,6,7,8.

What is unpublished, then, is a shared rule: a protocol field or vendor practice that makes a retried tool call safe by construction. Until one exists, the safety of every retry lives in the code of each tool. For your Studio tool server, this means any tool that writes. If create_ticket accepts a request ID and refuses a second call with the same ID, you have rebuilt Sun RPC’s 1988 trick yourself. If it does not, a retry may create a duplicate, and nothing upstream will stop it.

What would settle the question? A tool protocol or vendor API that defines a request identifier the server must honor, and tests that inject a timeout after a write has landed and count the duplicates. A longer list of hints would not settle it, because you cannot check a hint. Chapter 6’s section on whether a call ran goes deeper into the mechanics.

Check yourselfYour create_ticket tool advertises idempotentHint: true. A call times out. Can the host retry it safely?

Not based on the hint. The hint is the server’s own claim, untrusted unless the server is trusted1, and annotations “aren’t enforcement”2. A safe retry needs the server to actually refuse duplicates, for example by remembering a request ID, the way Sun RPC described3.

Section 10.2

Descriptions can be swapped, and the hints cannot stop it

A rug pull and how pinning notices it. On Monday the user approves a tool whose description hashes to 3f9a, and the host stores that hash. On Thursday the server sends a new description that hashes to c71e. The host compares the two hashes, sees they differ, and can ask the user again. The hash shows that the text changed, not whether the new text is malicious. A readOnlyHint the server sends is only a claim and cannot stop the swap. Monday: approved search_docs "Search the team wiki." stored hash: 3f9a Thursday: sent now search_docs a different description hash now: c71e same name Compare: 3f9a is not c71e so the host can ask the user again A hash tells you the text changed. It does not tell you whether the new text is harmful. readOnlyHint: true travels with the description: it is the server's claim, not a lock.
Pinning stores a hash of each approved description, so a later change shows up as a mismatch. It flags the change; it does not judge it.

On Monday, you read and approve the description of a third-party tool called search_docs. On Thursday, the server sends a different description with the same name. Does anyone ask for your approval again?

Anthropic’s guide to custom connectors says: “Server developers may update tool behavior unexpectedly, leading to unintended or malicious behavior.”10. Invariant Labs gives the pattern a name, the rug pull: “Unauthorized changes to MCP tool descriptions after initial user approval”9. Their scanner, MCP-Scan, pins installed tools by “tracking changes via tool hashing”, which “allows users to detect changes to tool descriptions”9. OWASP’s list for agentic applications sorts the cases. Manipulating a legitimate tool’s interface, such as “MCP tool descriptors, schemas, metadata”, counts as tool misuse; only a tool that is “malicious or compromised at the source” counts as a supply-chain problem11.

The hints from the previous section do not help here because they travel with the description. “An untrusted server can lie.”2. A server that swaps its description can also swap its readOnlyHint in the same message.

Be precise about the gap. The sources in this book describe the attack, name it, and detail one detection tool. They do not say how often descriptions are swapped in practice. They neither report nor rule out a rug pull seen in the wild. The MCP-Scan launch post describes how pinning works, and says the scanner also uses Invariant’s Guardrails API “to identify malicious instructions”, but it gives no detection or false-alarm rate for either9. A hash only tells you that text changed. A harmless typo fix and a hidden instruction both produce the same mismatch.

This matters now because every third-party server you connect to can change after you approve it. Your own Studio tool server can change for its users in the same way. The cheapest defense you control is to remember what you approved and to ask for re-approval when it changes.

What would settle this? We need documented cases showing how they were found, or a count across real servers. We also need measured detection and false-alarm rates for pinning on real traffic. Finally, a protocol rule would help, requiring a host to re-ask the user whenever a description changes. That last point would turn a habit into a guarantee. Chapter 6 treats lying descriptions as part of the trust boundary.

Check yourselfYour host shows each tool’s description once, at approval. What is the smallest change that would let you notice a later swap, and what would it miss?

Store a hash of each approved description and compare it every time the server lists its tools. MCP-Scan’s pinning works this way9. This will catch any change to the text. However, it cannot tell you if the new text is harmful, so a flagged change still requires a person to read it.

Section 10.3

Provider-run loops: their defaults become yours

Default permission policies in Claude Managed Agents by toolset kind. The pre-built agent toolset defaults to always_allow and runs without confirmation. MCP toolsets default to always_ask and pause for approval. Custom tools sit outside the permission policies because your application runs them. The auto policy, in which the server evaluates each call, is accepted by both server toolsets but is the default for none. How the auto evaluator decides, and how often it errs, is not published. Toolset kind Default policy What happens Pre-built agent toolset always_allow runs, no confirmation MCP toolsets always_ask pauses for approval Custom tools outside the policies your code decides auto the server evaluates each call: run, deny or pause accepted by both server toolsets; the default for none how it decides, and how often it errs: not published
In one product, three toolset kinds start from three different places, and the policy that judges each call has no published error rate.

You move your agent onto a provider’s hosted loop. Your own code used to decide whether a call ran. Who decides now?

Chapter 1 showed that large providers sell the loop as a product. OpenAI’s Agents API “enables Programmatic Tool Calling by default and manages the agent loop for you”13. Claude Managed Agents documents its permission defaults in detail, so we will use it as a worked example. Its defaults differ by toolset kind: “the agent toolset defaults to always_allow, and MCP toolsets default to always_ask“12. Custom tools “are executed by your application and controlled by you, so they are not governed by permission policies”12. A third policy, auto, has the server evaluate each call, and “No toolset uses auto by default.”12. Under auto, the evaluation considers the tool, the input, and the session so far, so “the server can treat two calls to the same tool differently”12.

So a provider-run loop is neither permissive nor strict in general: one product starts three kinds of tool in three different places.

Now look at what Anthropic’s page does not say. It does not explain how the auto evaluator decides, or how often it gets a call wrong, and it gives no reason for the different defaults of the two server toolsets12. For auto, the page does state one rule about whose words count. When it evaluates a call, the server “does not read intent from a tool result, a fetched webpage, an MCP server’s response, or a message between session threads”12. But if you relay untrusted end-user text in your own messages, the server “reads that input as your intent too”12.

This matters now because when someone else runs the loop, their defaults are part of your system’s behavior until you change them. For each tool, you should be able to state which policy applies. If you choose auto, you are trusting a judge whose error rate you cannot look up.

What would settle this: a published evaluation of the evaluator. This evaluation would include how often it allows a call it should have stopped and stops a call it should have allowed, on a stated set of tasks. It would also include the reasoning behind each default. Chapter 6’s section on gates in code compares these policies with other harnesses.

Check yourselfYou attach an MCP toolset and a custom issue_refund tool to a Managed Agents session and change nothing. Which calls pause for your approval?

The MCP toolset’s calls, which default to always_ask12. issue_refund is not governed by the permission policies at all; your application runs it, so any approval step is yours to build12. Calls to the pre-built agent toolset run without asking12.

Section 10.4

Skills help or hurt, depending on the model

What the skill studies measured. In SkillsBench the average pass rate across 18 model and harness configurations rose from 33.9 percent without skills to 50.5 percent with curated skills, but the gain per configuration ranged from 4.1 to 25.7 points, and skills still hurt on 13 of the 87 tasks. In a separate study, GPT-5.1 on tau-bench scored 62.6 percent with and without a skill library. SkillsBench · average 33.9% 50.5% no skills → curated skills; 18 configurations, 87 tasks Underneath the average gain per configuration: +4.1 to +25.7 points skills still hurt on 13 of 87 tasks A separate study · GPT-5.1 on τ-bench 62.6% 62.6% no gain from a skill library curated on a different benchmark
A healthy average with a wide spread underneath, and a strong model that gained nothing.

Last month, you wrote a skill that improved your agent. This month, a new model ships. Should you keep using that skill?

Chapter 4’s section on skill evidence gave the numbers; here is what they leave open. SkillsBench ran 87 tasks under 18 model–harness configurations14. “Curated Skills raise the average pass rate from 33.9% to 50.5% (+16.6 percentage points; 25.5% normalized gain), with configuration-level gains ranging from +4.1 to +25.7 pp.”14. CMU’s slide on the same benchmark adds: “Skills still hurt on 13 of 87 tasks.”15. A June 2026 paper, “Not All Skills Help”, found that “individual skills routinely help on some task types while hurting on others”16, and reports GPT-5.1 on τ-bench at “62.6%→62.6%” with a skill library curated on a different benchmark16. Its authors put the limit on “the model’s baseline competence on the target domain”16. OpenAI, writing about its GPT-6 Astra model, warns that “Guidance that helps Sol or Luna may overconstrain GPT-6 Astra”17.

The evidence is also split on where the gain comes from, and the SkillsBench authors say so themselves: “observed gains could partly reflect ‘more context’ rather than procedural structure”14. Against that, their self-generated condition “suggests that model-authored procedural text does not reproduce the curated-Skills gain”14. So, is a skill useful because of its procedure, or because it adds more text to the context? We should keep both interpretations open; the evidence does not yet choose between them.

What has not been published is the question you actually face: whether one skill continues to help after a model upgrade. None of the studies in this book follows the same skill from one model generation to the next. SkillsBench compares many configurations at one point in time. OpenAI’s warning comes as advice, not as a measurement.

This matters now because skills outlive the model they were written for. “Repository skills also guide other contributors’ agents, which may use different models.”17. Any skill in your Studio repository will be read by whatever model a teammate happens to run.

To settle this, you would run the same tasks with and without the skill on each new model. You would look task by task, not only at the average. Add a control with the same amount of unrelated text. This would help you tell if the gain comes from the procedure or from extra context. If repeated across a few model upgrades, that would answer the question for your tasks.

Check yourselfA teammate argues that SkillsBench proved skills add 16.6 points, so every workflow should get a skill. Which facts from the same evidence push back against this claim?

The 16.6 points is an average; gains ranged from +4.1 to +25.7 by configuration14. Skills still hurt on 13 of the 87 tasks15. And the authors themselves say part of the gain could be “more context” rather than procedure14.

Section 10.5

Whose identity does the agent use?

Your Studio tool server runs a nightly job. It reads customer records and files a summary. No one is at the keyboard. What credentials does it use?

The sources offer answers borrowed from how people and services already sign in. Sierra splits the work: “Interactive work runs as the user. Scheduled or shared workflows run as service accounts with only the permissions they need.”19. Its automations that touch customer data must also declare “which customers and tools they’re allowed to access before they ever run”19. MCP’s enterprise-managed authorization moves access decisions to the company’s identity provider: “Instead of each employee authorizing each MCP server individually, the organization’s IT or security team manages access policies in one place.”20. Revoking an employee there takes effect “immediately across all MCP clients”20. Anthropic’s connectors show the risk of a shortcut: “Claude inherits each person’s permissions from the connected service”, but “Custom connectors that use a shared credential reach whatever that credential can access.”18.

Notice what all these answers have in common. The agent borrows an identity: a person’s, a service account’s, or a shared credential. Even the question of whose intent counts is settled by the channel words arrive on; under its auto policy, Managed Agents treats relayed end-user text as the developer’s intent12. None of the sources in this book treats the agent as a principal, an actor with its own identity and credentials, separate from the person or job that started it. Whether it should be one, so that a log can distinguish an action the agent took on an analyst’s behalf from one the analyst took directly, is an open question. Chapter 7’s section on two identities covers the patterns in use today.

This matters now because a nightly job that runs with your personal token keeps your access for as long as the token is valid. A shared credential widens every user’s reach to whatever that credential can access. Both are easy to set up and hard to notice later.

What would settle it: an identity mechanism that issues credentials to an agent as its own principal, scoped to a task and revocable independently. We would also need reports from deployments showing that audit logs and revocation actually work with it.

Check yourselfYour nightly job uses a connector with a shared credential. A user who cannot see a certain record in the source system triggers the job. Can the job reach that record?

Possibly yes. A shared credential reaches whatever that credential can access, not what the triggering user can see18. Sierra’s pattern avoids this: scheduled work runs as a service account with only the permissions it needs, and declares its customers and tools before it runs19.

Before you go on

Close the book

  1. Pick one write tool on your Studio tool server. Without looking back at your notes, write the four parts for “did it run?”: what is known, what is unpublished, why it matters for that tool, and what evidence would settle it.
  2. For each of the five questions, name the single piece of evidence that would most change how you build. Then explain why a weaker piece of evidence, such as another warning or another hint, would not settle it.
  3. Apply the course’s ruler, “If the model were 10x better, would this still matter?”21, to each question. Which questions survive this test?

Chapter ten · quiz

Test yourself

Most questions have more than one right answer, so select every option that is true. Check each question, then open “Answer and why” for the reasoning.

Question 1Which statements about the “did it run?” question are established by the sources, rather than open?Select all that apply.
Answer and why
  • RightBirrell and Nelson wrote in 1984 that after a failed call the procedure ran once or not at all, and the caller is not told which. That is their stated call semantics4.
  • RightSun RPC let a server remember transaction IDs to get some degree of at-most-once execution. RFC 1057 describes this as something a server “may choose” to do3.
  • WrongMCP’s idempotentHint guarantees that a host can retry a call safely. Annotations are hints that clients must treat as untrusted unless the server is trusted, and they are not enforcement1,2.
  • RightAs of October 2026, the OpenAI, Anthropic and Google tool-calling guides say nothing about calls that may already have run. A search of each guide found no such guidance5,6,7,8.
  • WrongVendors have published a shared rule that makes retried tool calls safe. This is exactly what is missing; the guides are silent on retries5,7.
Question 2You run an agent on Claude Managed Agents with the pre-built agent toolset, an MCP toolset for your CRM, and a custom issue_refund tool. You change no settings. Which statements are true?Select all that apply.
Answer and why
  • RightCalls to the pre-built agent toolset run without confirmation. The agent toolset defaults to always_allow12.
  • RightCalls to the CRM’s MCP toolset pause for approval. MCP toolsets default to always_ask12.
  • Wrongissue_refund is judged by the auto evaluator. Custom tools are executed by your application and are not governed by permission policies12.
  • Wrongauto is the default for MCP toolsets. No toolset uses auto by default12.
  • WrongYou can look up how often the auto evaluator wrongly allows a call. Anthropic’s page does not say how the evaluator decides or how often it errs12.
Question 3What does the evidence on skills support?Select all that apply.
Answer and why
  • RightCurated skills raised the average pass rate by 16.6 points across 18 configurations on 87 tasks. That is SkillsBench’s headline result14.
  • WrongEvery configuration gained about the same amount. Configuration-level gains ranged from +4.1 to +25.7 points14.
  • WrongSkills written by the models themselves reproduced the curated gain. The authors report that model-authored procedural text does not reproduce the curated-skills gain14.
  • RightOne skill can help on some task types and hurt on others. “Not All Skills Help” found this pattern across skill libraries16.
  • RightOpenAI warns that guidance written for one model may overconstrain another. Its GPT-6 Astra post says so directly17.
  • WrongSkills always help strong models. GPT-5.1 on τ-bench showed no gain, 62.6% with and without a skill library curated on a different benchmark16.
Question 4Which pieces of evidence would actually help settle whether tool descriptions are swapped after approval, and whether pinning catches it?Select all that apply.
Answer and why
  • RightDocumented cases of a description changed after approval, with how each was found. The sources describe the attack but report neither how often it happens nor any case seen in the wild; cases would answer that.
  • RightMeasured detection and false-alarm rates for hash pinning on real servers. MCP-Scan’s launch post explains how pinning works but gives no such rates9.
  • WrongAnother vendor guide warning that tool behavior may change. That is already known10; one more warning adds no new evidence.
  • WrongServers setting readOnlyHint: true on every tool. A hint travels with the description and an untrusted server can lie2.
  • WrongLonger, more detailed tool descriptions. A longer description can be swapped just as easily; it measures nothing.
Question 5Your Studio tool server adds a nightly job that reads customer records with no one at the keyboard. Which setup matches what the sources describe as the safer pattern?Select all that apply.
Answer and why
  • WrongRun the job with the engineer’s personal token, since that engineer wrote it. Sierra runs scheduled work as service accounts, not as a person19.
  • WrongRun it through a connector with a shared credential, so each user’s permissions still apply. A shared credential reaches whatever it can access, not what each user can see18.
  • RightRun it as a service account with only the permissions it needs, declaring its customers and tools before it runs. This is Sierra’s pattern for scheduled work and automations19.
  • WrongGive the agent its own standard agent identity from the MCP specification. The sources in this book describe no such identity; whether agents should have one is the open question.

Sources

  1. Tools - Model Context Protocol (spec version 2026-07-28, latest). Model Context Protocol (LF Projects). modelcontextprotocol.io/specification/latest/server/tools ↗
  2. Tool Annotations as Risk Vocabulary: What Hints Can and Can't Do. Model Context Protocol Blog (Ola Hungerford, Sam Morrow/GitHub, Luca Chang/AWS). blog.modelcontextprotocol.io/posts/2026-03-16-tool-annotations ↗
  3. RFC 1057: RPC: Remote Procedure Call Protocol Specification Version 2. Sun Microsystems / RFC Editor. www.rfc-editor.org/rfc/rfc1057.txt ↗
  4. Implementing Remote Procedure Calls (Birrell & Nelson), ACM TOCS 2(1). ACM Transactions on Computer Systems (copy hosted at cmu.edu). www.cs.cmu.edu/~dga/15-712/F07/papers/birrell842.pdf ↗
  5. OpenAI Function Calling Guide. OpenAI. developers.openai.com/api/docs/guides/function-calling ↗
  6. Tool use with Claude - Claude Platform Docs. Anthropic. platform.claude.com/docs/en/agents-and-tools/tool-use/overview ↗
  7. Function calling with the Gemini API - Interactions API | Google AI for Developers. Google. ai.google.dev/gemini-api/docs/function-calling ↗
  8. Define tools. Anthropic. platform.claude.com/docs/en/agents-and-tools/tool-use/implement-tool-use ↗
  9. Introducing MCP-Scan: Protecting MCP with Invariant. Invariant Labs (Luca Beurer-Kellner, Marc Fischer). invariantlabs.ai/blog/introducing-mcp-scan ↗
  10. Get started with custom connectors using remote MCP. Anthropic (Claude Help Center). support.claude.com/en/articles/11175166-get-started-with-custom-connectors-using-remote-mcp ↗
  11. OWASP Top 10 for Agentic Applications for 2026. OWASP GenAI Security Project. genai.owasp.org/resource/owasp-top-10-for-agentic-applications-for-2026 ↗
  12. Permission policies (Claude Managed Agents). Anthropic (Claude Platform Docs). platform.claude.com/docs/en/managed-agents/permission-policies ↗
  13. Programmatic Tool Calling. OpenAI. developers.openai.com/api/docs/guides/tools-programmatic-tool-calling ↗
  14. SkillsBench. arxiv.org/abs/2602.12670 ↗
  15. Memory and Skills (Lecture 4 slides). CMU / Daniel Fried. www.cmu-agents.com/slides/lecture-04-memory-and-skills.pdf ↗
  16. Not All Skills Help. arxiv.org/abs/2606.15390 ↗
  17. Rethinking skills and prompts for GPT-6 Astra. OpenAI (Eric Provencher). developers.openai.com/blog/rethinking-skills-and-prompts-for-gpt-6-astra ↗
  18. Use connectors to extend Claude's capabilities. Anthropic (Claude Help Center). support.claude.com/en/articles/11176164-use-connectors-to-extend-claude-s-capabilities ↗
  19. Building Sierra's MCP Gateway: An engineering iceberg. Sierra (Mihai Parparita). sierra.ai/blog/building-sierras-mcp-gateway-an-engineering-iceberg ↗
  20. Enterprise-Managed Authorization (MCP extensions). Model Context Protocol (LF Projects, LLC). modelcontextprotocol.io/extensions/auth/enterprise-managed-authorization ↗
  21. What Gets You Hired, What Gets You Promoted, and What AI Changed. Yan Wang guest deck. ai-builders.com/resources/w4995 ↗