Repository navigation
Description
The workflow
I use bb for regular coding sessions in many projects, and occasionally to work on bb itself (plugins, provider internals). I want the heavy bb-development context (skills, AGENTS.md guidance) to appear only when I'm actually working on bb — not as a permanent tax on every unrelated session.
Concretely: I open a thread on any project, and I would like it to carry only a minimal framing line. When I then ask "I want to customize bb", the session should be able to move itself into the bb data dir — something bb already supports mid-session via the update_environment_directory dynamic tool — and only then pick up the full context natively.
What happens today
Every provider-backed thread pays a fixed ambient overhead independent of the project:
- Standard agent append —
standardAgentAppendInstructions(~300 tokens: "You are working inside bb, an agentic IDE…") is appended to every thread via--append-system-prompt. - Builtin skill index — skills are injected via
skills/configure→--skill <path>per skill. On my install that is 9 skills (4 bundled with the app —bb-cli,bb-plugin-authoring,skill-creator,submit-a-plugin— plus roots from enabled plugins, counted viabb skill list); the provider's context accounting shows ~969 tokens for the skill index alone.
Measured on pi (provider context-usage panel): System Prompt 920 → 1.2k tokens once the append is in; a separate Skills line of 969 tokens. Total ≈ 1.2k tokens, regenerated per request, per thread.
There is no supported way to scope, shrink, or disable either block:
bb skill deleterefuses bundled skills (user-owned only); disabling plugins removes plugin-root skills only, never the 4 bundled.- No CLI flag or settings key gates
skills/configureinjection or the standard append. - Plugin instruction contributions are additive-only; the template is compiled into the bundle with no override path.
The dataDir instructions channel (<dataDir>/AGENTS.md) is also read unconditionally for every thread.
What you would expect
Replace the always-on ~1.2k tokens with a ~20-token line, and let cwd-scoping do the rest — using the one mechanism bb already ships for moving a session mid-flight (update_environment_directory):
You are running inside bb GUI. If the user asks about bb customizations, move this session to
~/.bb.
Flow: session on any project → 20-token line, nothing else. On "I want to customize bb" → the agent calls the existing update_environment_directory(~/.bb) tool → the session re-spawns against the new cwd → the provider natively discovers .agents/skills under ~/.bb (standard cross-provider path; trust is asked once), and the dataDir channel appends the single ~/.bb/AGENTS.md. No other session ever pays for it.
Small inline patch (sketch against main @ 720b316):
--- a/packages/templates/src/templates/standard-agent-append-instructions.md
+++ b/packages/templates/src/templates/standard-agent-append-instructions.md
@@
---
kind: instruction
title: Standard Agent Append Instructions
-summary: bb instructions appended to provider-backed coding-thread system prompts.
-intent: Let the agent know bb is available without causing unnecessary orchestration.
-editingNotes: Preserve concise bb framing and keep this compatible with instructionMode append.
+summary: Minimal bb framing; heavy context is cwd-scoped via update_environment_directory.
+intent: Point at the data dir for bb work; keep other sessions free of ambient bb context.
+editingNotes: Keep this to a single line; it is the only always-on bb instruction.
---
-You are working inside bb, an agentic IDE for managing coding agents in projects, threads, and environments. The `bb` CLI is available when you need BB context or orchestration.
-
-- Prefer bare `bb` on PATH. When `BB_CLI` is set, official `bb` entrypoints re-exec to that absolute binary; you can also invoke `"$BB_CLI"` directly.
-- Run `bb status` to see the current project, thread, and environment.
-- Run `bb guide` for BB concepts and `bb guide <chapter>` for command details.
-- Use `bb thread ...` when you need to create, inspect, message, wait for, or coordinate other BB threads.
-- Use Markdown links for files, artifacts, and URLs you want the user to open; bb is a visual IDE and renders them as clickable links.
+You are running inside bb GUI. If the user asks about bb customizations, move this session to `~/.bb`.--- a/apps/server/src/services/threads/thread-runtime-config.ts
+++ b/apps/server/src/services/threads/thread-runtime-config.ts
@@
- const dataDirAgentInstructions = readDataDirAgentInstructions(
- deps.logger,
- deps.config.dataDir,
- );
+ // dataDir instructions are ambient bloat in every other workspace: load
+ // them only for sessions whose workspace IS the data dir.
+ const dataDirAgentInstructions =
+ workspacePath === deps.config.dataDir
+ ? readDataDirAgentInstructions(deps.logger, deps.config.dataDir)
+ : null;--- a/plugins/provider-pi/src/bridge/bridge.ts
+++ b/plugins/provider-pi/src/bridge/bridge.ts
@@
- skills: { configure: true },
+ skills: { configure: false },Constraints/notes: flipping skills.configure also stops bb-native ~/.bb/skills and workspace .bb/skills from reaching pi threads; users who rely on them can re-home them into .agents/skills (already a first-class cross-provider root in bb's docs), or the daemon could exclude only the bundled catalog roots while keeping user/project roots — happy to adjust if maintainers prefer the narrower variant. The workspacePath === dataDir gate in hunk 2 is a sketch for local data dirs: on remote/bb-Connect hosts the host-side data-dir path differs from the server's, so the gate would never open there — final semantics are up to maintainers.
Context and alternatives
- Alternatives surveyed and ruled out: template override path (none exists),
bb skill deleteon bundled skills (refused — user-owned only), disabling plugins (removes plugin-root skills only, not the 4 bundled), additive plugin instruction contributions (cannot shrink the standard block), forkingplugins/provider-pilocally (works but should not be required). - Related issues (all about skill discovery, closed — this is about injection overhead, which I could not find filed): Discover skills from every provider-native location #1292, Support shared skill roots without duplicating BB and provider-native skills #1188, Codex project skill discovery ignores canonical
.agents/skillspath #1105, Cursor project skills in .cursor/skills/ are not auto-discovered for acp-cursor threads #1251. - Affects: every provider-backed thread of every project; measured ~1.2k tokens/request, multiplied across concurrent threads.
- Code refs (main @ 720b316):
standard-agent-append-instructions.md,thread-runtime-config.ts,bridge.ts.
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
cad0p commentedon Aug 30, 2026
I used AI assistance to investigate this issue, let me know if this is helpful and if I can help in any way. Cool project
bb!bb-slop-cop commentedon Aug 30, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotClassification:
providers,perf,provider-piI applied all values. The final Type is Feature, so this run did not create a report or pull request.