Skip to content

Show a plugin's always-on instruction size at install time, and allow plugin instructions over 4096 characters #6995

Description

@sms-yui

The workflow

The public agent-instructions plugin moves a user's global agent instructions out of provider files (CLAUDE.md, AGENTS.md) and into bb, so every thread gets the same instructions whatever the provider. It sends them through bb.agents.configure(). A real set of global instructions is about 15.7K characters (roughly 4K tokens), and all of it has to reach every thread.

A plugin can't deliver that today. Each plugin instruction channel stops at 4096 characters.

What happens today

Tested against main at 7e83fb7.

Splitting text across configure() and contributeInstructions reaches 8192 characters at most. That still doesn't fit, and it spreads one document across two APIs.

What you would expect

I didn't find a source comment explaining the 4096 cap. If the cap exists to limit context bloat, I'd expect bb to make the cost visible and let the user accept it, rather than holding every plugin to one fixed size.

  1. Show a plugin's instruction size at install time. Put a flag or badge on the marketplace listing and the install dialog with the plugin's always-on instruction size, in characters or approximate tokens per session. Ideally, also show the measured size on the installed plugin's page. Before install, the number could come from a manifest field (for example a bb.agentInstructions.maxChars entry in package.json, carried into the catalog entry). After install, the server composes the text itself and can measure it.

  2. With that visibility in place, lift the cap for both configure().instructions and contributeInstructions. Two possible shapes:

    Declared budget Higher fixed cap
    What Plugin declares its maximum in the manifest. bb shows it at install and enforces it. Plugins that declare nothing keep 4096. One much larger limit (for example 32K) for every plugin, plus the measured-size badge.
    Wins The user sees the cost before agreeing. Existing plugins are unchanged. Smallest change.
    Costs New manifest field and catalog plumbing. Same ceiling for everyone. Size is only known after install.

#2709 shows users already track always-on context per thread (about 1.2K tokens of bb's own context there). A visible per-plugin number gives them the same view of what each plugin adds.

Context and alternatives

  • Workarounds: keep global instructions in provider files outside bb, which defeats the plugin's purpose, or split them into chunks of 4096 characters or fewer across both channels, which tops out at 8192.
  • Alternative: an SDK API to write the user's <dataDir>/AGENTS.md. It reuses the existing uncapped path, but it hides the cost in a file the user didn't write, so I prefer a visible budget.

Related

This issue complements these two rather than duplicating them:

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

  1. added
    plugins
    on Nov 4, 2026
  2. bb-slop-cop commented on Nov 4, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    Applied the missing classifications:

    • Type: Feature
    • Priority: Medium — meaningful plugin limitation with an existing file-based workaround.
    • Effort: High — requires instruction-budget policy decisions and coordination across SDK, server, marketplace, and install UI.
    • Labels: plugins

    No existing classifications were replaced. This requests new instruction-size visibility and expanded budgets; silent truncation is tracked separately in #5565. No bug report or pull request: this is a feature requiring product/API decisions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    plugins

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions