Skip to content

fix(providers): preserve native tools when skills are set without allowed_tools (fixes #1605)#1661

Merged
Wirasm merged 1 commit into
coleam00:devfrom
kagura-agent:fix/skills-preserve-native-tools
May 13, 2026
Merged

fix(providers): preserve native tools when skills are set without allowed_tools (fixes #1605)#1661
Wirasm merged 1 commit into
coleam00:devfrom
kagura-agent:fix/skills-preserve-native-tools

Conversation

@kagura-agent

@kagura-agent kagura-agent commented May 13, 2026

Copy link
Copy Markdown
Contributor

Problem

When a DAG workflow node has skills: but no explicit allowed_tools:, the AgentDefinition wrapper defaults tools to ["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.yaml reproduce node, which uses agent-browser via Bash commands.

Root cause: provider.ts:439 — when options.tools is undefined (no allowed_tools in YAML), agentTools defaults to ["Skill"], and the AgentDefinition tools field restricts the sub-agent to only Skill.

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 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 — Make tools optional on the AgentDefinition type; only set it when options.tools is defined
  • packages/providers/src/claude/provider.test.ts — Add 2 tests:
    • Skills without allowed_toolstools field is undefined (SDK defaults apply)
    • Skills with allowed_toolstools includes explicit list + Skill

Validation

  • bun test packages/providers/src/claude/provider.test.ts — 74 pass, 0 fail
  • bun run type-check — all packages clean
  • lint-staged clean on commit

UX Journey

Before: Node with skills: [agent-browser] but no allowed_tools → AI sees only Skill tool → "Cannot do task. No Bash tool available."

After: Node with skills: [agent-browser] → AI sees all default native tools + Skill → executes agent-browser via Bash as expected.

Architecture Diagram

nodeConfig.skills present
├── allowed_tools defined → agentDef.tools = [...allowed_tools, "Skill"]
└── allowed_tools NOT defined → agentDef.tools omitted (SDK defaults apply)

Label Snapshot

fix, providers, workflows

Change Metadata

  • Scope: packages/providers/src/claude/provider.ts
  • Lines changed: +50 / -3

Linked 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_tools behave identically. Only nodes with skills + no allowed_tools are affected (they now get SDK defaults instead of Skill-only).

Human Verification

  • Diff reviewed line-by-line
  • Tests pass
  • Type check clean

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 no allowed_tools:. No impact on other code paths.

Rollback Plan

Revert the single commit.

Summary by CodeRabbit

  • Bug Fixes

    • Improved tools configuration handling for agent skills. The tools field is now conditionally set based on provided options, enabling SDK defaults to properly apply when configuration is not explicitly specified.
  • Tests

    • Added test coverage validating tools configuration behavior in two important scenarios: when allowed_tools parameters are provided and when they are not specified.

Review Change Stack

…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.
@coderabbitai

coderabbitai Bot commented May 13, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4a553d55-6997-42a9-9694-f3a2eb6f2ce8

📥 Commits

Reviewing files that changed from the base of the PR and between dffefd6 and e05921e.

📒 Files selected for processing (2)
  • packages/providers/src/claude/provider.test.ts
  • packages/providers/src/claude/provider.ts

📝 Walkthrough

Walkthrough

The PR fixes a bug where nodes with skills: but no explicit allowed_tools: were losing access to native Claude tools. The implementation now makes the agent tools field optional, omitting it when no allowed_tools are specified so the SDK can apply its defaults. Test coverage validates both the omitted and populated cases.

Changes

Skills agent tools handling

Layer / File(s) Summary
Optional tools in skills agent definition
packages/providers/src/claude/provider.ts
The dag-node-skills internal agent definition changes tools from always being set to an array (with fallback to ['Skill'] when options.tools is absent) to an optional field that is only assigned when options.tools is present, and when assigned, appends 'Skill' to the list.
Test coverage for optional tools behavior
packages/providers/src/claude/provider.test.ts
Two new tests validate that dag-node-skills.tools is omitted when nodeConfig.allowed_tools is absent and that dag-node-skills.tools contains the provided allowed_tools plus "Skill" when allowed_tools is present.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A rabbit hops through the tools of the day,
No longer stripped when defaults hold sway,
When skills are set but allowed_tools rest,
The SDK chooses what works the best. 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the fix: preserving native tools when skills are set without allowed_tools, and directly references the linked issue #1605.
Description check ✅ Passed The description is comprehensive, covering problem statement, root cause, solution approach, changes, validation, and all required metadata sections including security impact and compatibility analysis.
Linked Issues check ✅ Passed The PR directly addresses issue #1605 by implementing Option B: omitting the tools field when allowed_tools is undefined, letting the SDK provide defaults. Both test cases verify the fix (undefined tools without allowed_tools, and tools with allowed_tools).
Out of Scope Changes check ✅ Passed All changes are scoped to the Claude provider's handling of skills and allowed_tools configuration. No unrelated modifications to other modules or functionality.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Wirasm

Wirasm commented May 13, 2026

Copy link
Copy Markdown
Collaborator

Review Summary

Verdict: ready-to-merge

Your fix correctly restores native tool access for workflow nodes with skills: but no explicit allowed_tools:. The change is minimal, properly typed, and well-tested.

Blocking issues

None.

Suggested fixes

None.

Minor / nice-to-have

  • provider.test.ts: Consider adding a comment or test case for allowed_tools: [] (empty array). In JavaScript, [] is truthy, so the explicit-tools branch is taken, but this edge case isn't currently exercised explicitly. A comment noting this behavior would prevent future confusion.

Compliments

  • Clean, targeted fix that addresses the root cause without introducing scope creep
  • Two tests cover both branches of the conditional, making the behavior self-documenting
  • PR description is thorough with architecture diagram, validation evidence, and rollback plan

Reviewed via maintainer-review-pr workflow (Pi/Minimax). Aspects run: code-review, test-coverage.

@Wirasm Wirasm merged commit 1512271 into coleam00:dev May 13, 2026
4 checks passed
@coleam00 coleam00 mentioned this pull request May 14, 2026
cropse pushed a commit to cropse/Archon that referenced this pull request May 19, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

skills: wrapper strips native tools when allowed_tools is unset (silently breaks bundled archon-create-issue reproduce)

2 participants