The whole hunk
from line 625, old and new numbered
/
lines
from line 625
625625| `cwd`, `add_dirs` point at local paths | Upload or mount [files](https://platform.claude.com/docs/en/managed-agents/files) as session resources. |
626626| `system_prompt` and the `CLAUDE.md` hierarchy | A single `system` string on the Agent. Each update that changes the agent produces a new server-side version; pin sessions to a specific version to promote or roll back without a deploy. See [Agent setup](https://platform.claude.com/docs/en/managed-agents/agent-setup). |
627627| `mcp_servers` configured and authenticated in one place | Declare servers on the Agent; provide credentials through a [Vault](https://platform.claude.com/docs/en/managed-agents/vaults) on the Session. |
628| `permission_mode`, `can_use_tool` | Per-tool [`permission_policy`](https://platform.claude.com/docs/en/managed-agents/permission-policies); send `user.tool_confirmation` events for `always_ask` tools. |
628| `permission_mode`, `can_use_tool` | Per-tool [`permission_policy`](https://platform.claude.com/docs/en/managed-agents/permission-policies) (`always_allow`, `always_ask`, or `auto`); send `user.tool_confirmation` events for calls that pause for your approval. |
629629
630630### Code comparison
631631
from line 1306
13061306
13071307The tradeoff for Anthropic running the agent loop is that a few things the SDK handled automatically become your client's responsibility.
13081308
1309| SDK feature | Managed Agents approach |
1310| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1311| Plan mode | Run a planning-only session first, then a second session to run the plan. |
1312| Output styles, slash commands | Apply in your client before sending `user.message` or after receiving `agent.message`. |
1313| `PreToolUse` / `PostToolUse` hooks | Your client already sees every `agent.custom_tool_use` event before responding; put the logic there. For built-in tools, use `permission_policy: always_ask`. |
1314| `max_turns` | Count turns client-side. |
1309| SDK feature | Managed Agents approach |
1310| ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1311| Plan mode | Run a planning-only session first, then a second session to run the plan. |
1312| Output styles, slash commands | Apply in your client before sending `user.message` or after receiving `agent.message`. |
1313| `PreToolUse` / `PostToolUse` hooks | Your client already sees every `agent.custom_tool_use` event before responding; put the logic there. For built-in tools, use `permission_policy: always_ask` to review every call. [`auto`](https://platform.claude.com/docs/en/managed-agents/permission-policies#let-the-server-evaluate-each-call-with-auto) lets the server evaluate each call instead, but if the server evaluates a call as safe, it runs without reaching your client. |
1314| `max_turns` | Count turns client-side. |
13151315
13161316## Migration checklist
13171317