OpenCode - Entire
OpenCode Integration
OpenCode is an AI-powered terminal coding agent. Entire integrates with OpenCode via its plugin system, automatically capturing sessions and checkpoints. The OpenCode integration is in preview and may contain bugs.
Prerequisites
- Entire CLI installed
- OpenCode installed
- A Git repository with Entire enabled
Enable
entire agent add opencode
opencode
entire agent add opencode installs a TypeScript plugin that hooks into OpenCode’s event system.
How it works
The plugin communicates with Entire via hooks:
- Session Detection — the plugin fires on
session.createdevents. - Turn Tracking — each user prompt triggers
turn-start; when the agent goes idle,turn-endfires. - Transcript Export — on
turn-end, Entire callsopencode exportto capture the full transcript. - Checkpoint Creation — checkpoints are created based on your strategy.
- Session Storage — data saved to the
entire/checkpoints/v1branch.
What gets captured
| Data | Description |
|---|---|
| Conversation | Full transcript of prompts and responses |
| File changes | Files modified via edit, write, and patch tools |
| Tool calls | Tool invocations with inputs and outputs |
| Token usage | Input, output, reasoning, and cache tokens |
| Timestamps | Session, message, and checkpoint timing |
Features
Rewind during sessions. Use entire checkpoint rewind to restore to a previous checkpoint during or after an OpenCode session. When you rewind, Entire reimports the checkpoint-state transcript into OpenCode’s database so you can continue seamlessly. See the checkpoint rewind command reference for full flag documentation.
Resume previous sessions. Switch to a session’s branch with entire session resume BRANCH. The CLI restores the session log if needed and prints opencode -s SESSION_ID. See the session resume command reference for full flag documentation.
Explain commits. Inspect any commit or checkpoint with entire checkpoint explain. See the checkpoint explain command reference for full flag documentation.
Mid-turn commits. When OpenCode commits during a turn (before the turn ends), Entire captures a checkpoint for that commit. The transcript is fetched on-demand via opencode export so the checkpoint includes the latest agent activity.
Caveats and limitations
- The integration is in preview and may have rough edges.
- Plugin requires Bun runtime (used by OpenCode’s plugin system).
- Session detection relies on OpenCode’s event system.
- Works best with the manual-commit strategy.
Best practices
Use the manual-commit strategy. For terminal AI tools like OpenCode:
entire agent add opencode
Commit when you’ve made meaningful progress:
git add .
git commit -m "Implement feature with OpenCode"
Example workflow
# 1. Enable Entire with OpenCode
cd my-project
entire agent add opencode
# 2. Start OpenCode
opencode
# 3. Work with OpenCode
# Ask it to write code, make changes, etc.
# 4. Rewind if needed
entire checkpoint rewind
# 5. Commit when ready
git add .
git commit -m "Add feature with OpenCode"
# 6. Push to see on entire.io
git push
Your session is now visible on entire.io with full context for code review.
Troubleshooting
Session not detected
- Ensure you’re in an Entire-enabled repo:
entire status - Verify OpenCode is running from within the repository
- Check that the plugin is installed: look for the Entire plugin in your OpenCode config
- Check Git hooks are installed:
ls .git/hooks
No checkpoints created
- Checkpoints require file changes — ensure OpenCode is modifying files
- Check your strategy settings in
.entire/settings.json - Verify
opencode exportworks:opencode export <session-id>
Transcript not captured
- The plugin calls
opencode exportto fetch transcripts — ensure this command works - Check that the
.opencodedirectory exists in your repository - Look for errors in the Entire hook output: run
entire hooks opencode turn-endmanually.