Announcing 3code, the economical coding agent

3code screenshot

https://3code.capocasa.dev

I am extremely excited to announce 3code, the economical coding agent.

3code is a command-line AI-assisted coding agent that gets things done like the best of them, but is very, very frugal with tokens. It starts up instantenously and has a carefully designed interface, where every element has to earn its keep- so it conserves your computer's and your brain's resources as well.

I wrote 3code out of frustration with the AI companies' lack of concern with conserving resources.

It started out as a very rough proof of concept that was already quite useful, and grew into a robust, cross platform late-alpha tool- only three features to go for completeness.

3code does 3 things to save tokens.

  1. Prompt tightening
  2. Feature omissions
  3. Self-amnesia

Tight, modular prompts

The first one is the low hanging fruit- while 3code has different system prompts tailored to each model family, not unlike the canonical tools, they are drastically reduced in sized but still contain the same information simpy by adjusting phrasing. It seems trivial, but it works, and no one else seems to be doing it- presumably because the prompt is cached. But I found cached tokens are about 90% of my cost, so small savings add up quickly. Further, most parts of the prompt are farmed out to skills. If the model doesn't need to search the web, it shouldn't have to load the web search tool surface. These savings add up even more.

No trendy-but-ineffective features

The second very important design aspect of 3code is what it doesn't do. 3code's purpose is to help you write the code you need as low-cost as possible and get out of the way. 3code deliberately omits features that don't advance that singular goal, even if they are consistently found in other agents. Sub-agents have been shown by research and user experience to add nothing to code quality but have drastic costs in both tokens monitoring complexity, so 3code doesn't have them. The sandbox is in the works, and it certainly does not work by burning tokens for evaluation. There is no token-burning help system and no 3code most certainly does not self-modify- it's a programming tool, not an art project. Having said that- you can certainly configure the colors because colors can be personal and they don't cost anything. There is no planning mode. This one doesn't cost tokens but it adds unnecessary friction. There will be a sandbox, but not an overengineered one that seems to engineered for theatric effect to calm AI-Angst as much as to add genuine security. Memory is effectively just a markdown file with extra steps.

Cheap, effective agentic coding through self-amnesia and a plan that captures learning

The third token-saving measure is a genuine new invention- the clear tool. Instead of giving the model the capability to rapidly increase token use by having subagents, 3code give the model the capability to decrease token use, by clearing its own context, with a handoff. This simple measure is surpringly effective and the tool is easily picked up by all models I tried. In its most basic form, you simply notice the context is getting a bit big for what the agent is doing, and you write in: hand off your current task to the next session with the clear tool. The model will dutifully gather up everything it thinks is important, clear context, and continue. This handoff is most likely someting you already do all the time, you just use a file or the clipboard. Well this is much neater. It sounds like 'compaction' but there is a subtlety- 'compaction' means you need to keep the entire context around, just at a lesser degree of detail. A handoff deliberately omits everything irrelevant to the current task, and goes into great detail about everything required for the current task. This solves the problem of context degradation completely- what is needed is kept, what is no longer needed is forgotten. Economical.

The best way I came up with so far to apply this to a more agentic approach, where the model can complete a large batch of work all by itself, is the cybernetic implementation skill that ships with 3code. Some models will use it spontaneously if the job is large enough, but you can always ask for it directly. What this does is it first creates an initial, detailed implementation plan with a todo list in a file called cybernetic-plan.md. The plan file contains the instructions to pick one item off the todo list, implement it, and then update the plan file informed by the knowledge gathered during implementation, and hand off the plan file with the context clear tool, rinse and repeat. If all todo items are implemented, perform a review of the changes and stop. This allows fully autonomous completion of very complex work with no context degradation and extremely low token use because context is repeatedly reset while relevant information is kept in the plan.

3code is late alpha but very usable

If you want to give 3code a spin, go ahead- the 0.5 release lifts it from rough-but-useful to ready-for-widespread-testing.

I have very good backups and haven't had a single issue with accidental deletion even though I use 3code all day every day. So I'm not overly concerned that the sandbox is still on the roadmap, but you should be aware of this. That aside- go for it, and tell me what you think!

Providers

I made most of 3code using the GLM 5 family of models and they are my go-to. I also tried deepseek, longcat, minimax, hy3, and even Qwen 3.6 locally- and I found hy3 was my preferred lightweight model because it's quiet, doesn't make things up and it stays on task. But I also found the other inexpensive models to be quite capable, but I did find them a tad less predictable.

For immediate serious coding, I think deepinfra with a very cheap $3 GLM 5.2 is the place to start- that's competitive with higher end plans. Openrouter carries them too at that price. To keep things in the EU, tensorx is quite nice.

To immediately do a deep dive for free, a new company called novita has hy3 free and I never ran into rate limits. That's a great way to try things out!

Get started

Head over to

https://3code.capocasa.dev

and start getting things done frugally!