Repository navigation
Description
Feature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Feature Request: Add Advanced Session Management Commands (Claude Code Parity)
Summary
I propose adding a set of advanced session management commands to OpenCode that are currently available in Claude Code. These commands would significantly improve developer productivity and workflow management.
Desired Features
1. /rewind (or /checkpoint)
- Purpose: Rewind conversation and/or code to a previous checkpoint
- Functionality:
- Restore both conversation history and code changes to a specific point
- Option to rewind only conversation (keep code changes) or only code (keep conversation)
- Support for selective rollback with auto-checkpoints
- Use case: Experiment with different approaches without losing progress; recover from mistakes
2. /insights
- Purpose: Generate usage analytics report
- Functionality:
- Analyze session patterns, costs, tool usage, and productivity metrics
- Generate HTML/Markdown report with visualizations
- Track trends over time (weekly/monthly)
- Use case: Identify workflow inefficiencies and optimize AI-assisted development
3. /simplify
- Purpose: Code quality review and simplification
- Functionality:
- Multi-agent review pipeline (architecture, duplication, performance)
- Focus on recently changed files
- Actionable suggestions for code improvement
- Use case: Pre-commit code quality check, technical debt reduction
4. /fork (or /branch)
- Purpose: Branch conversation session
- Functionality:
- Create independent session branch from current point
- Preserve original session while exploring alternatives
- Easy switching between branches
- Use case: Parallel exploration of different solutions
5. /loop
- Purpose: Automated task execution
- Functionality:
- Execute commands on intervals (e.g.,
/loop 5m check build status) - Background monitoring and automation
- Integration with CI/CD workflows
- Execute commands on intervals (e.g.,
- Use case: Continuous monitoring, automated testing, repetitive tasks
6. /remote-control (or /rc)
- Purpose: Remote session management
- Functionality:
- Control session from web interface (claude.ai equivalent)
- Monitor long-running tasks remotely
- Send instructions and receive updates
- Use case: Monitor overnight builds, collaborate remotely
7. Enhanced /export
- Purpose: Advanced session export capabilities
- Functionality:
- Multiple formats (Markdown, JSON, HTML)
- Selective export (specific message ranges)
- Include file changes and tool execution history
- Use case: Documentation, handovers, debugging session history
Benefits
- Productivity: Reduce context switching and improve workflow efficiency
- Safety: Better recovery mechanisms and experimentation capabilities
- Insights: Data-driven optimization of AI-assisted development
- Collaboration: Improved sharing and remote work capabilities
- Parity: Feature parity with industry-leading tools (Claude Code)
Implementation Considerations
- Could leverage existing custom command system with built-in optimizations
- May require session state management enhancements
- Consider performance impact for long-running sessions
- Integration with existing
/undo,/redo,/compactcommands
Additional Context
These features represent proven functionality in Claude Code that has shown significant value to developers. Many of these (like /rewind with selective rollback) solve critical workflow challenges that aren't addressed by simple undo/redo mechanisms.
Prior Art
- Claude Code's checkpointing and rewind system
- Custom command system already in OpenCode
- Existing session management commands (
/undo,/redo,/compact)
Thank you for considering these enhancements. These features would substantially improve OpenCode's value proposition for professional developers working on complex projects.
Activity
github-actions commentedon Mar 23, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
/branchcommand to create a new session with compacted context (overlaps with your/forkproposal)opencode session exportto markdown or json #9387:opencode session exportto markdown or json (overlaps with your enhanced/exportproposal)/rewind//checkpointproposal)/forkand rewind)/loopproposal)/compactcommand, auto-compaction, and fork-aware conversationsIf you believe this was flagged incorrectly, please let a maintainer know.
github-actions commentedon Mar 23, 2026
This issue has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.
Feel free to open a new issue that follows our issue templates.