opencode-driver

Delegate coding tasks to a shared OpenCode server via oc and ocm CLI commands.

1|Updated Aug 13, 2026
One-click install
npx skills add https://github.com/corv89/hermes-stack --skill opencode-driver-corv89
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: opencode-driver
Source: https://github.com/corv89/hermes-stack/tree/main/skills/opencode-driver
Command: npx skills add https://github.com/corv89/hermes-stack --skill opencode-driver-corv89

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Coordinating an external autonomous coding agent over HTTP is error-prone: sessions get lost, timeouts kill clients while work continues server-side, and vague prompts produce mismatched changes. This Skill provides a disciplined API-first workflow for delegating features, refactors, fixes, and code reviews to a shared OpenCode v2 server. ## Core Features & Use Cases - Blocking and multi-turn delegation: Run one-shot tasks with oc or continue persistent server-side sessions with oc --session <id> for iterative work. - Model and agent switching: Change the model, provider, or agent (build/plan) mid-session with ocm without losing session context. - Spec-driven delegation (CDD): Write change specs with ground-truth citations, invariants, and verification steps to /workspace, then hand them off by file reference. - Use Case: You need input validation added to an API endpoint. Write a spec to /workspace/validation-spec.md, run oc "Apply the change spec in /workspace/validation-spec.md" in background mode, then verify the result with git -C /work/<repo> diff --stat. ## Quick Start Ask the agent to delegate a coding task by running oc with a clear intent statement, for example: use oc to add retry logic to the API client and update its tests, running in background mode from /work.

Frequently Asked Questions about opencode-driver

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I delegate a coding task to OpenCode from the command line?

Run oc with a clear intent statement, such as oc "Add retry logic to the API client and update the tests", from the /work directory. Use background mode with notify_on_complete for anything that might exceed the 600-second foreground terminal cap.

How do I continue a multi-turn OpenCode session?

Capture the session id printed to stderr on the first oc call, then run oc --session <id> "follow-up instruction" for each subsequent turn. The continued session keeps its model and agent; change them with the ocm command.

How do I switch the model or agent in an existing OpenCode session?

Use ocm with the model name, for example ocm qwen3.8-max, optionally adding --provider or --agent plan. It targets the most recently used session by default, or a specific one with --session <id>.

What happens when an oc command times out?

A timeout (exit code 3) kills only the client wrapper; the server-side session keeps running. Reattach with oc --session <id> "continue" or collect results via the opencode-async pattern instead of reporting failure.

Can I edit project files directly instead of delegating to OpenCode?

No. The project at /work is mounted read-only for the orchestrator; all edits must go through oc, which holds the read-write mount. You may write plans and specs to the shared /workspace directory, which OpenCode reads but cannot write.

Why does an OpenCode session hang with empty replies?

Sessions hang silently when prompts reference paths outside the server's mounts. Only reference files under /work or /workspace; stage any external source file into /workspace first and cite it from the spec.