> ## Documentation Index
> Fetch the complete documentation index at: https://docs.entire.io/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenCode

> Capture OpenCode transcripts, file changes, tool calls, and token usage with Entire

The OpenCode integration uses a project-level TypeScript plugin and is in preview.

Follow [Set Up an Agent](/agents/setup) for shared installation, verification, and troubleshooting steps.

## Add OpenCode

```bash theme={null}
entire agent add opencode
opencode
```

Entire writes `.opencode/plugins/entire.ts`. The plugin captures session and turn events, then uses `opencode export` to materialize the full conversation, file changes, tool calls, and token usage.

OpenCode supports commits before a turn ends. Entire refreshes the exported transcript so a checkpoint created mid-turn includes the agent activity available at that point.

## Limitations

OpenCode does not expose subagent lifecycle events. Entire captures the main session. `entire import` cannot import existing OpenCode sessions.

## Resume

`entire session resume BRANCH` restores the recorded session data when needed and prints:

```bash theme={null}
opencode -s SESSION_ID
```

See the [`session resume` command reference](/cli-reference/session#session-resume) for flags and additional behavior.
