fix: add missing allowAgents to agent defaults subagents schema#10197
fix: add missing allowAgents to agent defaults subagents schema#10197Yida-Dev wants to merge 1 commit into
Conversation
The `subagents.allowAgents` field was defined in the per-agent runtime schema but missing from the agent defaults schema and type definition. This caused `sessions_spawn` to always reject requests when users set `agents.defaults.subagents.allowAgents` through the config editor, since the `.strict()` Zod validator stripped the unrecognized field. Closes openclaw#10031 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
I discovered this issue as well. |
|
Confirmed this PR fixes my issue. |
|
Glad to hear the fix works for you @mverrilli and @BuffMcBigHuge! Thanks for confirming. The missing |
bfc1ccb to
f92900f
Compare
|
Confirming this is still needed on 2026.2.19-2 (45d9b20), Linux/EC2. Hit this tonight, agents.defaults.subagents.allowAgents rejected by schema validation, sessions_spawn returns forbidden (allowed: none). The per-agent workaround (putting allowAgents in agents.list[].subagents instead of defaults) works, but forces users to create an explicit agents.list entry even for single-agent setups. |
This comment was marked as spam.
This comment was marked as spam.
|
ALso hit this and really want this PR to be merged! |
|
We are also blocked by this. Running a multi-agent setup with 5+ directors and workers communicating via Slack channels as a workaround because sessions_spawn with agentId fails. The allowAgents key in agents.defaults.subagents causes a schema validation error and CrashLoopBackOff. Would really appreciate this getting merged, it would simplify our entire agent-to-agent communication architecture. Thanks! |
|
This pull request has been automatically marked as stale due to inactivity. |
|
Closing due to inactivity. |
Summary
subagents.allowAgentswas defined in the per-agent runtime schema (zod-schema.agent-runtime.ts) but missing from the agent defaults schema (zod-schema.agent-defaults.ts) and its type definition (types.agent-defaults.ts).strict(), any config containingagents.defaults.subagents.allowAgentswas silently stripped during validationsessions_spawnalways saw an emptyallowAgentsarray and rejected all spawn requests when configured via defaultsallowAgents: z.array(z.string()).optional()to the defaults Zod schema andallowAgents?: string[]to the TypeScript typeTest plan
allowAgentswith wildcard["*"]allowAgentswith specific agent idsallowAgentsCloses #10031
🤖 Generated with Claude Code
Greptile Overview
Greptile Summary
This PR adds
subagents.allowAgentsto the agent defaults config surface so it is no longer dropped by the defaults.strict()Zod schema.Concretely:
src/config/zod-schema.agent-defaults.tssoagents.defaults.subagents.allowAgentscan be provided (as an optionalstring[]).src/config/types.agent-defaults.ts.allowAgentsvalues.This aligns the defaults schema/type with the already-supported per-agent runtime schema, allowing
sessions_spawnto see the intended allowlist when configured via defaults.Confidence Score: 4/5