shtukbasehub

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.

Packageharness-opencodev0.1.05 files

Harness: OpenCode

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 permission setting on top of the user settings: editing files (edit) only with access: 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: webfetch and websearch are allowed only with network: true.
  • --pure means without the user's third-party plugins.

Sensor version: opencode --version. If there is no CLI, a warning; the check does not fail.