Harness: OpenCode
Agents on OpenCode (the OpenCode Go subscription): running opencode run without a person, editing files only in the project folder, with no command line and no network; a sensor that the CLI exists.
About the package
OpenCode is an open agent CLI (opencode). Without a person it works through opencode run <message>.
How to install. curl -fsSL https://opencode.ai/install | bash, then opencode auth login. The models come from the OpenCode Go subscription (provider opencode-go), the free opencode/... ones, or your own providers from ~/.config/opencode/opencode.json. The package does not read keys.
Models. In the form provider/model: opencode-go/deepseek-v4.1-flash (the default in the package), opencode-go/glm-5.3, opencode-go/kimi-k3. The list is opencode models. The agent's effort goes to --variant.
Command.
OPENCODE_CONFIG_CONTENT='{"permission":{"edit":"allow","bash":"deny","webfetch":"deny","websearch":"deny","external_directory":"deny"}}'
opencode run --pure --dir <folder> -m <model> -- <prompt>
Rights.
- The rights are the
permissionsetting on top of the user settings: editing files (edit) only withaccess: write; folders outside the working one are not allowed. - There is never a command line (
bash): otherwise the rights on files and network cannot be held. - There is no network:
webfetchandwebsearchare allowed only withnetwork: true. --puremeans without the user's third-party plugins.
Sensor version: opencode --version. If there is no CLI, a warning; the check does not fail.
Actions 2
| Name | What it does | File | When |
|---|---|---|---|
| ask | Run an agent on the OpenCode harness (without a person, logged to the run log) | actions/ask.ts | shtuk run |
| version | Sensor: the CLI is found and answers --version (looks only) | checks/version.ts | check |
shtuk check runs the checks; shtuk run harness-opencode <name> runs any action. "After install" actions run by themselves only if the package comes from a trusted source.
Package files 4
They go into .shtukbase/packages/harness-opencode/; actions run from there.