# 27.7 How today's tools realize it (/building-ai-workers/agent-architecture/how-todays-tools-realize-it)

---
type: Document
title: "27.7 How today's tools realize it"
description: "Who decides what runs next in Claude Code, the Agent SDK, Managed Agents, OpenAI's Agents SDK and open-source runtimes, and what stays your code's job."
status: stable
order: 327.07
ksor:
  owner: team:panaversity
  audience:
    - public
  approval:
    by: process:panaversity
    at: 2026-11-30T08:16:31Z
chapter: '27'
part: III
expert_status: manager
concepts: [ "27.7" ]
last_verified: '2026-11-30'

sources:
  - id: claude-code-workflows
    title: Orchestrate subagents at scale with dynamic workflows (verified 2026-11-30)
    resource: https://code.claude.com/docs/en/workflows
  - id: claude-agent-sdk-subagents
    title: Subagents in the SDK (Claude Agent SDK, verified 2026-11-30)
    resource: https://code.claude.com/docs/en/agent-sdk/subagents
  - id: anthropic-managed-agents-multiagent
    title: Multiagent orchestration (Claude Managed Agents, beta, verified 2026-11-30)
    resource: https://platform.claude.com/docs/en/managed-agents/multiagent-orchestration
  - id: anthropic-managed-agents-budgets
    title: Budgets (Claude Managed Agents, beta, verified 2026-11-30)
    resource: https://platform.claude.com/docs/en/managed-agents/budgets
  - id: anthropic-managed-agents-create-session
    title: Create Session, API reference (Claude Managed Agents, beta, verified 2026-11-30)
    resource: https://platform.claude.com/docs/en/api/beta/sessions/create
  - id: openai-agents-sdk-orchestration
    title: Agent orchestration (OpenAI Agents SDK, Python, verified 2026-11-30)
    resource: https://openai.github.io/openai-agents-python/multi_agent/
  - id: openai-agents-sdk-handoffs
    title: Handoffs (OpenAI Agents SDK, Python, verified 2026-11-30)
    resource: https://openai.github.io/openai-agents-python/handoffs/
  - id: openai-agents-sdk-hitl
    title: Human-in-the-loop (OpenAI Agents SDK, Python, verified 2026-11-30)
    resource: https://openai.github.io/openai-agents-python/human_in_the_loop/
  - id: openai-agents-sdk-running
    title: Running agents (OpenAI Agents SDK, Python, verified 2026-11-30)
    resource: https://openai.github.io/openai-agents-python/running_agents/
  - id: openai-agents-sdk-js-running
    title: Running agents (OpenAI Agents SDK, TypeScript, verified 2026-11-30)
    resource: https://openai.github.io/openai-agents-js/guides/running-agents/
  - id: openai-agents-sdk-run-config-source
    title: run_config.py, the OpenAI Agents SDK's Python source in its repository (read 2026-11-30)
    resource: https://raw.githubusercontent.com/openai/openai-agents-python/main/src/agents/run_config.py
  - id: openai-agents-api-multi-agent
    title: Multi-agent (OpenAI Agents API, verified 2026-11-30)
    resource: https://developers.openai.com/api/docs/guides/agents-api/multi-agent
  - id: openai-agent-builder
    title: Agent Builder (OpenAI, verified 2026-11-30)
    resource: https://developers.openai.com/api/docs/guides/agent-builder
  - id: openai-codex-subagents
    title: Subagents (ChatGPT and Codex, OpenAI, verified 2026-11-30)
    resource: https://learn.chatgpt.com/docs/agent-configuration/subagents
  - id: opencode-agents
    title: Agents (OpenCode, verified 2026-11-30)
    resource: https://opencode.ai/docs/agents/
  - id: opencode-permissions
    title: Permissions (OpenCode, verified 2026-11-30)
    resource: https://opencode.ai/docs/permissions/
generated:
  at: 2026-11-30T08:16:31Z
  by: esl-rewrite/1.2.0+ksor.1
trust_tier: unverified
build_id: sha256:d6ce3f28a2cf8e492a60bae1b426b7cc6466e35e83d70c3b9763db2c55009f4b
dirty: true
ksor_version: 0.0.60
---

**Reference.** *How today's products realize the chapter's ideas. Skim it now, and come back when you choose a runtime or port the orchestrator.*

**In everyday life.** You are choosing between three firms to organize a family wedding. At the first, a printed program fixes every step of the day. At the second, a planner decides each next step as the day goes. At the third, nobody has told you which it is. So you ask all three the same questions. Who decides what happens next? When something needs my word, how am I asked? And if I name no limit, what is the limit? In this concept, the firms are three kinds of product, and the questions are the ones your table of steps asks.

**What you will learn.** You practice this in Lab 27, Task 4.

- How sure is each claim?
- In each product, who decides the next step?
- How is a person asked, and what is the limit if you set none?
- What must stay true on any runtime?

**Why it matters.** Every product on this page can run several agents on one job. They differ in who decides the next step, in what a helper sees when it starts, and in what stops a run when the builder set nothing. Where a product's pages give no answer, this page says so.

**At work.** It is Wednesday, May 5, 2027. Your `docs/architecture.md` has a column for who decides each step of Dave Kowalski's review, and a review's budget is $1.00. Lab 27 ends with a port: the orchestrator again, on the OpenAI Agents SDK. First you need to know which decisions that SDK hands to the model, and which limits it sets when you set none.

### How sure is each claim?

**The Claude, OpenAI and OpenCode facts are documented. One number comes from an SDK's source. A few lines are ones this book already prints, with their own dates.**

| Label | Means |
| --- | --- |
| *Documented* | Read on the product owner's own pages on November 30, 2026. A fact with no label is documented |
| *From the source* | Read on November 30, 2026 in the product's own code repository, because its published page does not give the value |
| *From an earlier chapter* | A line this book already prints, with that chapter's own date. It was not read again for this page |
| *Not yet tested* | Not yet tried in a lab run. That is true of every fact on this page today |

<!-- EDITOR: the label "Not read" is gone from this page. OpenAI's and OpenCode's pages were read on November 30, 2026, and no cell needs it now. 26.8 still has the label. The row "Not yet tested" is true of every fact on the page, so it tells the reader little. 26.8 has the same row, so keep or cut both together. -->

### In each product, who decides the next step?

**In most products here the model can decide to hand work to a helper. In Codex on your own computer, you or a project instruction must ask first. What also differs is what code can keep, and what the helper sees.**

**Anthropic: the Claude Agent SDK.** This is the harness of [Chapter 22](../agent-sdks/overview.md), and Lab 27's orchestrator runs on it. The model decides the split, among the subagents your code lists, and whether to wait for a report ([27.3](an-orchestrator-and-its-subagents.md)). How a trace marks a subagent's steps is in [27.6](diagnosing-a-misbehaving-agent.md). What a subagent receives is in [26.5](../context-engineering/isolation-with-subagents.md).

**Anthropic: Claude Code.** Claude Code's own table of features has a row named "Who decides what runs next". For subagents the answer is "Claude, turn by turn", and for a workflow it is "The script".[^claude-code-workflows] But that workflow is not this chapter's (27.1). In Claude Code, a *dynamic workflow* is "a JavaScript script that orchestrates many subagents at once", and "Claude writes the script".[^claude-code-workflows]

**Anthropic: Claude Managed Agents.** This is the hosted runtime of [Chapter 23](../hosted-agents/overview.md). An agent there can pass work on in three ways. It can use subagents, a dynamic workflow that it writes, or an advisor model that it consults ([23.17](../hosted-agents/patterns-and-when-to-host-it-yourself.md)). Who decides is in 27.5. Each agent runs in its own **session thread**, which has its own conversation history. All of them share one sandbox, one file system and the session's vault credentials. Vault credentials are each person's tokens, which the platform keeps ([23.10](../hosted-agents/a-vault-per-person-and-company.md)). A subagent's thread is also persistent: on a follow-up, it "retains everything from its previous turns".[^anthropic-managed-agents-multiagent] The Agent SDK's subagent starts fresh, unless you resume it.

> [!NOTE]
> **Watch this: multiagent settings in beta.** On November 30, 2026, Claude Managed Agents was in beta, behind the header `managed-agents-2026-04-01`. "Delegation is one level deep, and a session can have at most 25 child threads at a time, idle ones included." Connectors are set for each agent: "each agent definition declares its own servers and tools". Vault credentials "apply to every thread". For a dynamic workflow the page says "set a session budget".[^anthropic-managed-agents-multiagent] Check each line again on the day you build.

**OpenAI: the Agents SDK.** Its page on orchestration opens with this chapter's question: "Which agents run, in what order, and how is the next step decided?" It gives two answers that you can mix: "Allowing the LLM to make decisions" and "Orchestrating via code".[^openai-agents-sdk-orchestration] Inside the first, there are two ways to use a second agent ([22.4](../agent-sdks/tools-and-where-each-call-runs.md)). With an **agent as a tool**, "A manager agent keeps control of the conversation and calls specialist agents through `Agent.as_tool()`."[^openai-agents-sdk-orchestration] That is the match for an orchestrator. With a handoff, the next agent "takes over the conversation, and gets to see the entire previous conversation history", unless you set an `input_filter`.[^openai-agents-sdk-handoffs] The model sees a handoff as one more tool, with a name such as `transfer_to_refund_agent`.[^openai-agents-sdk-handoffs] So a handoff with no filter shares the whole context, which is the fault in Lab 27's second broken trace.

**OpenAI: the Agents API.** The Agents API is OpenAI's hosted service for agents, "in public beta, open to all but still being tested, since September 10, 2026" (*from an earlier chapter*, [31.13](../self-improving-ai-workers/how-todays-tools-realize-it.md), November 24, 2026). It can run several agents on one job: "Multi-agent lets an agent delegate tasks to subagents. Each subagent has its own context and can work in parallel with the others."[^openai-agents-api-multi-agent] It is off until you set `agent.multi_agent.enabled` to `true` when you create a session. Then "The harness supplies tools to create, message, wait for, and interrupt subagents."[^openai-agents-api-multi-agent] So the model decides when to use a subagent. Your code decides whether it may, and how many run at once. That number is the setting `max_concurrent_subagents`: "The default is `6`, excluding the coordinator."[^openai-agents-api-multi-agent] The main agent and its subagents share one file system, because "Creating a subagent does not create another environment."[^openai-agents-api-multi-agent]

OpenAI is retiring Agent Builder, and its own page says "the product is scheduled to shut down on November 30, 2026".[^openai-agent-builder]

<!-- EDITOR: decided 30 November 2026 (recommended by the lead, awaiting his word): Agent Builder is named once as retired, and the port uses only the Agents SDK. -->

**OpenAI: Codex.** In Codex, subagents work in their own threads, inherit the parent's sandbox and return summaries (*from an earlier chapter*, [12.8](../agentic-coding/both-ai-vendors.md), October 30, 2026). Who decides when one starts? On your own computer, you do: "Current local Codex releases spawn agents after a direct request or applicable project or skill instruction."[^openai-codex-subagents] A custom agent cannot widen its own access, because custom agents "inherit the parent's permissions, provider, and MCP servers".[^openai-codex-subagents] The setting `agents.max_concurrent_threads_per_session` limits how many subagent threads are open at once. If you leave it unset, "Codex chooses the default", and the page gives no number.[^openai-codex-subagents]

**Open source: OpenCode.** OpenCode's page says "Subagents run with fresh context in their own child sessions. They always run in the background".[^opencode-agents] That is a helper for coding work. The model decides when to start one. OpenCode shows each subagent's description "to the model choosing which agent to launch".[^opencode-agents] Your rules decide which ones it may start: "The parent agent's subagent permissions control which agents it may launch". The subagent then "uses its own configured permissions".[^opencode-agents] A subagent's limit is the setting `steps`, which "sets a positive maximum number of model steps". The page names no default for it.[^opencode-agents] To run a subagent safely, write its permission rules first. Every agent starts with a base policy whose first rule allows every action on every resource.[^opencode-permissions] No page on an open-source product for an orchestrated business worker was read, so this page names none.

<!-- OPEN: an open-source match for the orchestrated business worker. OpenCode's Agents and Permissions pages (opencode.ai/docs/agents/ and opencode.ai/docs/permissions/) were read on November 30, 2026. They describe coding agents only, and say nothing of a business worker. The plan's "No fair match yet for the orchestrated business agent" is a claim about every open-source product, and no page read confirms it, so the paragraph above does not say that none exists. -->

<!-- EDITOR: 27.7's quiz has no item that asks the section's own first question, who decides the next step. The spec asks for one such question on each page. An item goes into a bank only after a reviewer agent passes it (`write-section-quiz`), so none was added. The options: run `write-section-quiz` for one item on Claude Code's row "Who decides what runs next" (the round 3 review proposes its words), or leave 27.7 at seven items. -->

### How is a person asked, and what is the limit if you set none?

**Each product can pause a run for a person. The limits you did not set differ.**

| | Claude Agent SDK | Claude Managed Agents | OpenAI Agents SDK |
| --- | --- | --- | --- |
| Who decides what runs next | The model, turn by turn, among the subagents your code lists | The model, among the ways you allowed | Your code, or the model: your choice |
| What a helper sees when it starts | Its own prompt and the string the parent passed (26.5) | Its own thread, and the shared sandbox | As a tool: what the manager passes. On a handoff: the whole conversation |
| How a person is asked | Your code answers each tool call ([22.5](../agent-sdks/who-may-run-a-tool.md)) | A permission policy for each tool ([23.8](../hosted-agents/permission-policies.md)) | The run returns interruptions, and a saved `RunState` resumes it |
| Turns, if you set none | No limit | The API reference lists no turn limit[^anthropic-managed-agents-create-session] | 10 in TypeScript.[^openai-agents-sdk-js-running] 10 in Python, *from the source*[^openai-agents-sdk-run-config-source] |
| Spend, if you set none | No limit | A budget only when you set one ([23.5](../hosted-agents/a-budget-on-every-run.md)) | The page on running agents names no spend limit[^openai-agents-sdk-running] |
| How deep, and how many at once | 3 layers and 20 subagents[^claude-agent-sdk-subagents] | One level, and 25 child threads[^anthropic-managed-agents-multiagent] | The pages on orchestration and handoffs name no limit[^openai-agents-sdk-orchestration] |

On the OpenAI Agents SDK, a step that a person decides looks like this: "Tools declare when they need approval, run results surface pending approvals as interruptions, and `RunState` lets you serialize paused runs and resume them after decisions are made."[^openai-agents-sdk-hitl] To serialize a run means to save it as data, so it can wait for a person. Past its turn limit, the SDK stops with an error named `MaxTurnsExceeded`.[^openai-agents-sdk-running] The TypeScript page gives 10 as the default of `maxTurns`.[^openai-agents-sdk-js-running] The Python page names the default only as `DEFAULT_MAX_TURNS`, and the SDK's source sets that name to 10.[^openai-agents-sdk-run-config-source] A value read in source code can change with the next release. So Lab 27's port passes `max_turns` itself and depends on no default.

On Claude Managed Agents, no thread has a turn limit of its own. The API reference for creating a session lists none.[^anthropic-managed-agents-create-session] The stop it gives is the session's budget, and every thread shares it: "there are no per-thread caps".[^anthropic-managed-agents-budgets]

<!-- OPEN: whether a subagent's turns count against the parent's `maxTurns` on the Claude Agent SDK. Five of Anthropic's pages were read on November 30, 2026: the agent loop, subagents and cost tracking pages, and the TypeScript and Python references (code.claude.com/docs/en/agent-sdk/). They say that a subagent can have a `maxTurns` of its own, and that the budget covers subagents. None says whether a subagent's turns are counted in the parent's limit. Fact needed from a recorded run. Until then this page does not say either way. -->

Two rows should change a decision. The second tells you whether a helper is isolated when you did nothing. The fourth tells you whether anything stops a loop that never ends.

### What must stay true on any runtime?

**On every runtime, a stop, a boundary and a check that your code holds are still there when the model decides badly.**

27.1 says what each one is. A product's default can change with its next release. A row of `docs/architecture.md` whose owner you wrote does not.

**The operating rule:** before you port, read three things on the new runtime's page. They are who decides the next step, what a helper sees, and each default limit. Then set every limit yourself.

**Exam note.** The developer exam's guide asks you to choose "the orchestrator and subagent decomposition", and "a self-hosted harness or a managed, sandboxed agent runtime". It examines Claude. OpenAI and open source are on this page for practice only.

<!-- EDITOR: the "Exam note" line above is hand-written, as 23.19 and 25.11 have one, and it has no entry in the plan's delta register. The other option: remove it until the register has an entry. -->

**Do this now.** Open the documentation of the agent SDK or coding agent you use most, and give your coding agent this prompt.

> Read the page I name about subagents or multiple agents. Make a table with four rows for this product: who decides what runs next, what a helper sees when it starts, how a person is asked before a tool runs, and the limit on turns and on spend when I set none. Quote the page's own sentence for each cell, and write "the page does not say" where it is silent.

Each cell that says "the page does not say" is a limit you set yourself.

[^claude-code-workflows]: Orchestrate subagents at scale with dynamic workflows, Claude Code, Anthropic.
[^anthropic-managed-agents-multiagent]: Multiagent orchestration, Claude Managed Agents, Anthropic.
[^openai-agents-sdk-orchestration]: Agent orchestration, OpenAI Agents SDK (Python), OpenAI.
[^openai-agents-sdk-handoffs]: Handoffs, OpenAI Agents SDK (Python), OpenAI.
[^claude-agent-sdk-subagents]: Subagents in the SDK, Claude Agent SDK, Anthropic.
[^openai-agents-sdk-hitl]: Human-in-the-loop, OpenAI Agents SDK (Python), OpenAI.
[^openai-agents-sdk-running]: Running agents, OpenAI Agents SDK (Python), OpenAI.
[^openai-agents-sdk-js-running]: Running agents, OpenAI Agents SDK (TypeScript), OpenAI.
[^openai-agents-sdk-run-config-source]: run_config.py, the OpenAI Agents SDK's Python source in its repository, OpenAI.
[^openai-agents-api-multi-agent]: Multi-agent, Agents API, OpenAI.
[^openai-agent-builder]: Agent Builder, OpenAI.
[^openai-codex-subagents]: Subagents, ChatGPT and Codex, OpenAI.
[^opencode-agents]: Agents, OpenCode.
[^opencode-permissions]: Permissions, OpenCode.
[^anthropic-managed-agents-budgets]: Budgets, Claude Managed Agents, Anthropic.
[^anthropic-managed-agents-create-session]: Create Session, API reference, Claude Managed Agents, Anthropic.
