
- Reading
- 4 min
Two commands make all the difference in OpenCode: /init, which creates agents.md, and switching between plan and build modes before generating code.
Originally published on TekZoom on YouTube, on November 12, 2026.
In OpenCode there are some commands I consider extremely important, and one of them is /init. It creates your agents.md file, guiding you through creating this file, which is one of the most important in OpenCode, or in any AI agent you might use.
It's in this file that you define which programming language you want to use, what type of interface you want, what the agent can or cannot do, plus other extremely important instructions for your project. That's why I consider /init an essential command both for those who are starting to work with AI agents and for those who are already experts. It's in this agents.md that you put everything.
How /init works in practice
When you run the command, OpenCode creates the file in the very folder you're working in and leaves it ready for you to edit with your own information. The nice thing is that you can also ask OpenCode itself to update this file whenever you find it necessary. That's why it's worth noting this somewhere, or just keeping it in mind: always have an agents.md ready to use. It's with this file that you'll define everything that will be built in the project you're working on.
Expert views
What people are saying about it.
Tether AI Research released VisionPsy2 on December 3, 2026, a family of vision-language models with fewer than 1 billion parameters that promises the quality of much larger models while running locally on smartphones.
Back in Las Vegas, I'm following an AI agenda that spreads across AWS programming and gatherings around the city. On a short trip, making the most of this concentration of people requires knowing which questions to bring.
When you use the command without giving any specific instruction, it simply generates a default file, pretty basic. Then it's up to you to read this file and keep changing it according to your needs. With more complete files, with more detailed instructions, the result tends to be much better.
Project or global: where to save agents.md
There are two possible places to save this file. One is inside the project folder, and the other is global. In the global file, you define everything related to all the projects you work on within OpenCode: you can put your preferred language, the locale, and other general information there. In the file that stays inside the specific project folder, you only put information related to that particular project being developed there.
Clearing the screen without losing history
Another useful command is /new, which clears the conversation screen. But the interesting thing is that it doesn't erase what you were doing before: it simply opens a new tab, keeping the previous work stored elsewhere. This makes things a lot easier when you want to start a new front without losing what you had already built.
Build and Plan: the two work modes
One of the most important things about OpenCode is understanding the difference between build and plan modes. On the screen, you see an indication of which mode is active, and with Shift + Tab you switch between them.
In build mode, you actually build code. In plan mode, the agent plans, but doesn't create any code, doesn't execute any coding. It only defines how the project should be structured: which technologies to use, which steps to follow, what needs to be done.
To test this, I asked OpenCode to create a Chrome extension that would generate proposals. In plan mode, it started building a complete plan: what the extension should be like, what it could use, which technologies would be interesting. It kept asking me questions throughout the process, mainly because I already had an agents.md created in previous sessions in that folder. It asked where and how this plan would be used, and showed everything in phases: the files that already existed, what was still missing, until it built the complete execution plan.
That's the logic: before creating code, you generate an action plan, a complete documentation of what will be done. Only afterward, pressing Shift + Tab again to go back to build mode, do you actually command it to execute.
From idea to code
To wrap up the test, I asked OpenCode to create a simple and quick link-in-bio page. In build mode, it goes straight into actually creating code, unlike plan mode, which only defines what will work and how it will work, letting you decide whether you agree before moving forward.
And the result came out fast: the page was ready, even recognizing my own information based on what we had already built before.
Working by switching between plan and build, always with Shift + Tab, is what allows you to use OpenCode as a complete agent: not just to solve a one-off idea, but to manage an entire project. That's how /init works to create agents.md, and that's how you move between planning and building within OpenCode.
Column written by the editorial team based on Reinaldo Silotto's video on YouTube, with the author's permission.
Translated from the Brazilian Portuguese original · Read the original
VisionPsy2 runs sub-1B computer vision directly on phones, no cloud
Tether AI Research released VisionPsy2 on December 3, 2026, a family of vision-language models with fewer than 1 billion parameters that promises the quality of much larger models while running locally on smartphones.





