Skip to content

worker: the briefing's lines share one size budget; unconfirmed user lines capped at 3 - #88

Merged
vu1n merged 10 commits into
mainfrom
claude/project-thread-ghkdsb
Nov 7, 2026
Merged

vu1n merged 10 commits into
mainfrom
claude/project-thread-ghkdsb

Conversation

@vu1n

@vu1n vu1n commented Nov 7, 2026

Copy link
Copy Markdown
Owner

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 via fitBriefing: 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 to recordUsage`, so slot used-rates stay honest. A briefing under budget renders exactly as before.

RECENT_USER drops 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/renderBriefing take an optional line renderer.

Verification: npm run typecheck; npm test 391/391; new test/briefing-budget.test.ts (greedy fit, 30 long claims shortened/dropped with usage recorded only for shown, unchanged under budget); featuremap.py check clean.


Generated by Claude Code

@vu1n vu1n self-assigned this Nov 7, 2026
@vu1n
vu1n merged commit 9dcd2a4 into main Nov 7, 2026
4 checks passed
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