All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
This project is a fork of 13rac1/openclaw-plugin-claude-code. Versions 1.x.x are from the upstream project. Version 2.0.0 marks the fork divergence.
2.0.0 - 2026-03-17
This is a full architectural rewrite replacing Claude Code with OpenCode. The tool interface (6 tools, same parameter shapes) is preserved, but tool names and internal behavior have changed.
- Tool names renamed:
claude_code_*->opencode_* - Authentication changed: No longer uses
~/.claude/.credentials.jsonorANTHROPIC_API_KEY. Requiresopencode auth loginwhich stores credentials at~/.local/share/opencode/auth.json. - Config field renamed:
startupTimeout->serverReadyTimeout - Sessions directory default:
~/.openclaw/claude-sessions->~/.openclaw/opencode-sessions - Plugin ID changed:
claude-code->opencode - Package renamed:
@13rac1/openclaw-plugin-claude-code->@13rac1/openclaw-plugin-opencode - Webhook session key prefix:
hook:claude-code:->hook:opencode:
- OpenCode SDK integration: Communicates with OpenCode via HTTP API (
@opencode-ai/sdk) instead of parsing CLI stdout - Provider-agnostic: Works with any of 75+ LLM providers OpenCode supports (Anthropic, OpenAI, Google, Groq, local models, etc.)
- Long-lived server containers: One OpenCode server per session, reused across multiple jobs (no cold-start on subsequent jobs)
- Dynamic port mapping:
podman run -p 0:4096with automatic port readback viapodman port - Server health checks:
GET /global/healthwith exponential backoff before sending first prompt - Smart orphan recovery: Reconnects to orphaned but healthy servers by reading their port mappings, instead of killing them
- Session-level server port tracking:
serverPortfield in session state for server reuse - New
opencode-client.tsmodule:waitForServerReady,createContainerClient,createSession,sendPrompt,abortSession,checkHealth,getSessionMessages - Baked-in
opencode.jsonconfig in Dockerfile with"permission": "allow"for headless use
- Container image: Installs
opencode-aiinstead of@anthropic-ai/claude-code - Container user:
claude(UID 1000) ->opencode(UID 1000) - Container entrypoint:
opencode serve --port 4096 --hostname 0.0.0.0instead ofbash -c 'claude -p "..." --output-format stream-json' - Container prefix:
claude-->opencode- - Volume mounts:
~/.claudereplaced by~/.config/opencodeand~/.local/share/opencode updateSession()now takes an object{ opencodeSessionId?, serverPort? }instead of a single string- Cancel tool: attempts API abort before killing container
- Stream-json stdout parser (
stream-parser.ts) — replaced by SDK-based HTTP client - Claude Code CLI invocation and
--dangerously-skip-permissionsflag ANTHROPIC_API_KEYenvironment variable support (useopencode auth logininstead)- OAuth/Claude Max credential file detection
- Rate limit and auth-expired error detection via stdout regex
rate_limitandauth_expirederror types
1.0.12 - 2026-02-23
- Inject host git identity into containers via
GIT_AUTHOR_NAME,GIT_AUTHOR_EMAIL,GIT_COMMITTER_NAME,GIT_COMMITTER_EMAILenv vars - Refuse to start if host git identity (
user.name,user.email) is not configured delete_workspacesparameter onclaude_code_cleanupfor explicit workspace deletion
claude_code_cleanupno longer destroys workspace data (code, files, git history) — only session metadata is removed by default
1.0.11 - 2026-02-20
- Detect Claude Code authentication errors (expired OAuth tokens) and report to agent
- Detect Claude Code rate limit errors and report wait time to agent
- Real-time streaming output via
streamContainerLogs(replaces polling) - Job completion notifications via webhook (no polling required)
claude_code_sessionstool for listing all active sessions
- Mount host
~/.claudedirectly so OAuth token refreshes persist across jobs - Prevent race condition in concurrent job output streaming
- Rootless Podman UID mapping with
--userns=keep-id:uid=1000,gid=1000
npm testnow runs formatter and linter checks before tests- Extracted shared formatting utilities (
formatDuration,formatBytes) - Improved type safety, error handling, and code clarity
1.0.0 - 2026-02-12
- Initial public release
claude_codetool for executing prompts in isolated containersclaude_code_cleanuptool for cleaning up idle sessions- Session persistence with automatic state tracking
- Dual authentication support (API key and OAuth/Claude Max)
- Configurable resource limits (memory, CPU, PIDs)
- AppArmor profile support for additional security
- Startup and idle timeout detection
- Multi-arch container image (arm64, amd64)
- Comprehensive test suite (unit and integration)
- Rootless container execution via Podman
- All Linux capabilities dropped (
--cap-drop ALL) - tmpfs with noexec for /tmp
- Configurable network isolation
- Optional AppArmor MAC enforcement