Repository navigation
worker: the briefing's lines share one size budget; unconfirmed user lines capped at 3 - #88
Merged
Merged
Conversation
…ted claims before LIMIT
…-ghkdsb # Conflicts: # docs/features/hosted-worker.md # worker/src/mcp.ts # worker/src/memory.ts
…eedback as what accepts
…lines capped at 3
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.
Requested by Vu · project thread
The briefing was bounded by claim count only. Now every section's claim lines (org, settled, yours, recent; repo and room) share
BRIEFING_CHARS(4000) in render order viafitBriefing: full lines while the budget lasts, then subject-only lines (… (expand for the lesson)), then(N more left out to keep the briefing short; \recall` finds them). Only the claims the reply shows are passed torecordUsage`, so slot used-rates stay honest. A briefing under budget renders exactly as before.RECENT_USERdrops from 5 to 3: unconfirmed user-scope lessons reach every repo's briefing.Why: the briefing is the always-loaded layer; Anthropic's agent memory post notes longer injected context is followed less and a wrong line there misleads every session.
Contracts touched: briefing output (may shorten lines, may append a "more left out" line);
renderClaims/renderBriefingtake an optional line renderer.Verification:
npm run typecheck;npm test391/391; newtest/briefing-budget.test.ts(greedy fit, 30 long claims shortened/dropped with usage recorded only for shown, unchanged under budget);featuremap.py checkclean.Generated by Claude Code