Core plugins (standard mode)
These plugins are installed by default in standard mode and higher.opencode-direnv (simonwjackson)
Purpose: auto-load env vars from.envrc when entering directories.
Install:
- Create
.envrcin project root:
- Run
direnv allow - Variables auto-load when you enter the directory
agentmap (remorses)
Purpose: tree view of codebase for better context in headless VPS environments. Install:- Type
maportreein OpenCode to see project structure - Helps AI understand full codebase layout
opencode-sync (tctinh)
Purpose: sync OpenCode settings and history across machines via GitHub Gist. Install:- Create GitHub PAT with
gistscope - Run
opencode sync loginand enter token - Push:
opencode sync push - On new machine:
opencode sync pull
ai-sessions-mcp (yoavf)
Purpose: search and reference past OpenCode sessions. Install:search "previous work on auth"- find relevant past sessionssession:last- reference last session context
Session management
ccmanager (kbwo)
Purpose: visual session manager with real-time status indicators. Install:ccmanager- launch interactive TUIccmanager list- list all sessions- Shows status: busy / waiting / idle per session
agent-of-empires (njbrake)
Purpose: alt session manager using tmux + git worktrees. Install:--with-agent-of-empires --no-ccmanager to switch.
Optional plugins (full/custom)
opencode-worktree-session (felixAnhalt)
Purpose: automatic git worktree per OpenCode session with auto-cleanup. Install:opencode.json:
- Run
opencode - Prompt asks for branch suffix (example:
feature-auth) - Plugin creates
opencode/feature-authbranch + worktree - AI works in isolated env
- On exit: auto-commits, pushes branch, removes worktree
- No main branch pollution
- Each task in isolated branch
- Auto cleanup
- Refuses to run on main (safety)
opencode-session-handoff
Purpose: compact continuation when sessions hit context limit. Configure inopencode.json:
- Session fills up
- Say
handoff - New session starts with continuation prompt
Plugin configuration
Edit.opencode.config.json to enable/disable plugins:
opencode.json instead.
Troubleshooting
Plugin not loading
- Check plugin exists in
~/.config/opencode/plugins/ - Verify plugin name matches enabled list
- Restart OpenCode session
- For npm plugins: verify global install with
npm list -g
sync plugin auth fails
- Regenerate GitHub token with
gistscope - Run
opencode sync loginagain - Check token not expired
direnv not loading
- Ensure
.envrcexists - Run
direnv allowafter changes - Check
.envrcsyntax
worktree-session not activating
- Verify install:
npm list -g @tmegit/opencode-worktree-session - Check
opencode.jsonplugin entry - Ensure you are not on main (plugin refuses)
session-handoff not working
- Verify
opencode.jsonconfig - Say
handoff(exact) - Confirm context actually filled