Mottakin Chowdhury

Keen Code - A context-efficient CLI coding agent built by agents

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.

Add a comment

Replies

Best
Mottakin Chowdhury
Hi Product Hunt! I’m happy to share Keen Code, an open-source CLI coding agent written in Go. I’ve been building it solo since February as a side project, and I used it as an opportunity to experiment with context efficiency and agent-driven development. Three things make Keen Code different from other similar products: 1. Built by agents Keen Code was built from scratch using state-of-the-art coding agents. My role was to act as the human orchestrator: writing prompts and requirements, then reviewing the designs and code produced by agents. To keep this transparent, the repo includes an ai-interactions folder with prompts and output docs. More: https://mochow13.github.io/keen-... 2. Turn memory To avoid filling the context window during multi-turn loops, Keen discards raw tool inputs and outputs after each turn. It keeps a distilled “turn memory” instead: a simple deterministic Go struct passed into the next turn. More here: https://mochow13.github.io/keen-... 3. Skills-driven MCP servers Instead of loading large MCP server schemas into context upfront, Keen abstracts MCP tools into local markdown Skills. It only retrieves the exact JSON schema when the LLM requests a specific tool at runtime. Details: https://mochow13.github.io/keen-... I’ve been using Keen to develop Keen itself, as well as in my other projects. I’m looking forward to questions, feedback, suggestions, and reviews. I’m committed to improving the project over the long term. Thanks in advance!
Ian Xu

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?

Anand Thakkar

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?

Gaurav Aroraa

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?