feat(agents): ship CLI-parity built-in subagents to embedded SDK#36
Merged
Conversation
Claude running inside the app reports "Explore agent isn't available" because @anthropic-ai/claude-agent-sdk ships zero built-in subagents — Explore/Plan/general-purpose/statusline-setup/claude-code-guide are CLI-only. Seed them via options.agents so Claude inside 1Code gets parity with the CLI's Task tool. - New builtin-agents.ts with the five subagents. Read-only ones use disallowedTools (Edit, Write, NotebookEdit, ExitPlanMode) rather than a hand-curated allowlist, matching the CLI's "all tools except X" phrasing and avoiding SDK tool-name drift. - All built-ins omit the model field so they inherit the user's selected model rather than forcing Sonnet. - buildAgentsOption() seeds built-ins first, then overlays user/ project/plugin agents — user-defined files with the same name still override, matching CLI behavior. - Also forwards disallowedTools from parsed user .md agents to the SDK. This field was already parsed from frontmatter but silently dropped before reaching the SDK. Ollama path unchanged (SDK options.agents isn't supported there). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
6 tasks
aletc1
added a commit
that referenced
this pull request
Apr 24, 2026
#38) The Agent SDK's CLI-parity built-in subagents (shipped in #36) can emit the dispatch tool as either `Task` or `Agent`. The inline chat renderer hard-coded `tool-Task`, so `tool-Agent` dispatches fell through to the generic fallback that shows only the bare tool name with no description, while the Tasks sidebar rendered correctly because it reads input by shape. Result: the top row looked empty ("Agent" with no subtitle) even though the subagent was running and nested child tools rendered fine. - Add `isSubagentDispatchType()` helper; use it at the primary and orphan-group dispatch sites so `AgentTaskTool` handles both names. - Harden the catch-all fallback to show `<ToolName> <summary>` via a shared `summarizeToolInput()` (extracted from tasks-widget so the two surfaces stay in sync). - Bump `@anthropic-ai/claude-agent-sdk` 0.2.118 → 0.2.119 and the bundled CLI binary 2.1.118 → 2.1.119 (released in lockstep). Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Claude running inside the app reports "Explore agent isn't available" because @anthropic-ai/claude-agent-sdk ships zero built-in subagents — Explore/Plan/general-purpose/statusline-setup/claude-code-guide are CLI-only. Seed them via options.agents so Claude inside 1Code gets parity with the CLI's Task tool.
Ollama path unchanged (SDK options.agents isn't supported there).