OpenCode
How LinkCode runs OpenCode, including setup, its provider-driven model catalog, agents as approval policies, and config-driven permission behavior.
OpenCode is the agent whose behavior is most driven by your own OpenCode configuration: its model catalog comes from the providers you've connected to it, its approval policies are its own agent definitions, and whether it asks before acting is a setting on your side, not LinkCode's.
Set it up
The first time you pick OpenCode, LinkCode either finds an opencode install already on your machine — on the host's PATH or in the usual locations, including ~/.opencode/bin — or offers to Download the version this release was tested against. See agents.
Sign in and models
LinkCode has no sign-in flow of its own for OpenCode. Two paths:
- Use OpenCode's own sign-in. Whatever providers you've configured for
opencodeare what LinkCode offers — the model picker lists the models your connected providers actually expose, read from OpenCode at thread start. - Connect an account under Settings → Providers. Because the credential is injected when the thread starts, the model picker is then scoped to that account's provider, and switching to a different provider's model mid-thread is rejected rather than silently ignored.
Model changes apply from the next turn. There's no reasoning-effort control — OpenCode has no equivalent setting.
Approval
OpenCode's approval policies are its agents. The composer's shield menu lists the primary agents your configuration defines — Build, Plan, anything you've added — and picking one routes the next turn through it.
Whether a turn stops to ask you anything is decided by your own OpenCode permission configuration. Out of the box OpenCode allows tools without asking; where your config says ask, LinkCode shows a normal permission request and your answer (including "always", which OpenCode saves as a rule) goes back to it. OpenCode can also ask multiple-choice questions, which appear the same way.
If LinkCode can't read your agent list when a thread starts, the policy menu is hidden for that thread rather than showing a wrong one.
Commands and shell
Start a message with / for OpenCode's commands and skills, or with $ to run a shell command under the selected agent.
Thread history
Listing, reading, and resuming OpenCode threads all work, including threads you started outside LinkCode. A resumed thread picks up the model and agent it last used.
One thing to know: LinkCode follows OpenCode's turn stream over a single live connection. If that connection drops while a turn is running, the thread stops rather than silently continuing — send again to pick it back up.
File edits render as plain text rather than as diff cards; see the agent comparison.