Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Token-efficient autonomous task execution with context collapse for pi coding agent
| Date | Stars |
|---|---|
| 2026-07-31 | 287 |
| 2026-08-03 | 288 |
| 2026-08-06 | 288 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
15.0
growth rate 0.00%/day
<p> <img src="banner.png" alt="pi-boomerang" width="1100"> </p> # pi-boomerang **Token-efficient autonomous task execution with automatic context summarization for [pi coding agent](https://github.com/badlogic/pi-mono).** ``` /boomerang Fix the login bug ``` The agent executes autonomously. When done, the raw turn history is replaced in future context by an expanded handoff summary—work gets done, tokens get saved, the summary is shown in chat, and the orchestrator immediately gets a self-contained follow-up turn with the summary included. ## Why Long autonomous tasks consume massive context. A bug fix that reads 10 files, makes 5 edits, and runs tests might burn 50k tokens. With pi-boomerang, the LLM only sees: ``` [BOOMERANG COMPLETE] Task: "Fix the login bug" Outcome: Fixed the login bug by correcting the JWT validation logic... Changed Files: - src/auth.ts - src/login.ts Relevant Reads: - src/session.ts Commands: - Ran 3 command(s) - Validation: `npm test` - Failures: none detected ``` Same outcome. Fraction of the tokens. The session tree preserves full history for `/tree` navigation if you need it. An inverted [D-Mail](https://steins-gate.fandom.com/wiki/D-Mail): where D-Mail rewrites reality while the observer remembers, boomerang rewrites the observer while reality persists. The session tree is your Reading Steiner. ## Install ```bash pi install npm:pi-boomerang ``` Then restart pi to load the extension. ## Quick Start ```bash # Plain task /boomerang Refactor the auth module to use JWT # Run a prompt template /boomerang /commit "fix auth bug" # Chain templates together /boomerang /scout "map the auth module" -> /planner "design JWT refresh" -> /impl # Turn on auto-boomerang for the next normal prompt # Shortcut: Ctrl+Alt+B /boomerang auto on # Cancel mid-task (no summary) /boomerang-cancel ``` The agent works without asking questions, making reasonable assumptions. When complete, everything returns into a summary branch. The summary is shown in chat, stays expanded in the UI, and includes operational handoff context such as changed files, relevant reads, validation commands, failures, model/thinking/skill config, and the final outcome. The hidden follow-up given to the orchestrator includes that summary directly and tells the agent not to search session logs just to find it. ## Chain Execution Run multiple templates in sequence with a single summary return at the end: ```bash /boomerang /scout "analyze the codebase" -> /planner "design the fix" -> /impl "build it" ``` Each step can specify its own args inline. You can also set global args as a fallback for steps without inline args: ```bash /boomerang /scout -> /planner -> /impl -- "build the auth system" ``` Each template's frontmatter controls model, skill, and thinking level for that step. Scout runs on sonnet, planner on opus, impl on whatever—boomerang switches automatically and restores your original config after the summary return. Status indicator shows progress as `chain 1/3`, `chain 2/3`, etc. ## Rethrow Execution Use `--rethrow N` to run the full task N times, summarizing context between each pass: ```bash /boomerang /deslop --rethrow 3 /boomerang "improve code quality" --rethrow 2 /boomerang /scout -> /impl --rethrow 2 -- "auth module" ``` How it works in boomerang mode: - `N` is required and must be `1-999` - each pass does: execute task -> summarize context -> start next pass - file changes persist on disk across passes - each new pass sees accumulated summaries from prior passes, not full raw turn history - rethrow uses an internal auto-anchor at the current leaf for that run Status shows `rethrow 2/3`, and for chain rethrows `rethrow 2/3 · chain 1/2`. `--loop N` compatibility in boomerang: - `/boomerang ... --loop N` is treated as alias for `/boomerang ... --rethrow N` - if both flags are present, `--rethrow` wins and `--loop` is ignored - boomerang strips loop metadata from the rendered task so inner prompt args
Excerpt of 9,968 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:a036ab8ef29ea405, llm:repository description: 'Token-efficient autonomous task execution with context collapse for pi coding agent' (TypeScript)
matched fp:a036ab8ef29ea405, llm:repository description: 'Token-efficient autonomous task execution with context collapse for pi coding agent' (TypeScript)
matched fp:a036ab8ef29ea405, llm:repository description: 'Token-efficient autonomous task execution with context collapse for pi coding agent' (TypeScript)