Keen Code - A context-efficient CLI coding agent built by agents
by•
Keen Code is an open-source, context-aware and efficient CLI coding agent written in Go. Three aspects stand it out from other similar products:
- It was built from scratch by coding agents, with the full prompt/design trail preserved and shared in the repo.
- It uses turn memory to keep multi-turn sessions lean which saves context significantly.
- It maps MCP servers to lazy-loaded Skills instead of stuffing large schemas into context upfront. This again saves context in mult-MCP setting.


Replies
Keen Code
Really cool, and respect for building it solo. The turn memory idea for keeping context lean is smart. How much context does it actually save in a long session?
Building a CLI agent that manages its own context window is a genuinely hard problem. We've dealt with similar tradeoffs in long-running background jobs where keeping relevant context without blowing token budgets required careful chunking. What's your eviction strategy when the agent's working set grows mid-task: do you prioritize recency or semantic relevance?
Context efficiency is the right constraint to optimize for in a coding agent. Most agents bloat the context window with irrelevant file chunks and then thrash on eviction decisions. We've hit this exact failure mode building multi-file reasoning features and it's where agent reliability falls apart. How does Keen Code handle context prioritization across a multi-step tool use chain when multiple files are relevant?