#12808: docs(subagents): clarify allowAgents is per-agent only
docs
stale
## Summary
Clarifies that `allowAgents` is a per-agent setting and is not supported under `agents.defaults.subagents`.
## What changed
- Added a note in `docs/tools/subagents.md` under Cross-Agent Spawning:
- `allowAgents` belongs under `agents.list[].subagents`
- `agents.defaults.subagents` does not accept `allowAgents`
- Added the same clarification in `docs/concepts/session-tool.md` in the `sessions_spawn` allowlist section.
## Why
Users naturally place `allowAgents` under `agents.defaults.subagents` (because other subagent defaults live there), which causes config validation errors. This makes the docs explicit at the two places users check first.
Closes #11982
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
Docs-only PR clarifying that `allowAgents` is configured per-agent under `agents.list[].subagents`, and is not a valid key under `agents.defaults.subagents`. The same clarification is added in the `sessions_spawn` allowlist section of the Session Tools doc and as a note under the Sub-Agents tool “Cross-Agent Spawning” section to prevent common config validation errors when users place `allowAgents` in the global defaults block.
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge; it only adds clear, consistent documentation notes.
- Changes are limited to two docs files and accurately describe existing config semantics (per-agent `allowAgents` vs global `agents.defaults.subagents`). No behavioral or code changes, and the added notes are consistent with the surrounding sections and examples.
- No files require special attention
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
**Context used:**
- Context from `dashboard` - AGENTS.md ([source](https://app.greptile.com/review/custom-context?memory=0d0c8278-ef8e-4d6c-ab21-f5527e322f13))
- Context from `dashboard` - CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=fd949e91-5c3a-4ab5-90a1-cbe184fd6ce8))
<!-- /greptile_comment -->
## Contributing checklist
- [x] AI-assisted: yes (prepared with OpenClaw assistant, model: `openai-codex/gpt-5.3-codex`)
- [x] Testing level: lightly tested (docs-only change; link/build/test not run for this docs PR)
- [x] Confirmed understanding of change and impact
Most Similar PRs
#8361: docs: Add subagent configuration and allowlist guide
by soilgrowerx · 2026-02-03
86.4%
#17788: fix: correct config path in sessions_spawn error hint (v2)
by Limitless2023 · 2026-02-16
81.3%
#16362: Update session-pruning.md - updated agents.defaults config std
by elliottb · 2026-02-14
80.6%
#14734: test(agents): guard against stale allowAgents in existing sessions
by davidahmann · 2026-02-12
78.7%
#19560: docs: refactor agent workspace default location & bootstrap configu...
by ashinkuniyil · 2026-02-17
78.5%
#15852: fix: pass agentId when resolving IRC session paths
by MisterGuy420 · 2026-02-14
78.1%
#7252: docs: align config examples and tool docs with current runtime
by nice-and-precise · 2026-02-02
77.8%
#10197: fix: add missing allowAgents to agent defaults subagents schema
by Yida-Dev · 2026-02-06
77.6%
#20072: feat(sessions_spawn): add sessionKey param to reuse sub-agent sessions
by Be1Human · 2026-02-18
77.0%
#9583: fix(models): allow models in agents.defaults.models even if not in ...
by hotzen100 · 2026-02-05
76.4%