All tiny agents
Budgets

Context Compactor

Four context policies, one scripted run, input tokens counted for each.

What it does

It replays one scripted coding-agent run under four context policies: cap big tool results, keep failure lines in the preview, elide old results, and drop (never rewrite) the oldest messages above 85% of the window. Tools and token counter are mocked.

The guardrail

Token budgets for agent context.

contexttokenscompaction

Run it

git clone https://github.com/bobbyhalljr/tiny-context-compactor.git && cd tiny-context-compactor
npm install
npx tsx compact.ts
Repo
tiny-context-compactor
Language
TypeScript
Stars
0
Price
Free