The June 11 session persistence repair for Claude Code has already been extensively documented. What has obtained far much less consideration is the broader set of Claude Code June 2026 options shipped alongside it and within the weeks following. These capabilities prolong Claude Code’s single-agent coding assistant mannequin with multi-agent orchestration primitives.
Desk of Contents
Stipulations: The configurations on this article assume Claude Code CLI ≥ 2026.6 (the June 2026 launch prepare). Run
claude --versionto substantiate your put in model earlier than utilizing any of the instructions or configuration schemas under. Options, flags, and YAML/JSON schemas are version-specific and should not work on earlier or later releases.
Nested sub-agents, fallback mannequin chains, a group instrument market, per-agent price attribution, and scoped permissions are actually accessible, although many stay scattered throughout changelogs. This text covers all 10 options with configurations based mostly on the June 2026 CLI launch that builders can adapt. Confirm compatibility with claude --version earlier than use.
1. Nested Sub-Brokers with 3-Degree Depth
How Layered Process Decomposition Works
Claude Code now helps hierarchical agent spawning the place a mother or father agent can create baby brokers, and every baby can spawn its personal kids, as much as three ranges deep. This structure allows layered job decomposition for operations spanning a number of modules or recordsdata. A top-level agent dealing with a big codebase migration, as an illustration, can delegate to module-level brokers, which in flip delegate to function-level brokers for focused rewrites. You may assign every agent within the tree a definite function, mannequin, and constraint set, and every operates with its personal context window.
Configuration and Implementation
Outline the hierarchy in .claude/brokers.yaml:
max_depth: 3
brokers:
- agent_role: migration_coordinator
description: "Prime-level agent for Python 2 to three migration"
mannequin: claude-sonnet-4
delegate_to:
- agent_role: module_migrator
description: "Handles per-module migration duties"
mannequin: claude-sonnet-4
delegate_to:
- agent_role: function_refactorer
description: "Rewrites particular person features for Python 3 compatibility"
mannequin: claude-haiku
Invoke the top-level agent and observe the delegation chain in actual time:
claude agent run migration_coordinator --verbose-agents
The --verbose-agents flag outputs every time one agent delegates to a different, together with which baby agent it spawned, what function it assigned, and the duty fragment it obtained. That is important for debugging hierarchies the place failures at decrease ranges will be troublesome to hint with out structured visibility.
You may assign every agent within the tree a definite function, mannequin, and constraint set, and every operates with its personal context window.
2. fallbackModel Configuration
Setting Up Mannequin Fallback Chains
Fee limits, transient mannequin outages, and value administration all create situations the place a single mannequin goal is inadequate. The fallbackModel configuration addresses this by permitting an ordered record of fashions that Claude Code makes an attempt sequentially. If the first mannequin returns a rate-limit error or is unavailable, Claude Code routinely tries the following mannequin within the chain.
Sensible Configuration
Save the next as .claude/settings.json:
{
"mannequin": "claude-sonnet-4",
"fallbackModel": [
{
"model": "claude-haiku",
"maxTokens": 4096,
"costCeiling": 0.25
},
{
"model": "local/codellama-34b",
"maxTokens": 4096,
"costCeiling": 0.00,
"timeoutSeconds": 30
}
]
}
The fallbackModel array ought to record solely different fashions. Don’t repeat the first mannequin as a fallback entry, since a mannequin that has already failed as a result of a price restrict or outage is not going to succeed on speedy retry. Every entry helps per-model maxTokens and costCeiling parameters, supplying you with per-model limits on output dimension and spend because the system falls via the chain. The costCeiling parameter units the utmost spend (as a numeric greenback quantity) allowed on that mannequin earlier than advancing to the following fallback. The native mannequin possibility with a zero price ceiling serves as a last-resort fallback that ensures availability.
Native mannequin assist: The
native/prefix requires a working native inference server (e.g., Ollama). Configure the endpoint in your Claude Code settings earlier than utilizingnative/-prefixed fashions. And not using a working inference server, this fallback entry will fail.
Searching, Putting in, and Publishing Instruments
Skip this part in case your group restricts third-party instrument set up. For everybody else: {the marketplace} is a registry of community-contributed Claude Code instruments, together with linters, formatters, customized slash instructions, and specialised refactoring utilities. It operates via the CLI:
claude market search "react"
claude market set up @group/react-refactor
claude market publish
⚠️ Safety discover: Confirm your authentication credentials earlier than publishing (claude auth standing). Group-published instruments should not reviewed or assured by Anthropic. Earlier than putting in group instruments, assessment the instrument’s supply and permissions. Train the identical warning you’ll with any third-party bundle from a public registry.
The publish command walks via a guided circulate that packages the instrument definition, validates its manifest, and submits it to the registry. You may invoke put in instruments as slash instructions or agent-callable instruments inside the present mission.
4. Utilization Attribution and Price Monitoring
Per-Agent and Per-Process Price Breakdown
The brand new --attribution flag generates an in depth .claude/attribution.json file after every session, breaking down token utilization, price, and mannequin choice by sub-agent, job, and timestamp. For groups billing AI utilization to particular initiatives or shoppers, this offers the granularity wanted for correct chargebacks.
Studying Attribution Reviews
The next is an illustrative instance. Precise price values will fluctuate based mostly on present Anthropic pricing for every mannequin tier:
{
"schema_version": "1.0",
"session_id": "ses_550e8400-e29b-41d4-a716-446655440000",
"total_cost": 0.87,
"total_tokens": 142350,
"brokers": [
{
"agent_role": "migration_coordinator",
"model": "claude-sonnet-4",
"tokens_in": 12000,
"tokens_out": 4500,
"cost": 0.12,
"timestamp": "2026-06-18T14:22:01Z",
"tasks": ["coordinate migration plan"]
},
{
"agent_role": "module_migrator",
"mannequin": "claude-sonnet-4",
"tokens_in": 85000,
"tokens_out": 32000,
"price": 0.63,
"timestamp": "2026-06-18T14:23:15Z",
"duties": ["migrate auth module", "migrate payments module"]
},
{
"agent_role": "function_refactorer",
"mannequin": "claude-haiku",
"tokens_in": 6500,
"tokens_out": 2350,
"price": 0.12,
"timestamp": "2026-06-18T14:25:44Z",
"duties": ["refactor parse_token()", "refactor validate_session()"]
}
]
}
Immediate tokens (tokens_in) and completion tokens (tokens_out) are tracked individually, which issues as a result of pricing differs between the 2. Every duties array ties prices to particular work models, so you possibly can spot a subtask that consumed, say, over half the session’s complete price and examine why. Price values are saved as numeric varieties (e.g., 0.87) for direct programmatic consumption with out string parsing.
5. Scoped Permissions for Sub-Brokers
Precept of Least Privilege in Agent Timber
Now you can prohibit baby brokers to particular directories, instruments, and write capabilities. This prevents a function-level refactoring agent from unintentionally modifying configuration recordsdata or invoking damaging instruments outdoors its meant scope.
- agent_role: function_refactorer
mannequin: claude-haiku
permissions:
allow_paths:
- "${PROJECT_ROOT}/src/utils"
deny_tools:
- shell_execute
- file_delete
can_write: true
The allow_paths discipline restricts the agent’s file system entry. Use ${PROJECT_ROOT} to anchor paths to the mission root (the listing containing .claude/), guaranteeing paths resolve to absolute canonical areas and can’t escape the meant scope by way of .. segments or symlinks. The deny_tools array explicitly blocks particular instruments even when they’re globally accessible. Instrument names should match the identifiers listed in claude instruments record. Setting can_write: false creates a read-only agent helpful for evaluation or assessment duties.
⚠️ Warning: Sub-agents with can_write: true and broad allow_paths values can modify recordsdata throughout their whole permitted scope. Scope paths as narrowly as doable, particularly in configurations the place brokers function throughout a number of repositories.
6. Streaming Agent Logs
Beta characteristic. Habits and schema might change in future releases. Not advisable for manufacturing pipelines with out pinning your CLI model.
Pipe real-time, structured JSON logs from all energetic sub-agents into monitoring dashboards, CI/CD programs, or log aggregation platforms utilizing the --stream-logs flag.
(Requires jq: brew set up jq / apt set up jq)
claude agent run migration_coordinator --stream-logs
| jq 'choose((.agent_level | tonumber) <= 2 and .standing == "error")'
Every log line is a JSON object containing fields for agent_role, agent_level, standing, message, and timestamp. The jq filter above makes use of tonumber to securely coerce agent_level (which can be emitted as a string) earlier than comparability, and narrows output to errors from the highest two ranges of the agent tree. That is helpful for surfacing essential failures with out drowning in verbose output from leaf brokers.
7. Agent Checkpointing and Resume
Beta characteristic. Habits and schema might change in future releases. Not advisable for manufacturing pipelines with out pinning your CLI model.
Saving and Restoring Agent State Mid-Process
This characteristic is distinct from session persistence. Session persistence saves dialog historical past. Agent checkpointing moreover saves the complete agent tree state, together with every sub-agent’s progress, intermediate outputs, and pending job queue. This enables a multi-hour migration to be paused and resumed with out restarting from scratch.
claude checkpoint save migration-v2
claude checkpoint resume migration-v2
The checkpoint contains the pending job queue, so resumed classes proceed precisely the place they left off reasonably than re-evaluating accomplished work.
Essential: If recordsdata modified by the agent tree have modified externally because the checkpoint was saved, assessment the variations earlier than resuming to keep away from conflicts with stale intermediate state. Checkpoint recordsdata might include delicate intermediate outputs (code fragments, token context). Add the checkpoint storage listing to .gitignore and prohibit listing permissions (e.g., chmod 700) to keep away from committing or exposing this knowledge.
8. Inline Price Budgets per Agent
Onerous greenback or token caps will be set on particular person sub-agents to stop runaway prices. When a price range is exceeded, the agent halts and reviews an error to its mother or father.
- agent_role: function_refactorer
mannequin: claude-haiku
price range:
max_cost: 0.50
max_tokens: 50000
When exceeded, the output reads: Error: Agent 'function_refactorer' exceeded price range. Used $0.51 of $0.50 restrict. Escalating to mother or father agent. The mother or father agent can then resolve whether or not to allocate extra price range, reassign the duty, or abort. The max_cost worth is a naked numeric greenback quantity (not a string). Use 0.50 reasonably than "$0.50" to make sure the CLI appropriately enforces the price range cap.
9. Customized Agent Templates
You may pre-define reusable agent configurations as templates, encapsulating function, mannequin, permissions, and price range right into a single file invocable by identify. Templates are saved in a templates/ listing on the mission root, and the templates_dir key in brokers.yaml should level to this listing for --template to resolve appropriately. Use ${PROJECT_ROOT}/templates to make sure appropriate decision no matter working listing.
agent_role: code_reviewer
description: "Evaluations code for type, bugs, and safety points"
mannequin: claude-sonnet-4
permissions:
can_write: false
deny_tools:
- shell_execute
price range:
max_cost: 0.25
max_tokens: 30000
Run from the mission root the place templates/ exists. The --template flag accepts the bottom filename with out extension:
claude agent run --template code-reviewer
This resolves to ./templates/code-reviewer.yaml. Templates standardize agent habits throughout groups and initiatives, stopping inconsistencies like mismatched price range caps or permission scopes when a number of builders outline related brokers independently.
10. Multi-Repo Orchestration
Beta characteristic. Habits and schema might change in future releases. Not advisable for manufacturing pipelines with out pinning your CLI model.
Sub-agents can now function throughout a number of native repositories inside a single session. This allows cross-repo duties like synchronized dependency updates, API contract validation, or coordinated model bumps.
brokers:
- agent_role: dependency_updater
mannequin: claude-sonnet-4
repos:
- "${PROJECT_ROOT}/../frontend-app"
- "${PROJECT_ROOT}/../backend-api"
- "${PROJECT_ROOT}/../shared-libs"
duties:
- "Replace axios to 1.8.0 throughout all repos and repair breaking adjustments"
The repos array accepts ${PROJECT_ROOT}-relative paths to sibling directories. All listed repos should exist on the specified paths earlier than invocation; lacking paths will trigger an error. Every sub-agent positive aspects file system entry scoped to the listed repositories, and the mother or father agent can coordinate adjustments that span repository boundaries.
⚠️ Warning: Multi-repo brokers with write entry can modify recordsdata throughout all listed repositories concurrently. Take a look at on copies or branches of your repositories earlier than working damaging or large-scale operations.
Placing It All Collectively: Full Configuration Reference
A mixed configuration utilizing all 10 options:
Save the next as .claude/settings.json:
{
"mannequin": "claude-sonnet-4",
"fallbackModel": [
{
"model": "claude-haiku",
"maxTokens": 4096,
"costCeiling": 0.25
}
]
}
max_depth: 3
templates_dir: "${PROJECT_ROOT}/templates"
brokers:
- agent_role: migration_coordinator
mannequin: claude-sonnet-4
price range:
max_cost: 5.00
max_tokens: 500000
repos:
- "${PROJECT_ROOT}/../backend-api"
- "${PROJECT_ROOT}/../shared-libs"
delegate_to:
- agent_role: module_migrator
mannequin: claude-sonnet-4
price range:
max_cost: 2.00
max_tokens: 200000
permissions:
allow_paths:
- "${PROJECT_ROOT}/src"
deny_tools:
- file_delete
can_write: true
delegate_to:
- agent_role: function_refactorer
mannequin: claude-haiku
price range:
max_cost: 0.50
max_tokens: 50000
permissions:
allow_paths:
- "${PROJECT_ROOT}/src/utils"
deny_tools:
- shell_execute
- file_delete
can_write: true
Solo builders ought to begin with fallback fashions and value budgets, which offer speedy worth with out organizational overhead. Groups ought to prioritize utilization attribution and scoped permissions first, then layer in templates and multi-repo orchestration as workflow complexity grows.
Abstract and What’s Subsequent
The ten Claude Code June 2026 options coated right here:
- Nested sub-agents with as much as 3-level depth for layered job decomposition
- fallbackModel configuration for resilient mannequin chains
- Group instrument market for locating and sharing instruments
- Utilization attribution with per-agent, per-task price breakdowns
- Scoped permissions imposing least privilege on sub-agents
- Streaming agent logs for real-time structured monitoring (beta)
- Agent checkpointing for saving and resuming agent tree state (beta)
- Inline price budgets for per-agent spend caps
- Customized agent templates for reusable agent definitions
- Multi-repo orchestration for cross-repository duties (beta)
Nested sub-agents, fallback fashions, and {the marketplace} are usually accessible as of the CLI 2026.6 launch prepare. Agent checkpointing, streaming logs, and multi-repo orchestration stay in beta, and their schemas and habits might change. Anthropic’s changelog tracks the most recent standing of every characteristic. For protection of the session persistence repair that preceded this batch, see SitePoint’s prior article on that subject.





![How creators and entrepreneurs are utilizing AI to hurry up & succeed [data]](https://blog.aimactgrow.com/wp-content/uploads/2025/06/Untitled20design-Apr-07-2023-08-24-35-4586-PM-120x86.png)


