#17788: fix: correct config path in sessions_spawn error hint (v2)
agents
stale
size: XS
## Summary
Fix incorrect config path in error message.
## Changes
- Correct config path: `agents.list[].subagents.allowAgents` (not `agents.defaults.subagents.allowAgents`)
## Testing
- pnpm build
- pnpm check
## AI-assisted
Yes
Fixes #17390
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Fixes the config path in the `sessions_spawn` error hint from the incorrect `agents.defaults.subagents.allowAgents` to the correct `agents.list[].subagents.allowAgents`. The `allowAgents` setting is a per-agent config defined on individual agent entries in `agents.list[]` (see `AgentConfig.subagents.allowAgents` in `src/config/types.agents.ts`), not on `agents.defaults`. The corrected path is consistent with all existing documentation (`docs/tools/subagents.md`, `docs/concepts/session-tool.md`, `docs/tools/index.md`).
- Corrected config path in the error hint shown when `agentId` is not in the allowlist and the allowlist is empty
- No functional behavior change beyond the error message content
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge — it only corrects a string literal in an error message.
- The change is a single-line fix to a config path in an error hint string. No logic, control flow, or behavior is modified. The corrected path (`agents.list[].subagents.allowAgents`) is verified against the type definitions and documentation.
- No files require special attention.
<sub>Last reviewed commit: e10a5cf</sub>
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#12808: docs(subagents): clarify allowAgents is per-agent only
by JBrady · 2026-02-09
81.3%
#20336: fix(sessions): resolve transcriptPath using agentId when storePath ...
by Limitless2023 · 2026-02-18
80.6%
#15792: fix: pass agentId to resolveSessionFilePath in additional call sites
by MisterGuy420 · 2026-02-13
79.7%
#14734: test(agents): guard against stale allowAgents in existing sessions
by davidahmann · 2026-02-12
79.5%
#19177: fix: use parseAgentSessionKey instead of fragile split pattern
by El-Patronum · 2026-02-17
79.1%
#16362: Update session-pruning.md - updated agents.defaults config std
by elliottb · 2026-02-14
79.0%
#15982: fix: pass agentId to resolveSessionFilePath in reply flow (NX-003)
by automagik-genie · 2026-02-14
79.0%
#20712: fix(subagents): prioritize agent runtime default model over global ...
by sourcesavant · 2026-02-19
78.9%
#21562: fix: exec host error message shows configuredHost instead of reques...
by TopangaLudwitt · 2026-02-20
78.9%
#22917: fix: Use agent's configured workspace when spawned as subagent
by jriff · 2026-02-21
78.8%