Add per-director prompt size budgets assembled per family - #931
Merged
TheGreatAxios merged 2 commits intoSep 12, 2026
Merged
Conversation
Assembled sizes drift silently as prompts grow; a numeric budget per director and model family catches bloat in CI while leaving copy edits free to land.
The helper re-listed allowlist names, so measured prompts exceeded production mounts: fleet verbs counted twice on orchestrators, list_dir counted though never mounted, and Codex proxies counted on non-Codex families. Build the list from the shared mount sources filtered by the same packageToCapabilities run.ts dispatches with.
TheGreatAxios
enabled auto-merge (squash)
September 12, 2026 17:15
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.
Implements CL-7664.
New measurement helper assembles each director prompt exactly as src/subagent/run.ts does (director extension + tools + context + appendix, Grok finish-bias note gated by shouldApplyGrokAntiThrash), pinned to a documented canonical fixture so sizes never drift with machine or date. New budget test asserts numeric char/byte ceilings per director and family — copy edits cannot fail it; over-budget growth must trim or consciously raise the budget with justification. No prompt text snapshots, no prompt trimming, no prompt-contract.ts changes, no latency code.
Findings
Initial size table (chars / bytes, canonical fixture):
Grok delta is +516 chars on leaves (finish-bias note), zero on orchestrators (skywalker, greybeard) where the note is withheld. Budgets pin measured grok size +2000 chars / +3000 bytes headroom.
Verification (all in the cl-7664 worktree):
Do not merge — leaving review to the parent.