-
Notifications
You must be signed in to change notification settings - Fork 36
fix(claude-agent-sdk): grant default tool preset when tools: is omitted
#269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
jrob5756
merged 11 commits into
microsoft:main
from
lukeellison:fix/claude-agent-sdk-default-tools-preset
Jun 26, 2026
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
169d855
fix(claude-agent-sdk): grant claude_code preset when tools: is omitted
lukeellison 2332658
fix(claude-agent-sdk): reject inherited workflow tools at validate time
lukeellison 594bf2b
fix(claude-agent-sdk): catch for_each inline tools footgun at validat…
lukeellison 54ecd1a
Merge remote-tracking branch 'origin/main' into fix/claude-agent-sdk-…
lukeellison 11c574e
Update src/conductor/providers/claude_agent_sdk.py comment to be more…
lukeellison 6f4e540
Update examples/claude-agent-sdk-repo-qa.yaml comment to be more accu…
lukeellison 48b3b02
Update comment to match changes to error string
lukeellison e3c20dc
Update src/conductor/providers/claude_agent_sdk.py comment to better …
lukeellison 51485e7
ci: install claude-agent-sdk extra so provider tests run in CI
lukeellison c00fb9e
chore: link inline-agent capability follow-up to #270
lukeellison 84632f8
test(claude-agent-sdk): assert suggestion + cover inherited-tools path
jrob5756 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| # Repo Q&A with the claude-agent-sdk provider (default tools preset) | ||
| # | ||
| # This single-agent workflow asks the claude-agent-sdk provider to READ a file | ||
| # in its working directory and answer a question about it. The agent does NOT | ||
| # declare a `tools:` list — it relies on the provider's default behavior. | ||
| # | ||
| # WHY THIS EXAMPLE EXISTS (the bug it guards against): | ||
| # Before the fix, an agent that omitted `tools:` received NO tools and could | ||
| # not read the file: the executor's resolve_agent_tools() turned the omitted | ||
| # `tools:` into an empty list (this workflow declares no workflow-level `tools:` to | ||
| # inherit), and the provider could not tell that empty list apart from an | ||
| # explicit `tools: []`, so it disabled every tool. The agent came up with | ||
| # ZERO filesystem tools and failed to read the file. | ||
| # | ||
| # After the fix, the provider inspects the raw `agent.tools` field: an OMITTED | ||
| # `tools:` (agent.tools is None) now grants the full `claude_code` preset | ||
| # (Read / Bash / Edit / Glob / Grep / WebFetch / ...), exactly like the bare | ||
| # `claude` CLI. An explicit `tools: []` still disables all tools. | ||
| # | ||
| # Pre-requisites: | ||
| # pip install conductor[claude-agent-sdk] # or: uv add 'claude-agent-sdk>=0.1.64' | ||
| # npm install -g @anthropic-ai/claude-code # the `claude` CLI | ||
| # claude login | ||
| # | ||
| # Usage (run from the repo root so README.md is in the working directory): | ||
| # conductor run examples/claude-agent-sdk-repo-qa.yaml \ | ||
| # --input question="In one sentence, what is Conductor?" | ||
| # | ||
| # Validation only (no execution / no API calls): | ||
| # conductor validate examples/claude-agent-sdk-repo-qa.yaml | ||
|
|
||
| workflow: | ||
| name: claude-agent-sdk-repo-qa | ||
| description: > | ||
| Single claude-agent-sdk agent that reads a file in its working | ||
| directory and answers a question about it. Demonstrates the default | ||
| claude_code tool preset granted when `tools:` is omitted. | ||
| version: "1.0.0" | ||
| entry_point: repo_reader | ||
|
|
||
| runtime: | ||
| provider: claude-agent-sdk | ||
| # claude-sonnet-4-5 is the SDK's documented default; adjust to whatever | ||
| # your Claude Code backend (anthropic.com / Vertex AI / Bedrock) expects. | ||
| default_model: claude-sonnet-4-5 | ||
|
|
||
| input: | ||
| question: | ||
| type: string | ||
| required: true | ||
| description: A question to answer using a file in the working directory. | ||
|
|
||
| agents: | ||
| - name: repo_reader | ||
| description: Read README.md in the working directory and answer the question. | ||
| # NOTE: there is intentionally NO `tools:` field here. Omitting it grants | ||
| # the full `claude_code` preset (Read/Bash/Edit/...). Before the fix this | ||
| # agent received no tools and could not read the file; after the fix it can. | ||
| prompt: | | ||
| Read the file README.md in your current working directory, then answer | ||
| the following question using only what that file says. Cite the relevant | ||
| phrase from the file. | ||
|
|
||
| Question: {{ workflow.input.question }} | ||
| output: | ||
| answer: | ||
| type: string | ||
| description: The answer, grounded in README.md. | ||
| evidence: | ||
| type: string | ||
| description: A short quote from README.md that supports the answer. | ||
| routes: | ||
| - to: $end | ||
|
|
||
| output: | ||
| answer: "{{ repo_reader.output.answer }}" | ||
| evidence: "{{ repo_reader.output.evidence }}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.