Capture token-savings as core mission; automate usage visibility#2
Merged
zizzle6717 merged 1 commit intoJun 8, 2026
Conversation
- README: replace tagline with token-efficiency focus; add "Token efficiency" section documenting what's automated (per-turn display, bounded tool output, concise prompts, effort control). - AGENTS.md: add "Token minimalism" section making automated savings a first-class design principle. - TODO.md: promote conversation compaction to top of backlog with a clear rationale (input tokens compound every turn); cross-reference getUsage() hook for threshold tracking. - AgentLoop: accumulate session-level token totals; expose via getUsage() so callers can act on them without manual tracking. - render.ts: display per-turn token counts automatically (↑ in ↓ out) — no configuration needed. - repl.ts: print cumulative session token total on exit. - systemPrompt: instruct the agent to be concise and prefer targeted reads; every output token has a cost. - Tests: cover getUsage() accumulation across single and multi-turn runs, and onUsage() rendering. https://claude.ai/code/session_017GpDkpWRcYKmmuQAkZM5y4
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.
efficiency" section documenting what's automated (per-turn display,
bounded tool output, concise prompts, effort control).
a first-class design principle.
clear rationale (input tokens compound every turn); cross-reference
getUsage() hook for threshold tracking.
getUsage() so callers can act on them without manual tracking.
— no configuration needed.
reads; every output token has a cost.
runs, and onUsage() rendering.
https://claude.ai/code/session_017GpDkpWRcYKmmuQAkZM5y4