fix(providers): preserve native tools when skills are set without allowed_tools (fixes #1605)#1661
Conversation
…owed_tools (coleam00#1605) When a DAG node has `skills:` but no `allowed_tools:`, the AgentDefinition wrapper defaulted tools to `['Skill']` only, stripping all native Claude Code tools (Read, Bash, Write, etc.). Fix: omit the `tools` field on AgentDefinition when `options.tools` is undefined, letting the SDK provide its full default tool set. When `allowed_tools` is explicitly set, Skill is still appended to the list.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe PR fixes a bug where nodes with ChangesSkills agent tools handling
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Review SummaryVerdict: ready-to-merge Your fix correctly restores native tool access for workflow nodes with Blocking issuesNone. Suggested fixesNone. Minor / nice-to-have
Compliments
Reviewed via maintainer-review-pr workflow (Pi/Minimax). Aspects run: code-review, test-coverage. |
…owed_tools (coleam00#1605) (coleam00#1661) When a DAG node has `skills:` but no `allowed_tools:`, the AgentDefinition wrapper defaulted tools to `['Skill']` only, stripping all native Claude Code tools (Read, Bash, Write, etc.). Fix: omit the `tools` field on AgentDefinition when `options.tools` is undefined, letting the SDK provide its full default tool set. When `allowed_tools` is explicitly set, Skill is still appended to the list.
Problem
When a DAG workflow node has
skills:but no explicitallowed_tools:, the AgentDefinition wrapper defaultstoolsto["Skill"]only, stripping all native Claude Code tools (Read,Bash,Write,Edit,Grep,Glob, etc.).This silently breaks any node whose prompt expects native tool access — including the bundled
archon-create-issue.yamlreproducenode, which usesagent-browserviaBashcommands.Root cause:
provider.ts:439— whenoptions.toolsis undefined (noallowed_toolsin YAML),agentToolsdefaults to["Skill"], and the AgentDefinitiontoolsfield restricts the sub-agent to onlySkill.Fix
Omit the
toolsfield on AgentDefinition whenoptions.toolsis undefined, letting the SDK provide its full default tool set. Whenallowed_toolsis explicitly set,Skillis still appended to the explicit list (existing behavior preserved).This is Option B from the issue — the cleanest approach since it defers to SDK default-tool resolution without hardcoding a tool list that needs maintenance.
Changes
packages/providers/src/claude/provider.ts— Maketoolsoptional on the AgentDefinition type; only set it whenoptions.toolsis definedpackages/providers/src/claude/provider.test.ts— Add 2 tests:allowed_tools→toolsfield is undefined (SDK defaults apply)allowed_tools→toolsincludes explicit list +SkillValidation
bun test packages/providers/src/claude/provider.test.ts— 74 pass, 0 failbun run type-check— all packages cleanUX Journey
Before: Node with
skills: [agent-browser]but noallowed_tools→ AI sees onlySkilltool → "Cannot do task. No Bash tool available."After: Node with
skills: [agent-browser]→ AI sees all default native tools +Skill→ executesagent-browservia Bash as expected.Architecture Diagram
Label Snapshot
fix,providers,workflowsChange Metadata
packages/providers/src/claude/provider.tsLinked Issue
Closes #1605
Validation Evidence
All 74 provider tests pass including 2 new regression tests.
Security Impact
None — this change only affects which tools are available to sub-agents, and only makes the behavior match what users would expect (all default tools available unless explicitly restricted).
Compatibility/Migration
Fully backward compatible. Nodes with explicit
allowed_toolsbehave identically. Only nodes withskills+ noallowed_toolsare affected (they now get SDK defaults instead ofSkill-only).Human Verification
Risks and Mitigations
Risk: SDK default tool set might change in future versions.
Mitigation: This is the intended behavior — deferring to SDK defaults is more maintainable than hardcoding a tool list.
Side Effects/Blast Radius
Only affects DAG nodes with
skills:and noallowed_tools:. No impact on other code paths.Rollback Plan
Revert the single commit.
Summary by CodeRabbit
Bug Fixes
Tests