Conversation
Collapse the relay header from 21 lines of prose to the mechanical minimum that survives imperfect relay-agent setup: ownership boundary, forwarded tool list, four JSON shapes, never-invent-names, and one-JSON-object rules. Trivial-prompt size drops from 1,978 to 1,370 chars (-31%), applied to every sampling request. Documented the recommended relay agent setup in README and marked RELAY_AGENT_PROMPT.md as the durable home for behavioural rules.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
The bridge repeated ~21 lines of static behavioural prose in every sampling request. It now sends the short, mechanical minimum that survives imperfect relay-agent setup:
Durable behavioural rules move to the relay agent's system prompt:
RELAY_AGENT_PROMPT.mdnow explicitly documents itself as that home, and the README documents the recommended agent setup.Measured locally
Trivial one-turn request with one tool:
Applied to every request of every tool loop.
Reliability guardrails (test-pinned)
A regression test asserts the minimised prompt still contains every reliability-critical phrase (tool list line, JSON-only rule, all four shapes, never-invent-names). The full parse-robustness suite and Codex SSE compatibility tests pass unchanged;
npm test: 76 pass, 0 fail.