From claude-codex
Pause session with auto-save and cleanup, resume later with /resume
npx claudepluginhub aventerica89/claude-codex --plugin claude-codex# Pause Command
Pause your work session with automatic context saving, cleanup, and easy resume.
## Arguments
Parse `$ARGUMENTS` for optional flags:
- No arguments - Full pause (save context, commit WIP, sync codex, stop servers)
- `--quick` or `-q` - Quick pause (just save context, no cleanup)
- `--no-commit` - Skip WIP commit
- `--no-sync` - Skip codex sync
## Behavior
### 1. Save Context
Create a context snapshot with auto-generated ID:
Save to `~/.claude/contexts/{contextId}.md` including:
- Current working directory
- Git branch and status
- Current task/goal
- Recent decisions.../pauseSaves optional notes to .vbw-planning/RESUME.md with timestamp and resume hint, pauses session with confirmation banner. State auto-persists; requires /vbw:init.
/pausePauses the session: consolidates memory, syncs documentation, saves orchestration data, reports task status, persists git state to JSON for resume.
/pausePauses the current Alfred development session via Python helper or manual mode, producing handoff JSON/MD files, updating state with pause info for resumption.
/pausePauses the orchestrator gracefully after the current task completes by creating a pause flag file, updating project state, and displaying confirmation with resume instructions.
/pauseSaves the current Claude Code session state for later resumption, preserving your work and context exactly as-is.
/pausePause fitness breaks — for deep focus, calls, or demos. Breaks resume automatically or with /clawdbod:resume.
Pause your work session with automatic context saving, cleanup, and easy resume.
Parse $ARGUMENTS for optional flags:
--quick or -q - Quick pause (just save context, no cleanup)--no-commit - Skip WIP commit--no-sync - Skip codex syncCreate a context snapshot with auto-generated ID:
{project-name}-{timestamp}
Save to ~/.claude/contexts/{contextId}.md including:
Write to ~/.claude/pause-state.json:
{
"projects": {
"/full/path/to/project": {
"contextId": "project-2026-01-31-155011",
"timestamp": "2026-01-31T15:50:11.056Z",
"branch": "main",
"summary": "Brief summary of what was being worked on",
"uncommittedFiles": 3,
"lastCommand": "pause",
"nextSteps": [
"Complete agent detail views",
"Add click-through navigation"
]
}
}
}
Important fields:
branch - Critical for /start to detect mismatcheslastCommand - pause vs end indicates session typenextSteps - Array of actionable next tasksIf there are uncommitted changes:
git add -A
git commit -m "WIP: {brief description of current work}
Paused at: {timestamp}
Context: {contextId}
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>"
If there are changes in ~/.claude/:
/codex-sync automaticallyStop running development processes:
# Check for common dev servers
lsof -ti:3000,3001,4000,5173,5174,8080,8000 | xargs kill -9 2>/dev/null
# Or use fuser if available
fuser -k 3000/tcp 2>/dev/null
Session paused ✓
Context saved: project-2026-01-31-155011
WIP committed: "WIP: working on sync commands"
Codex synced: 3 files
Dev servers stopped
Session summary:
- Created /codex-sync and /codex-fetch commands
- Renamed for better discoverability
- Updated bidirectional sync logic
Resume with: /resume
(no need to remember the context ID - it's automatic)
User: /pause
Claude: Pausing session...
[Saves context]
[Commits WIP changes]
[Syncs codex]
[Stops dev servers]
Session paused ✓
Context: crucial-prairie-2026-01-31-155011
WIP commit: "WIP: refactoring auth system"
Codex synced: No changes
Servers stopped: :3000, :5173
Session summary:
- Refactored auth middleware
- Added JWT validation
- Updated tests (8 passing)
Resume with: /resume
User: /pause --quick
Claude: Quick pause...
Context saved: my-app-2026-01-31-160022
(Skipped WIP commit, codex sync, cleanup)
Resume with: /resume
User: /pause --no-commit
Claude: Pausing session...
Context saved: project-2026-01-31-161045
Codex synced: No changes
Servers stopped: :3000
Note: Uncommitted changes NOT committed (--no-commit)
You have 5 uncommitted files
Resume with: /resume
~/.claude/pause-state.json - Global pause state for all projects
This file is:
/pause/pause/resumeDiffers from /context-save:
Differs from /end:
Use /pause when:
Use /end when:
If git operations fail:
If codex sync fails:
If server stop fails: