Skip to content

Per-thread system-level instructions longer than 4096 characters for role-based plugin workflows #6024

Description

@skillet07

Summary

Plugins that run role-based workflows need a way to give a thread a long, stable system-level instruction (a "role prompt") that is not part of the user's first message. Today the only system-level channel is bb.agents.configure() → instructions, which is capped at 4096 characters (and silently truncated, see #5565). Real role prompts are larger, so plugins fall back to putting the role into the first user message.

Use case

Our plugin (NeuroBlago) spawns threads for roles: librarian, orchestrator, synthesizer, risk analyst, auditor, planner, panel roles. Each role is a Markdown file the owner edits, between ~6 KB and ~16 KB (3–8k characters, Cyrillic). Because they do not fit in 4096 characters, the plugin sends task + role prompt as the first user message and hides the role block in the chat with a content script.

Problems with that workaround:

  • The role is user-turn text, not system-level instruction, so it carries less weight and competes with the task in the same message.
  • Message order becomes a UI trade-off: BB truncates long messages in the timeline, so to keep the task visible we put it first and the role last, while for the model the role should come first and the task last.
  • The plugin needs a fragile content script that parses rendered markdown to collapse the role block.
  • On resume/compaction the role lives in conversation history, not in the session configuration.

Proposal (any of these would solve it)

  1. Raise the configure() instructions limit to something like 32k characters (with the overflow made visible per Plugin agents.configure() instructions over 4096 characters are cut off without any runtime signal #5565), or
  2. Allow a per-thread system prompt at spawn (thread spawn / SDK createThread({ systemPrompt })), stored with the thread and re-applied on resume, visible to the owner in thread details but not in the timeline, or
  3. Let configure() return a reference to a file/skill that the provider loads as system-level instructions without the 4096 cap.

Option 2 is the most generally useful for custom workflows: any plugin or user could start a thread "as" a role without polluting the conversation.

Environment

bb desktop, macOS, providers claude-code and pi.

Activity

  1. added
    plugins
    threads
    on Oct 21, 2026
  2. bb-slop-cop commented on Oct 21, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    Applied the missing classifications:

    • Type: Feature
    • Priority: Medium — meaningful workflow limitation with an existing workaround.
    • Effort: High — persistent per-thread instruction support requires API and lifecycle design across thread creation and provider sessions.
    • Labels: plugins, threads

    This requests expanded instruction capabilities; the separate silent-truncation defect is already tracked in #5565. No existing classification values were replaced. Final Type verified as Feature, so bug reproduction/reporting and a fix PR were skipped; implementation requires a product/API decision.

    AGENT GENERATED

  3. ymichael commented on Dec 1, 2026

    @ymichael
    Collaborator

    Fixed by #7050: configure() instructions now allow up to 32,768 characters, enough for your role prompts. For a per-thread role, spawn with pluginMetadata: { role: "librarian" } and return that role's prompt from configure() using context.pluginMetadata.role. Silent truncation past the limit is tracked in #5565.

    AGENT GENERATED

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

    pluginsthreads

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions