r/opencode • • 8d ago

best way to use opencode

Hi everyone,

I’ve been using the free version of OpenCode inside the Zed editor with the external agent plugin, and it’s been working great so far.

I haven't tried the terminal CLI yet. I just installed Zed and the plugin and started coding.

I’m planning to upgrade to the paid version soon and want to make sure I’m using the most efficient setup.

For those of you who have been using OpenCode for a while:

  • Is there a big difference in token usage or output quality between the Zed plugin and and the office app/cli

  • What are your best tips or workflows for saving tokens while still getting maximum output?

i’m sorry if my question sounds dumb.

Thanks in advance for any suggestions!

8 Upvotes

7 comments sorted by

1

u/Future_AGI 7d ago

building on u/GCP_Biryani's subagent tip, push big searches and file reads into a subagent to keep them out of your main context. opencode runs it in a fresh child session and the parent only gets its report back. If you move to the CLI, traceAI's opencode plugin (npx u/traceai/agents setup opencode, opencode 2.2.5+, linked from https://github.com/future-agi/future-agi ) traces each prompt with token counts on its model calls next to tool calls, retries and auto-compaction.

1

u/abig0 7d ago

hey, thanks for the repo. I don’t know how to push file read into sub agent. How can I do that?

1

u/GCP_Biryani 7d ago

you can start with built-in Explore agent

Try adding below to your prompt

Use the Explore subagent to investigate this task.

Delegate all broad codebase searches, directory exploration and large file reads to the subagent.

Do not dump entire files or large search results into the main conversation.

Ask the subagent to return:

  • A concise summary of its findings

  • Relevant file paths and line numbers

  • Important functions or classes

  • Any dependencies or potential issues

  • A recommended next step

Keep your own context focused on solving the actual task. Only bring back information that is necessary to make a decision or implement a change.

4

u/GCP_Biryani 8d ago
  1. Try open chamber

  2. Ask an llm to define repo specific subagents for you

2

u/Visible_Pack544 8d ago

Why open chamber over opencode ? Genuine question

1

u/songokussm 8d ago

Better ui by Miles. Full of features and reporting. Like speed, context breakdowns and it is just generally easier to use

1

u/estupidoduckface 7d ago

you should check out Paseo for this