Skip to content

Trim the prompt Buzz adds to every agent session and turn - #4603

Draft
wpfleger96 wants to merge 3 commits into
mainfrom
duncan/prompt-trim
Draft

wpfleger96 wants to merge 3 commits into
mainfrom
duncan/prompt-trim

Conversation

@wpfleger96

Copy link
Copy Markdown
Member

This PR cuts the prompt text Buzz adds to every agent session and turn. Every base section keeps its id, lock flag and replaceability, and LAYOUT and the plugin manifest list are unchanged. Owners' saved choices and plugin replacements still apply. Only the section text changes, so each rule is stated once.

Sizes, measured with the repo's own renderers (composeBase for a thread session, mentionSection with the thread handoff, and the always-loaded entries of sessionTools):

  • Base prompt: 20,662 → 10,324 chars
  • Typical mention wrapper: 1,373 → 389 chars
  • Up-front tool schemas: 19,074 → 8,574 chars (45 tools → 18; the rest load on search in all four harnesses, and sessionHint names them)

Also in this PR:

  • "Remembers you" moves to version 3. A stock v2 section upgrades, and an owner-edited one stays as it is.
  • <attention> is shorter, and a conversation wake no longer gets it twice.
  • <buzz-event> drops sig and transport tags. The watch-wake event drops them too but keeps h, and no longer calls itself signed.
  • The Request: line stays as it is, for the security plugin.
  • The empty Canvas and owner-instruction notes are shorter.
  • Codex thread context gets a cursor for each thread and conversation, so a message already given to the thread isn't sent again. An edit to one of those messages isn't re-sent either, the same tradeoff Claude already makes.
  • Thread context drops e tags that point at the thread root.

Trust needs sign-off. The new Trust text is in src/features/agent-harness/sections/trust.md. It keeps the 7-level precedence, the rule that data is not instructions (with its AGENTS.md and <referenced-skills> exceptions), the unconditional owner-section, plugin-section and section-update rule, identity by pubkey with JSON strings treated as data, relay skills only when named, and the memory-poisoning defense.

Rewrite the base sections to say each rule once, keeping every section id,
lock flag and the layout. Trim Remembers you to version 3. Shrink the
per-turn mention, attention and empty Canvas and owner-instruction notes,
and stop sending attention twice on conversation wakes. Drop signatures and
transport tags from turn events, give Codex thread context a cursor, and
load rarely used Buzz tools on search.

Co-authored-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
Signed-off-by: Will Pfleger <wpfleger@block.xyz>
wpfleger96 and others added 2 commits December 1, 2026 01:05
Record a delivered turn's request as shown, clear the cursor on dispose,
and test the cursor, the watch event's tags and the thread root filter.

Co-authored-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
Signed-off-by: Will Pfleger <wpfleger@block.xyz>
Co-authored-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant