Skip to content

[FEATURE]: Add Advanced Session Management Commands (Claude Code Parity) #18715

Closed as not planned

Description

@lwkyourgjh

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
  • 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

  1. Productivity: Reduce context switching and improve workflow efficiency
  2. Safety: Better recovery mechanisms and experimentation capabilities
  3. Insights: Data-driven optimization of AI-assisted development
  4. Collaboration: Improved sharing and remote work capabilities
  5. 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, /compact commands

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

  1. added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Mar 23, 2026
  2. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Mar 23, 2026
  3. github-actions commented on Mar 23, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • The description appears to be AI-generated: it bundles 7 separate feature requests into one issue with an elaborate multi-section structure (Summary, Desired Features, Benefits, Implementation Considerations, Prior Art). Please scope this to a single, focused feature request and write it in your own words. If you want multiple features, open separate issues for each.

    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:

    If you believe this was flagged incorrectly, please let a maintainer know.

  4. github-actions commented on Mar 23, 2026

    @github-actions
    Contributor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

coreAnything pertaining to core functionality of the application (opencode server stuff)discussionUsed for feature requests, proposals, ideas, etc. Open discussion

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions