Skip to main content
Copilot CLI is GitHub’s AI-powered coding agent for the command line. Entire captures sessions from Copilot CLI, tracking file changes, conversation transcripts, and token usage. The Copilot CLI integration is still in preview and may contain bugs.

Prerequisites

How It Works

Entire integrates with Copilot CLI through its native hooks system. Enable it with:
entire enable --agent copilot-cli
This creates .github/hooks/entire.json, which Copilot CLI automatically discovers and executes at key lifecycle events:
  1. Session Detection - Copilot CLI fires hooks on session start and end
  2. Turn Tracking - Each prompt and agent response is captured via hooks
  3. Checkpoint Creation - Created when you or the agent make a Git commit
  4. Transcript Capture - Session transcripts are read from Copilot CLI’s JSONL event log
  5. Session Storage - Data saved to entire/checkpoints/v1 branch
You can commit .github/hooks/entire.json to your repository so your team gets Entire integration automatically.

Captured Data

DataDescription
ConversationFull transcript of prompts and responses
File changesAll files modified during the session
Token usageInput, output, and cache tokens
TimestampsSession and checkpoint timing
CheckpointsRewind points within sessions

Features

Rewind Support

Rewind to previous checkpoints during or after a session:
# Interactive mode
entire rewind

# Or rewind to a specific checkpoint
entire rewind --to <checkpoint-id>

# List available rewind points
entire rewind --list
FlagDescription
--to <commit>Rewind to specific commit ID (non-interactive)
--listList available rewind points (JSON output)
--logs-onlyOnly restore logs, don’t modify working directory
--resetReset branch to commit (destructive)

Resume Previous Sessions

Resume a previous Copilot CLI session by switching to its branch:
entire resume <branch>
This command:
  1. Checks out the specified branch
  2. Finds the session ID from commits unique to this branch
  3. Restores the session log if it doesn’t exist locally
  4. Shows the command to resume the session (e.g., copilot --resume <sessionId>)
FlagDescription
-f, --forceResume from older checkpoint without confirmation

Explain Commits

View or generate explanations of how code was written:
# Explain a specific commit
entire explain --commit abc1234

# Explain a specific checkpoint
entire explain --checkpoint a3b2c4d5

# Generate an AI summary
entire explain --checkpoint a3b2c4d5 --generate

# Show full transcript
entire explain --full
FlagDescription
-c, --checkpoint <id>Explain a specific checkpoint (ID or prefix)
--commit <sha>Explain a specific commit (SHA or ref)
--generateGenerate an AI summary for the checkpoint
--fullShow full parsed transcript (all prompts/responses)
-s, --shortShow summary only (omit prompts and files)
The --generate flag requires Claude CLI to be installed and authenticated.

Best Practices

Commit at Logical Points

Commit when you’ve made meaningful progress:
git add .
git commit -m "Implement feature with Copilot assistance"

Review Sessions in PRs

Share session context in pull request reviews:
  1. Create a PR
  2. Commits include Entire-Checkpoint trailers
  3. Reviewers can click to view session details
  4. Understanding why code was written helps with review

Example Workflow

# 1. Setup
cd my-project
entire enable --agent copilot-cli

# 2. Start Copilot CLI
copilot

# 3. Work with Copilot
# Ask it to write code, make changes, etc.

# 4. Check session (in another terminal)
entire status

# 5. Rewind if needed
entire rewind

# 6. Commit when ready
git add .
git commit -m "Add feature with Copilot"

# 7. Push to see on entire.io
git push

Troubleshooting

  1. Ensure you’re in an Entire-enabled repo: entire status
  2. Verify hooks are installed: check .github/hooks/entire.json exists
  3. Make sure Copilot CLI is running from within the repository
  4. Run entire enable --agent copilot-cli to reinstall hooks
  1. Checkpoints require file changes
  2. Make sure Copilot is modifying files in the repository
  3. Check your settings in .entire/settings.json
  1. Verify Copilot CLI is writing events to ~/.copilot/session-state/
  2. Check that the session has a valid events.jsonl file
  3. Token usage is only fully available after the session ends

Limitations

  • Token usage is only available in aggregate after the session ends, not mid-session
  • No subagent start hook — only subagent stop events are captured
  • The userPromptSubmitted hook fires before sessionStart on the first prompt (handled automatically)
  • Works best when you commit at logical stopping points, or tell the agent to handle committing