Skip to content

[FEATURE]: Add 'opencode agents' command for background session management #27746

Closed as not planned

Description

@alanZee

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 Description

Add an opencode agents command that provides an interactive TUI interface for managing background agent sessions, similar to Claude Code's claude agents command.

Motivation

Claude Code has a claude agents command that opens an interactive TUI view for managing background coding sessions. This allows users to:

  • View all running background sessions at a glance
  • Switch between sessions easily
  • Monitor session status and progress
  • Dispatch new sessions with specific settings (model, effort level, permissions)
    Currently, OpenCode manages background sessions through CLI commands (opencode session list, opencode -s <id>, opencode -c), which lacks the convenience of a unified interactive interface.

Proposed Solution

Add a new opencode agents command that:

  1. Opens an interactive TUI (similar to the main OpenCode TUI)
  2. Lists all background sessions with their status, model, and working directory
  3. Allows selecting a session to attach/resume
  4. Provides options to start new sessions with configurable settings
  5. Shows session statistics (token usage, cost, duration)
    Example usage:
# Open the agents management TUI
opencode agents
# Filter by working directory
opencode agents --cwd /path/to/project
# Set default model for new sessions from the TUI
opencode agents --model anthropic/claude-sonnet-4
# Set default effort level
opencode agents --effort high
Alternatives Considered
1. 
Enhance existing opencode session list: Could add interactive selection, but doesn't provide the full management experience
2. 
Add flags to opencode command: Could add --list-sessions flag, but doesn't provide a unified view
3. 
Create a separate opencode-tui tool: Could be a plugin, but core integration would be more seamless
Additional Context
This feature would align OpenCode with Claude Code's session management UX, making it easier for users to manage multiple concurrent coding tasks across different projects.
**Label:** `enhancement`

Activity

  1. github-actions commented on May 15, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Please review these issues to see if your request is already covered or if your proposal meaningfully differs from them.

  2. jonathannorris commented on May 25, 2026

    @jonathannorris

    Yea I agree that an opencode agents view would be great. Having to use Claude Code a bit more at work recently and I've found that claude agents to be a really good interface for working between multiple sessions without having many terminal tabs / window / panes open. It's great to have a single TUI interface for quickly switching between sessions and backgrounding tasks for review later.

  3. github-actions commented on Jul 25, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions