← Back to PRs

#13792: Claude/openclaw token efficiency q ni2s

by imecostalima open 2026-02-11 01:51 View on GitHub →
agents stale
<!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR introduces several token-efficiency features for the agent runtime: compaction profiles and proactive compaction thresholds, isolated heartbeat prompts, default memory-flush behavior, rule-based model routing, Anthropic prompt caching breakpoints, a token-efficient-tools beta header wrapper, and tool-output pruning utilities. The changes are mostly additive and covered by new unit tests, and they’re wired into the embedded runner via new streamFn wrappers. The main blockers are around integration correctness: the embedded runner currently imports prompt-caching/token-efficient-tools from paths that don’t appear to exist in the repo, and the tool-output pruning placeholder references a tool name that doesn’t exist, so the “retrieve full output” instruction can’t be followed. <h3>Confidence Score: 2/5</h3> - Not safe to merge until import/path and recovery-instruction issues are fixed. - Two issues are likely to break functionality: (1) the embedded runner imports new modules from paths that don’t exist in this repo, which should break module resolution at build/runtime; (2) tool-output pruning tells users to use a non-existent tool name to recover pruned output. The rest of the changes are additive and unit-tested. - src/agents/pi-embedded-runner/run/attempt.ts, src/agents/tool-output-pruning.ts <!-- greptile_other_comments_section --> <sub>(3/5) Reply to the agent's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!</sub> <!-- /greptile_comment -->

Most Similar PRs