Repository navigation
Description
The workflow
Hidden threads exist to carry out one instruction. Agency starts them for an employee (a reviewer, an executor): the prompt already contains the role, the job, and the acceptance check. That session should be bare.
Any CLI agent — Codex, Claude Code, Cursor, OpenCode, Pi, a custom ACP agent — must be launchable for that thread in its own directory. From that directory the CLI sees no user skills, no MCP servers, no provider plugins, and no hooks. The owner's normal chats keep the full install.
This is a must-have for hidden threads, not a Codex preference. A reviewer that only has to follow the instruction should not pay for a catalog it will not use, and it should not be able to fire a hook or an MCP tool that belongs to the owner's interactive setup.
What happens today
Observed on bb 0.43.3, plugin SDK 0.4.87, macOS. The symptom below is from Codex; the gap is the same for every provider bridge.
threads.spawn (CreateThreadRequest) accepts provider, model, permission mode, environment, and visibility. It has no per-session directory for the CLI, no skill list, no MCP list, and no switch for plugins or hooks.
What a plugin can already withhold does not make the session bare:
- Unchecking plugins on an Agency employee drops that plugin's instructions and dynamic tools. On an earlier live run the system prompt fell from about 8–9k tokens to about 2.1k. The CLI's own catalog stayed.
bb.agents.configure()selects only the registering plugin's manifest skills. It cannot clear another plugin, and it cannot clear the provider's own skills, MCP, plugins, or hooks.bb.providers.experimental_contributeEnvcan add variables for athreadId. The Codex bridge does not forward them. Its child process is built from the bridge's ownprocess.envplus two account-pool variables.HOME/CODEX_HOMEcontributed by a plugin never reach the CLI. Other bridges have no documented per-thread config directory either.- Core still injects skills. Host command
thread.startcarriesinjectedSkillSources. The provider bridge receivesskills/configurewith roots of id, path, name, and description. The Codex bridge stores those paths and callsskills/extraRoots/set, on top of whatever the CLI discovers in the real home directory. A plugin cannot pass an empty list.
On Codex the visible result is:
Skill descriptions were shortened to fit the skills context budget. Codex can still see every skill, but some descriptions are shorter. Disable unused skills or plugins to leave more room for the rest.
Disabling skills in the CLI install would shrink the owner's own chats too. The same install also supplies MCP servers, provider plugins, and hooks. A hidden thread inherits all of them.
What you would expect
For a hidden thread (and for any thread that opts in), the provider session starts the CLI with its own directory:
- the process uses that directory as its config home (
CODEX_HOME,CLAUDE_CONFIG_DIR, or the provider's equivalent); - that directory is empty unless the launcher places files there;
- credentials stay in the real OS home, so login is not hidden and is not copied into the session directory.
Core must not refill what the empty directory removed. For that session skills/configure / injectedSkillSources sends no roots, plugin instructions and dynamic tools are omitted, and provider hooks are not installed. MCP servers from the user's CLI config are not started.
The same contract for every CLI agent, not one provider. default keeps today's behavior for a normal composer thread.
Surface: fields on thread create / the runtime command config, for example agentHome: { mode: "user" | "session", path?: ... } together with skillCatalog, mcpCatalog, pluginCatalog, and hooks, each default | only | none. A hidden Agency launch uses session and none.
Thread details (bb thread show) show the directory and that skills, MCP, plugins, and hooks were withheld. A missing tool should be visible as policy, not as a silent failure.
Context and alternatives
Searched open and closed issues. These are related and not this request:
- Scope plugins out of agent sessions per project (and let a plugin supply the policy per directory) #3843 scopes bb plugin instructions, dynamic tools, and plugin skill roots out of a project or directory. It leaves the provider's own plugins and MCP out of scope. Closing it would not give a hidden thread a private CLI directory, and it would not stop the CLI from loading the user's skills and hooks.
- Shrink always-on context (~1.2k tokens/thread) to a 20-token line; load bb-dev context cwd-scoped via update_environment_directory #2709 shrinks the always-on bb framing for every thread. This is a bare session for hidden instruction threads, not a smaller default for all chats.
- Allow custom ACP agents to declare provider-native skill roots #1176 / Support shared skill roots without duplicating BB and provider-native skills #1188 declare and share provider-native skill roots. They do not withhold them from one session.
- Plan out how to support repo scoped extensions #1255 is repo-scoped extensions.
Workarounds ruled out:
- Empty
skillIdson an Agency employee. That only changes the prompt list. - Unchecking bb plugins on the employee. That drops plugin tools and instructions, not the CLI's skills, MCP, plugins, or hooks.
- Disabling unused skills in the CLI install. That is machine-wide and hits the owner's chats.
- A fake
HOMEset by the plugin. The Codex bridge ignores it, core still injects skill roots, and a replaced OS home hides login state. The session directory has to be a provider config dir, applied by core when it spawns the CLI.
Who this is for: every hidden thread whose job is to execute the instruction it was given. Agency reviewers and executors are the concrete case. The same launch should be available for any other plugin that spawns a hidden thread.
Checks
- I searched open and closed issues for the same request.
- If an agent wrote this, the body ends with
> AGENT GENERATED.
AGENT GENERATED
Activity
bb-slop-cop commentedon Sep 22, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotApplied Type: Feature, Priority: Medium, Effort: High. Added labels:
providers,plugins,provider-codex. No existing classifications needed preserving; all writes verified.Per-session skill and MCP catalog controls add new behavior across provider configuration and plugin APIs. This has limited scope but requires design and contract changes. No reproduction report or pull request: this is a feature request requiring product and architecture decisions.
[-]Let one provider session start with an explicit skill catalog, including an empty one[/-][+]Hidden threads must start any CLI agent in its own directory, with no skills, MCP, plugins, or hooks[/+]VKirill commentedon Sep 24, 2026
Superseded by #4233, which covers this request together with #3843 as one session-policy extension point, with a working prototype on a fork and an integration guide.