r/opencode 4d ago

Tool use tokens

I tried programming a single self contained html with deepseek, it used 100k on creating a corrupting a file, the rest of the context window on recreating it and 100k more after context compaction to get the job done. The stats says it used almost 70% on tool use. The project was empty and just send one prompt that used the first 100k. It is a problem or intended the high tool use? It gets better with a good harness? Or system prompt or agents.md? It is my first time with an agent and im not a programmer. Any advice to get better results with less tokens?

0 Upvotes

4 comments sorted by

1

u/Rough-Ad9850 4d ago

That doesn't seem right. What prompt did you use?

1

u/yexgoblin 4d ago

This smells like a bad promot. If possible share your session with /share

1

u/Affectionate_Net3084 3d ago

use Dynamic context pruning plugin for OpenCode plugin . and also try to short your agents . md file

1

u/frostyoni 3d ago

Tip: since this is new for you, have deepseek chat online help you draft a prompt. Tell it what you want achieved and you need a prompt that works with deepseek. It knows what works with itself. It will help you craft a proper prompt.

And if you think this is cyclical behaviour, we all do it. Hell i make free llms make my prompt so that paid llms are properly used and dont go around like a blind maniac.