Command Code: Agent Harness for Open-Source Coding Models

AICodeKinggo watch the original →

Command Code is a coding agent harness that optimizes open-source models like DeepSeek and Qwen through improved caching, tool-call repair, and persistent user-preference learning to make them competitive with premium models.

The Breakthrough

Command Code functions as a specialized agent harness that enables open-source models to perform complex coding tasks by implementing robust caching, routing, and automated tool-call repair, effectively closing the performance gap between affordable models and proprietary alternatives like Claude 3.5 Sonnet or GPT-4o.

What Actually Worked

  • Cache Routing Optimization: The harness maintains a warm conversation prefix across turns, reducing the time to first token on cached turns from 6 to 8 seconds down to under 1 second.
  • Automated Tool-Call Repair: Instead of failing when a model emits a malformed shell or file argument, the harness intercepts and repairs the call to prevent the agent loop from derailing.
  • Taste Reinforcement Learning: The system tracks user accepts, rejects, and edits to build a local preference profile, allowing the agent to adapt to project-specific conventions and coding styles over time without manual prompt maintenance.
  • Zero Data Retention Mode: Users can enforce strict privacy by running CMD_ZDR=1 before executing commands, which ensures the request fails if the chosen model does not support zero-data-retention routing.

Context

Developers often perceive open-source models as inferior for coding tasks because raw API implementations lack the necessary infrastructure to handle complex tool-use and file manipulation. Command Code addresses this by wrapping models like DeepSeek V4 Pro, Kimi, and Qwen in a harness that manages the agentic loop, including file system interaction, terminal execution, and context management. By focusing on the harness rather than just the model weights, the tool aims to make high-performance coding agents accessible at a fraction of the cost of premium model subscriptions.

Notable Quotes

  • "The weights did not change. The harness stopped wasting the model's work."
  • "The reason to use command code with an open model is not merely that the model appears in a drop down. It is that the entire loop around the model is designed to make it useful for real software work."
  • #ai
  • #dev-tooling

summary by google/gemini-3.1-flash-lite. probably wrong about something. check the source.