fix: stop passing a skills allowlist to Claude Code sessions#67
Merged
Conversation
The claude-code adapter forwarded injected skill names as the Agent SDK `skills` option. That option is a session-wide allowlist — "enable only the listed skills" — so any session with injected skills hid and rejected every other skill (user ~/.claude skills, plugin skills, built-ins) with "not in this session's skills allowlist". Since 5f87c16 bundled building-bb-apps as a builtin injected skill, every session had the allowlist active, breaking user-installed skills everywhere. The allowlist was never needed: injected skills load as a local plugin via the SDK `plugins` option, and plugin skills are enabled by CLI defaults. Remove the allowlist end-to-end rather than leave dead plumbing: - adapter: buildClaudeSkillConfigParams emits plugins only, with a comment pinning why `skills` must never be set here - bridge: drop `skills` from thread/start + thread/resume schemas, BuildSessionOptionsArgs, SdkSessionOptions, and the query() call - runtime: drop the skillNames field from AgentRuntimeClaudeCodeSkillRoot and its normalization - host-daemon: staging no longer attaches skill names to the claude-code skill root (plugin.json still lists them, which is what enables them) - tests: regression pins at the adapter, session-options, and SdkSession layers assert no `skills` allowlist reaches the SDK Co-Authored-By: Claude Opus 4.8 <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.
Problem
Using any user-installed skill (e.g. from
~/.claudeor a Claude Code plugin) inside a bb-managed Claude Code session fails with:The claude-code adapter forwarded bb's injected skill names as the Agent SDK
skillsoption. Per the SDK docs,skills: string[]enables only the listed skills — a session-wide allowlist that hides and rejects everything else. The plumbing shipped in 8d02034 but only activated when injected skills existed; once 5f87c16 bundledbuilding-bb-appsas a builtin injected skill, every session ran with the allowlist set to just the injected skills, breaking user-installed skills everywhere.The allowlist was never needed: injected skills load as a local plugin via the SDK
pluginsoption, and plugin skills are enabled by CLI defaults. (settingSourcesalready includesuser, so~/.claudeskills were discovered all along — just rejected at invocation.)Fix
Remove the allowlist end-to-end rather than leave dead plumbing (accepted-but-ignored fields are forbidden):
buildClaudeSkillConfigParamsemitspluginsonly, with a comment pinning whyskillsmust never be set hereskillsfrom the thread/start + thread/resume schemas,BuildSessionOptionsArgs,SdkSessionOptions, and thequery()callskillNamesfromAgentRuntimeClaudeCodeSkillRootand its normalizationplugin.jsonstill lists them, which is what enables them)Codex and pi adapters are additive ("extra roots") and were never affected.
Tests
buildSessionOptions,SdkSession.startquery options) assert noskillsallowlist reaches the SDKturbo run typecheck + testfor@bb/agent-runtime(567 tests) and@bb/host-daemon(386 tests) pass🤖 Generated with Claude Code