← All articles

Rustem Feyzkhanov · Writing

Agents Don't Watch. They Check Back.

Web and Slack were the first two human surfaces for my Claude Managed Agents app. The next ones are Claude Cowork, ChatGPT, Claude Code and Codex: places where a person works through an agent of their own. Here is why I gave them an MCP front door instead of the A2A API the app already runs on, and why that door has no streaming and no approve button.

The calling agent delegates through MCP to a private A2A controller backed by CMA, saves the task ID, does its own work, and checks back in bounded calls. WORKING returns control; after COMPLETED, a separate get_task reads the result.

A human surface with an agent in the middle

So far the app has had two surfaces. Web speaks AG-UI to a browser. Slack speaks Slack. Both end at the same private A2A controller, which owns Tasks and drives Claude Managed Agents. A person starts something in Slack, opens it on the Web, and approves a tool call in either one.

More and more of my day happens somewhere else: in Claude Cowork, in a Claude Code terminal, in ChatGPT or Codex. These are human surfaces too. I’m there, it’s my account and it’s my request. What changes is who presses the buttons. When I ask Cowork to “kick off the vendor research in the research agent and keep drafting the summary,” the caller of my app is not me. It is a model acting for me.

That gives these surfaces a split personality, and the design follows from it.

A person reaches the same agent application directly through Web or Slack, or through an agent host that calls tools on their behalf.

Web and SlackCowork, ChatGPT, Claude Code, Codex
Who is thereA personA person and their agent
Who calls the appThe person, through a UIThe agent, through tools
Whose identityThe person’sStill the person’s, delegated through OAuth
How the caller behavesClicks, reads, waits, leavesRetries, fans out, polls, moves on
ProtocolAG-UI, Slack eventsMCP

Identity stays human. Behavior becomes agent behavior. So the new surface authenticates the person exactly the way Web and Slack do, and then designs everything else for a caller that is a model.

A2A already speaks agent. Why add MCP?

That was the first question I asked myself. The controller is already an A2A server. It has Tasks, contexts, cancellation, INPUT_REQUIRED, push notifications and subscriptions. It is the agent-to-agent protocol. Why not hand Cowork the A2A endpoint?

Because in this app A2A is where the state lives, not where the interaction happens. Four reasons:

  1. Agent hosts speak MCP. Custom connectors connect Claude, Cowork and Claude Desktop to remote MCP servers. ChatGPT supports MCP apps through developer mode. Claude Code and Codex add an MCP server with one command. For this integration, MCP is the host-facing interface I am targeting. I’ve verified the adapter through the MCP SDK; native connections from Claude Code, Codex, Cowork and ChatGPT are next.
  2. The A2A controller trusts its callers. It’s private. It knows contexts and Tasks, not people. Identity linking, thread ownership and idempotency live in the application layer in front of it, the same layer Web and Slack go through. Exposing A2A directly would mean either rebuilding that layer inside the controller or skipping it.
  3. I want bounded tool calls at this boundary. A2A push notifications need a client webhook, and SubscribeToTask needs a stream consumer. A2A also supports polling. The MCP adapter exposes that polling through short tool calls, without requiring the host to receive webhooks or maintain a subscription.
  4. The model needs a manual. MCP gives every tool a description, a schema and hints such as read-only or destructive, plus server-level instructions. That is where I tell the model to save the IDs, reuse a request ID when retrying and treat returned text as untrusted. A2A Agent Cards also describe capabilities and skills. Here I use MCP tool descriptions to put these operating rules directly beside the tools the host exposes to its model.

Here is how the A2A interface maps to this adapter’s A2A client. Usage below refers to the MCP path; the controller and the other surfaces can use more of A2A.

A2A operation or interfaceUse in this adapterMCP tool or behavior
SendMessageExposed through a toolsend_message submits text with returnImmediately: true, then returns the accepted Task’s ID and status. The application supplies the context and stable message ID.
GetTaskExposed through toolsget_task reads canonical public messages in pages. wait_task repeatedly calls the same operation for at most 20 seconds.
ListTasksExposed through a toollist_tasks lists the owned thread’s A2A context. The client follows A2A page tokens; the MCP tool returns an offset/limit page of statuses.
CancelTaskExposed through a toolstop_task cancels a Task after checking thread ownership and Task binding. Disconnecting a tool call does not invoke it.
SendStreamingMessageNot usedThere is no streaming-send tool. The caller submits work with send_message and reads or waits separately.
SubscribeToTaskNot usedThe MCP adapter opens no task subscription. wait_task polls GetTask; it does not consume a stream.
CreateTaskPushNotificationConfigInternal onlyThe shared send path registers the application’s existing notification webhook after binding the Task. The MCP host supplies no webhook URL and receives no push channel.
Push config CRUDRead/list/delete not usedNo MCP tools call GetTaskPushNotificationConfig, ListTaskPushNotificationConfigs or DeleteTaskPushNotificationConfig. Creation remains internal, as shown above.
GetExtendedAgentCardNot usedNo extended-card request or MCP tool.
Agent discovery: /.well-known/agent-card.jsonInternal onlyThe A2A client loads the regular Agent Card and checks the controller’s binding, capabilities and application extensions. The host sees MCP tool descriptions.

Two tools sit above this A2A interface: list_threads and create_thread work with the application’s DSQL records. Creating a thread does not create an A2A context; the first accepted send binds the returned context to that thread.

Human-input continuation is also deliberately narrower. The Web path can send a response through SendMessage with the application’s human-input extension. MCP returns needsHumanInput and threadUrl instead; none of its tools can submit that response. Internal push notifications still serve the application, while the MCP caller checks back through bounded tool calls.

So the MCP adapter is not a second agent protocol stacked on top of A2A. The two protocols answer different questions. A2A answers what is the state of this work: Tasks, contexts, lifecycle. MCP answers how does this caller interact with it: who is calling, what they may touch, how to retry safely and when to come back. Every surface needs that second layer. The browser has AG-UI, Slack has its adapter, and agent hosts now have MCP. A2A stays the private Task boundary behind all three.

Web, Slack and MCP adapters share identity, ownership and idempotency checks before reaching the private A2A controller and Claude Managed Agents.

What agents care about, and what they don’t

When I built for people, the hard part was making the wait feel short: receipts, working state and, in the previous post, live previews. An agent doesn’t care about any of that. Nobody is watching tokens arrive, and every token the agent reads costs it context. What an agent wants is to hand off work, get a handle, go do something else and come back.

A person wantsAn agent wants
Live text while waitingA Task ID right away
A spinner that means “still working”A bounded check that says “still working”
ScrollbackPaginated reads that fit in context
An approve buttonA clear signal that a human is needed, and where
Closing the tab to be harmlessRetrying to be harmless

That list became seven tools: list_threads, create_thread, send_message, list_tasks, get_task, wait_task and stop_task.

send_message returns promptly with a Task ID and status. It doesn’t wait for the managed agent to finish. The calling agent gets on with its own work and checks back when it chooses:

The calling agent receives a task ID, continues its own work, makes bounded status checks, and reads the completed result in pages.

wait_task is the only tool that blocks, and it blocks for at most 20 seconds:

// Simplified from wait_task; authentication, ownership and response mapping omitted.
const signal = AbortSignal.any([request.signal, AbortSignal.timeout(20_000)]);
let task;
try {
  do {
    task = await service.get(threadId, taskId, signal); // canonical A2A state
    if (!unsettled.has(task.status.state)) break;       // finished, or needs a human
    await sleep(1000, undefined, { signal });
  } while (!signal.aborted);
} catch (error) {
  if (!signal.aborted || !task) throw error;
  // A bounded wait can abort after a successful read. Keep the last snapshot.
}
return { ...status(task), timedOut: unsettled.has(task.status.state) };

The bound is the feature. A long wait would freeze the calling agent’s turn and hold a connection open for the duration of someone else’s work, which is exactly the coupling I spent the previous posts removing. With a 20-second ceiling, the caller decides: wait again, or go draft the summary and check back later. timedOut: true is not an error. It means “still working, your move.”

There are no previews and no reasoning on this surface. get_task returns canonical public messages only, five per page by default (up to ten), with long messages cut into 12,000-character slices. For an agent, the context window is the bandwidth, so pagination is part of the API, not an afterthought.

One ordering detail leaks into agent behavior. The controller runs ordinary turns in a thread one at a time, first in, first out. An agent that sends three messages to one thread gets three queued Tasks, not three parallel ones. If it wants parallel work, it creates more threads.

Retries are a model behavior

People double-click. Agents retry. A tool call times out, the host reconnects, or the model simply decides to try again. If every retry creates a new Task, an agent quietly runs the same research three times.

So create_thread and send_message require a clientRequestId UUID, and the server instructions are blunt about it: save it, reuse it for any uncertain retry, and use a new one only for new input. The adapter turns it into a stable message ID in its own mcp: namespace, next to the Web and Slack ones, and the existing logical-send path converges a repeat onto the Task that was already accepted.

After a response is lost, the calling agent reuses request ID R1 and receives the same accepted task T1.

The key has to come from the caller. A key minted by the server can’t help when the lost response is the one that carried it. This is the same idempotency rule Web and Slack follow. The difference is that here the rule is written into the tool description, because the one following it is a model.

Error messages follow the same thinking. A failed call says “read status; retry submissions only with the same request ID,” not a stack trace. For an agent caller, error text is the instruction for its next step.

Approvals stay with people

The most deliberate missing feature: there is no MCP tool to approve a tool call or to answer a clarification.

When the managed agent hits an OpenAPPA review or asks a question, the A2A Task moves to INPUT_REQUIRED. Over MCP, the calling agent sees needsHumanInput: true and a threadUrl that opens the conversation on the Web. It can tell me. It can’t decide for me.

The calling agent relays a human-input link; the person signs in to Web, passes the ownership check and rules on the pending review before the agent checks task status again.

The link is a pointer, not a credential. It holds only the application thread ID. Opening it still requires my Web login, and the Web side checks that I own the thread before it shows the review. A forwarded link or a hallucinated one gets nobody anywhere. MCP has a standard shape for this handoff, URL-mode elicitation: the server asks the host to show a URL to the user, and whatever happens there stays out of the model’s view. Today I return the link in the tool result as ordinary tool-result data that a host can relay, and URL elicitation is the natural upgrade once hosts support it.

The full loop now works end to end: start a Task through MCP, approve it as the owner on the Web, then get COMPLETED from wait_task. A different user opening the link sees neither the thread nor the review.

This is the line from Distributed Agents, Centralized Authorization: policy decisions belong to an authorized person on an authorized surface. If the delegating agent could approve the delegate’s side effects, every review would become one agent asking another for permission, and the approval would be worth nothing. My identity flowing through OAuth doesn’t change that. It’s still a model holding the token.

MCP’s new Tasks extension makes the question concrete. It has its own input_required state, and the client answers with tasks/update, presenting the request to the user or the model. That is a good fit for many tools. For a policy ruling, “or the model” is exactly the part I don’t want, so the answer path stays on the Web (and in Slack, for threads that started there), where I know a person is clicking.

Stop is different. stop_task exists, is marked destructive and cancels only a Task bound to a thread you own. Stopping takes power away from the agent; approving gives it more. The first is fine to delegate. And as on the Web, a dropped connection never cancels anything.

Same person, every surface

The MCP adapter authenticates the person, not the client app. Cognito issues OAuth tokens through authorization code with PKCE for public clients, with no client secrets. The adapter accepts only access tokens whose audience is the MCP URL and that carry the right scope. It then maps the exact issuer and subject to an existing application principal in DSQL, the same principal my Web login and Slack user resolve to. Tokens stop at the adapter and never reach A2A.

Every tool call then rechecks that the thread is mine and that the Task belongs to that thread. A model that invents a UUID, or picks one up from a pasted message, gets “Thread not found.”

Web, Slack and an MCP agent host are three entry surfaces for the same person. MCP uses Cognito access tokens and an MCP adapter running on Lambda; Aurora DSQL maps that identity to the same application principal as Web and Slack. Every MCP tool call checks thread ownership and Task binding.

Because threads and Tasks are shared, continuity comes for free. I can start a Task from Claude Code, open the threadUrl in a browser, read the same canonical history and answer the pending review right there. MCP is just one more way into the same work.

The MCP adapter also gets less power than any other part of the system:

  • no Anthropic credentials, no policy storage and no confirmation port;
  • a dedicated DSQL role limited to identity lookup and thread/Task binding;
  • its own Lambda Web Function behind CloudFront, with no-store on every response;
  • revocation by deleting the identity mapping, which blocks subsequent tool calls even for tokens that haven’t expired yet.

Two practical notes for the hosts this post started with. Claude’s custom connectors, Cowork included, reach your server from Anthropic’s cloud, not from your laptop, so the endpoint has to be publicly reachable. Behind CloudFront, it already is. And my Cognito setup uses pre-registered public clients with exact callback URLs, one per host, rather than dynamic client registration. The 2026-07-28 release also deprecates dynamic registration in favor of Client ID Metadata Documents. My pre-registered clients are a separate deployment choice, not an implementation of those metadata documents.

Stateless MCP suits durable work

The 2026-07-28 MCP specification removed the initialize handshake and protocol sessions. Its advice for state is to mint an explicit handle from a tool and have the model pass it back. That describes this design exactly: threadId, taskId and clientRequestId are the handles, and DSQL and CMA hold the state behind them.

So the MCP adapter is a stateless Hono app on a Lambda Web Function, using the official TypeScript SDK in JSON response mode. Every request authenticates on its own. There are no sticky sessions, no MCP session table and nothing to lose when an environment is recycled. The durable part was already built; the MCP layer only had to avoid adding another one.

An agent host keeps explicit handles while independent adapter requests access DSQL coordination metadata and the A2A controller backed by CMA execution and transcripts.

Why not answer send_message with an MCP task? Two reasons, for now. Plain tools work in every host today, while support for the Tasks extension varies. And the A2A Task is already the unit that Web and Slack display, so explicit task tools keep one Task model across every surface. Once hosts support the extension broadly, mapping MCP tasks onto A2A Tasks looks straightforward for status and cancellation. The input_required path would still point at a person.

The takeaway

Agent hosts are human surfaces with a model at the controls. Authenticate the human; design the API for the model.

Keep A2A as the private home of Task state, and put an MCP interaction layer in front of it, the way you’d put AG-UI in front of a browser. Give the calling agent a handle right away, a bounded way to check back, caller-owned idempotency keys and an explicit cancel. Skip streaming. Instead of an approve button, return “a person is needed, here’s where.”

The test I’d use: can the calling agent fire off work, forget about it for ten minutes, retry anything it isn’t sure about and come back to exactly one correct answer? And when a decision needs a person, does it end up in front of one?

Are you exposing your own agents to Claude, ChatGPT or Codex yet, and if so, as tools, as tasks or as agents?