And pi agent is even less. The entire agent system prompt can be seen here: https://github.com/earendil-works/pi/blob/main/packages%2Fco...
If you really want a minimal agent that you heavily customize, just skip pi (130+ transitive dependencies on the "minimal" pi-coder package) and write your own. You learn a bunch, and it's not hard. You can even ask another LLM to help you get started.
Claude Code sends 33k tokens before reading the prompt; OpenCode sends 7k
101–110 of 433 posts
Re: Claude Code sends 33k tokens before reading the prompt; OpenCode sends 7k
#102I am forced to use cloude code at work but a good solution is to just use --system-prompt "" and be done with it. I wish they allowed for other harnesses.
> --system-prompt "" Doesn't the model need at least a basic system prompt to understand what tools are available?
Re: Claude Code sends 33k tokens before reading the prompt; OpenCode sends 7k
#103Re: Claude Code sends 33k tokens before reading the prompt; OpenCode sends 7k
#104What really burns tokens is sub agents. I once gave Claude Code a pretty big task, and it immediately launched 7 sub agents which burned through my budget before even one of them was finished. Tried again 5 hours later: same result. If I let the main agent do the same task sequentially, it was no problem at all. I don't know if it's really just communication and orchestration that makes sub agents so inefficient, or…
> What really burns tokens is sub agents. I once gave Claude Code a pretty big task, and it immediately launched 7 sub agents which burned through my budget before even one of them was finished. Tried again 5 hours later: same result. Probably because the general purpose subagents inherit the parent model. I tell Claude explicitly to use Explore subagents, which use Haiku only, now.
only if you don't specify which model should be used
Re: Claude Code sends 33k tokens before reading the prompt; OpenCode sends 7k
#105Claude is much better in OpenCode then in Claude Code, OpenCode is just better than Claude Code. Claude Code feels like a complete mess to use comparatively.
Re: Claude Code sends 33k tokens before reading the prompt; OpenCode sends 7k
#106Recently switched to Codex after 6m in Claude. Codex seems more open, it’s easier to follow what the model is doing and the approvals have a better UX. Overall, it just feels more transparent. Cost of switching was close to 0. I don’t like that Claude became more opaque around February, including the system prompts. 33k feels way too much.
I appreciate that Codex is open source and OpenAI has explicitly said using the subscription with other agents is ok. OpenAI has been much more consumer-friendly recently.
Re: Claude Code sends 33k tokens before reading the prompt; OpenCode sends 7k
#107What really burns tokens is sub agents. I once gave Claude Code a pretty big task, and it immediately launched 7 sub agents which burned through my budget before even one of them was finished. Tried again 5 hours later: same result. If I let the main agent do the same task sequentially, it was no problem at all. I don't know if it's really just communication and orchestration that makes sub agents so inefficient, or…
I run it basically 24/7 on a ~500k line repo, and only rarely run out of quota before the end of the week.
My experience with Claude Code was very good until about 2.5 months ago, and then it suddenly turned unbelievably terrible for me.
I have not and will hopefully never look back.
I still have PTSD from how ungodly terrible it was that last week of using it.
Re: Claude Code sends 33k tokens before reading the prompt; OpenCode sends 7k
#108And pi agent is even less. The entire agent system prompt can be seen here: https://github.com/earendil-works/pi/blob/main/packages%2Fco...
If you really want a minimal agent that you heavily customize, just skip pi (130+ transitive dependencies on the "minimal" pi-coder package) and write your own. You learn a bunch, and it's not hard. You can even ask another LLM to help you get started.
Re: Claude Code sends 33k tokens before reading the prompt; OpenCode sends 7k
#109Earlier quoted context omitted.
If you really want a minimal agent that you heavily customize, just skip pi (130+ transitive dependencies on the "minimal" pi-coder package) and write your own. You learn a bunch, and it's not hard. You can even ask another LLM to help you get started.
Any tips on how to get started?
If going local, llama.cpp is going to be the more beginner friendly local inference engine that supports more processor types (AMD GPUs, Intel GPUs, CPUs, anything that supports Vulkan, not just Nvidia). LM Studio is a nice wrapper for this if you'd rather avoid cloning repo and compiling yourself, provided you don't mind closed source software; it's much less enshittified than Ollama.
If going local, you will also need model weights in the right format for your inference engine, and with a model that can fit on your hardware. This is going to be .GGUF files if you're using llama.cpp or a wrapper for it like LM Studio.
From there, pick a language, go look up the OpenAI /chat/completions API format (or Anthropic's "Responses" API format), create a DS or array or slice to store messages, and build a loop that accepts user input, formats it according to the API format, sends it to the inference server, retrieves and parses the response, adds the response to the DS/array/slice, and repeat.
There's a lot more beyond this - tool calling, other API formats (optionally), MCP servers, transport layers besides terminal stdin/stdout, permission models, starting with a system message, clearing your message stack correctly (hint: don't reset it mid tool-call), message compaction, web searching and page fetching, semantic search RAG over embeddings, memory layers - way too much to cover exhaustively in a single message.
Re: Claude Code sends 33k tokens before reading the prompt; OpenCode sends 7k
#110What really burns tokens is sub agents. I once gave Claude Code a pretty big task, and it immediately launched 7 sub agents which burned through my budget before even one of them was finished. Tried again 5 hours later: same result. If I let the main agent do the same task sequentially, it was no problem at all. I don't know if it's really just communication and orchestration that makes sub agents so inefficient, or…
This is why I happily use Codex. I run it basically 24/7 on a ~500k line repo, and only rarely run out of quota before the end of the week. My experience with Claude Code was very good until about 2.5 months ago, and then it suddenly turned unbelievably terrible for me. I have not and will hopefully never look back. I still have PTSD from how ungodly terrible it was that last week of using it.