opencode-acp-control

Manage OpenCode ACP sessions, prompts, and updates via JSON-RPC 2.0.

19|4|Updated Jan 11, 2026
One-click install
npx skills add https://github.com/bjesuiter/opencode-acp-skill --skill opencode-acp-control
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: opencode-acp-control
Source: https://github.com/bjesuiter/opencode-acp-skill/tree/main/src/skills/opencode-acp-control
Command: npx skills add https://github.com/bjesuiter/opencode-acp-skill --skill opencode-acp-control

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

OpenCode ACP control provides a direct, scriptable interface to manage OpenCode sessions, prompts, and updates without reliance on a GUI, enabling autonomous AI workflows.

Core Features & Use Cases

  • Start OpenCode ACP sessions in the background and connect via JSON-RPC.
  • Send prompts and stream responses in real time.
  • Resume previous sessions and preserve full conversation history.
  • Check OpenCode versions and trigger auto-update workflows.

Quick Start

Use the opencode-acp-control skill to initiate an ACP session and start interacting with OpenCode.

Start an OpenCode ACP process in the background:

  • bash(command: "opencode acp --cwd /path/to/your/project", background: true, workdir: "/path/to/your/project")

Initialize the connection and create a session:

  • process.write(sessionId: "bg_xxx", data: '{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"protocolVersion":1,"clientCapabilities":{"fs":{"readTextFile":true,"writeTextFile":true},"terminal":true},"clientInfo":{"name":"clawdbot","title":"Clawdbot","version":"1.0.0"}}}')
  • process.write(sessionId: "bg_xxx", data: '{"jsonrpc":"2.0","id":1,"method":"session/new","params":{"cwd":"/path/to/your/project","mcpServers":[]}}')

Prompt example:

  • process.write(sessionId: "bg_xxx", data: '{"jsonrpc":"2.0","id":2,"method":"session/prompt","params":{"sessionId":"sess_abc","prompt":[{"type":"text","text":"List files"}]}}')
  • process.poll(sessionId: "bg_xxx") # poll every 2 seconds to stream updates

Stop when done:

  • process.kill(sessionId: "bg_xxx")

Frequently Asked Questions about opencode-acp-control

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

FAQPage Schema
How do I manage OpenCode sessions using ACP without a GUI?▼

OpenCode ACP control manages sessions, prompts, and updates without a GUI by implementing JSON-RPC 2.0. It provides a direct, scriptable interface to start background ACP sessions, send prompts, and stream responses, enabling autonomous AI workflows.

How do I start an OpenCode ACP session and send a prompt via JSON-RPC?▼

To start an OpenCode ACP session, run the 'opencode acp' command in the background, then send an 'initialize' JSON-RPC request followed by 'session/new'. Once the session is created, send prompts by writing a 'session/prompt' JSON-RPC message and polling the process for real-time updates.

Can I resume a previous OpenCode ACP conversation and keep the history?▼

Yes, you can resume previous OpenCode ACP conversations while preserving full conversation history. The skill implements the 'session/load' lifecycle command, allowing you to reconnect to existing sessions and continue interactions seamlessly within your automated workflows.

Does the OpenCode ACP control support checking versions and triggering auto-updates?▼

Yes, the OpenCode ACP control supports checking OpenCode versions and triggering auto-update workflows. It manages OpenCode updates across projects by utilizing the JSON-RPC 2.0 protocol to handle version checks and update processes within your automated environments.

What is the best way to handle ACP session updates and cancellations in automated workflows?▼

The best way to handle ACP session updates and cancellations is by using the 'session/update' and 'session/cancel' JSON-RPC lifecycle commands. This skill tracks state using sessionId, processSessionId, and id counters to manage these operations and kill background processes when done.