Prerequisites
- Entire CLI installed
- OpenCode installed
- A Git repository with Entire enabled
How It Works
Entire integrates with OpenCode through a TypeScript plugin that hooks into OpenCode’s event system. When you enable Entire with the OpenCode agent, the plugin is installed automatically:- 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
Captured Data
| 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 Support
Rewind to previous checkpoints during or after a session:| Flag | Description |
|---|---|
--to <commit> | Rewind to specific commit ID (non-interactive) |
--list | List available rewind points (JSON output) |
--logs-only | Only restore logs, don’t modify working directory |
--reset | Reset branch to commit (destructive) |
Resume Previous Sessions
Resume a previous OpenCode session by switching to its branch:- Checks out the specified branch
- Finds the session ID from commits unique to this branch
- Restores the session log if it doesn’t exist locally
- Shows the command to resume the session (e.g.,
opencode -s <session-id>)
| Flag | Description |
|---|---|
-f, --force | Resume from older checkpoint without confirmation |
Explain Commits
View or generate explanations of how code was written:| Flag | Description |
|---|---|
-c, --checkpoint <id> | Explain a specific checkpoint (ID or prefix) |
--commit <sha> | Explain a specific commit (SHA or ref) |
--full | Show full parsed transcript (all prompts/responses) |
-s, --short | Show summary only (omit prompts and files) |
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 viaopencode export so the checkpoint includes the latest agent activity.
Best Practices
Use Manual Commit Strategy
For terminal AI tools like OpenCode:Example Workflow
Troubleshooting
Session not detected
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
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
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
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