* fix(sandbox): wait for the guest agent before provisioning the exec user A freshly created microVM does not accept msb exec until its guest agent is up, so provisioning raced the boot and died on three 15s timeouts, which then failed the whole enforcement-enable path. Gate provisioning on msb ping bounded by SANDBOX_START_TIMEOUT_MS, give the exec a 30s budget, and downgrade a provisioning failure to a warning so a missing sudo entry never blocks sandboxed commands. * fix(sandbox): align canonical shell spec with msb and pin the rebuilt guest image - pass --shell /bin/sh explicitly at create and derive the canonical spec from the create args so msb 0.6.15 recordings match attestation - bump the SANDBOX_IMAGE pin to the rebuilt guest image digest - verify the provisioned exec user inside the guest and give the provisioning exec the full start timeout, bounded by a deadline * docs(sandbox): sync the image digest pin into the docker and environment docs * fix(sandbox): verify the guest image as an unknown uid and pin the rebuild The build verification ran as uid 1000, which is the base image's node user, so it exercised the known-user path and would have passed even if the numeric exec uid the runtime actually uses were broken. Verify the toolchain as uid 4242 instead and keep the sudo check on the known user, since sudo refuses unknown uids by design. Also only write the shadow entry when the passwd entry is created, so a uid that already exists leaves no orphan record. * fix(sandbox): close spawned command stdin so msb exec completes msb exec reads its stdin during session setup and waits for EOF, so every child spawned through executeCommand with an open stdin pipe hung until its timeout while identical CLI execs finished instantly. Spawn children with stdin ignored. Also verify the provisioned exec user from a fresh guest exec after each provisioning attempt and move failed provisioning to a logged background retry bounded by five attempts so a slow guest no longer blocks enforcement or leaves sudo silently missing. * test(sandbox): derive expected inspect spec from canonical builders * fix(sandbox): cancel provisioning retries on stop and serialize attempts Advance the provisioning retry generation and drop the pending retry at the start of every managed-sandbox stop, so a retry scheduled before a toggle-off no longer pings and provisions a stopped sandbox. Clearing the promise as well keeps later retries schedulable, since the generation guard would otherwise strand it and short-circuit scheduling. Route every provisioning caller through a single in-flight promise so the boot-path attempt and the background retry cannot run the check-then-append passwd and shadow script concurrently and append duplicate account entries.
Mobile-first web interface for OpenCode AI agents. Manage, control, and code from any device.
Quick Start
git clone https://github.com/chriswritescode-dev/opencode-manager.git
cd opencode-manager
cp .env.example .env
echo "AUTH_SECRET=$(openssl rand -base64 32)" >> .env
docker-compose up -d
# Open http://localhost:5003
On first launch, you'll be prompted to create an admin account. That's it!
For local development setup, see the Development Guide.
Features
- Repositories & Git — Multi-repo management, local discovery, SSH auth, worktrees, unified diffs, branch and commit management
- Chat & Sessions — Real-time SSE streaming, slash commands,
@filementions, Plan/Build modes, Mermaid diagram rendering - Files — Directory browser with tree view, syntax highlighting, create/rename/delete, ZIP download
- Assistant Mode — Dedicated AI workspace with auto-provisioned skills for schedules, notifications, settings, and repo operations
- Schedules — Recurring repo jobs with reusable prompts, run history, linked sessions, markdown-rendered output
- MCP Servers — Add, configure, authenticate, and manage local or remote MCP servers with OAuth support
- AI Configuration — Model/provider setup, API keys, OAuth for Anthropic and GitHub Copilot, custom agent definitions
- Skills — Extend agent capabilities with shareable, scoped skill definitions
- Notifications — Push notifications for session events, questions, errors, and completions
- Audio — Text-to-speech and speech-to-text (browser native and OpenAI-compatible APIs)
- Mobile & PWA — Responsive mobile-first UI, installable on any device, iOS-optimized
Architecture
OpenCode Manager is a pnpm workspace with three TypeScript packages:
backend/— Bun + Hono API server with Better Auth, SQLite migrations, OpenCode process management, SSE, schedules, and push notifications.frontend/— React + Vite SPA using React Router, TanStack Query, Radix UI/Tailwind, service worker support, and mobile-first navigation.shared/— shared Zod schemas, config helpers, types, and utilities consumed by both backend and frontend.
A MkDocs Material site (docs/) provides guides, feature docs, configuration, and troubleshooting.
Development
This repo uses pnpm workspaces for shared, backend, and frontend.
pnpm install
pnpm dev
pnpm lint
pnpm typecheck
pnpm test
See the Development Guide for local setup, scripts, database notes, and testing.
Configuration
# Required for production
AUTH_SECRET=your-secure-random-secret # Generate with: openssl rand -base64 32
# Pre-configured admin (optional)
ADMIN_EMAIL=admin@example.com
ADMIN_PASSWORD=your-secure-password
# For LAN/remote access
AUTH_TRUSTED_ORIGINS=http://localhost:5003,https://yourl33tdomain.com
AUTH_SECURE_COOKIES=false # Set to true when using HTTPS
For OAuth, Passkeys, Push Notifications (VAPID), and advanced configuration, see the Configuration Guide.
ocm CLI
OpenCode Manager ships an ocm CLI (from ocm-cli/) that attaches your local OpenCode TUI to a repo hosted on the Manager. It lists ready repos, attaches via the Manager's /api/opencode-proxy (so prompts run on the Manager's filesystem against a single shared OpenCode server), and can sync the working tree up or down with ocm push / ocm pull (fast git bundle + working-tree patch by default; pass --full for the legacy tarball mirror). Running ocm inside a local clone auto-detects the matching Manager repo by origin URL.
See the ocm CLI guide for setup and commands.
Documentation
- Getting Started — Installation and first-run setup
- Features — Deep dive on all features
- Configuration — Environment variables and advanced setup
- Troubleshooting — Common issues and solutions
- Development — Contributing and local development
ocmCLI — Attach local OpenCode TUI to Manager repos
License
MIT


