Repository navigation
Description
Summary
Enable OpenCode to manage multiple persistent terminal sessions through tmux integration, allowing it to handle complex workflows with parallel processes, persistent environments, and interactive CLI testing.
Current Limitations
- No persistence: Can't keep servers running while coding
- No parallelism: Can't run tests while dev server is active
- No interactive testing: Can't test CLIs that require user input
- No real-time monitoring: Can't observe and react to process output
Proposed Solution
Integrate tmux to enable:
- Multiple persistent terminal sessions
- Parallel process execution
- Send keystrokes/input to sessions (crucial for CLI testing)
- Real-time output monitoring
- Session switching and management
Key Benefits
1. Interactive CLI Testing
# OpenCode can now test CLIs that require user input\!
Session 1: npm init
→ Send: "my-app" (project name)
→ Send: "1.0.0" (version)
→ Send: "yes" (confirm)2. Full-Stack Development
Run entire stack in parallel:
- Frontend:
npm run dev - Backend:
node server.js - Database:
redis-server - Tests:
npm test --watch
3. Real-World Example
Current: "I can't fully test this auth flow because I'd need Redis running..."
With tmux: OpenCode starts Redis, runs the app, tests auth flow, monitors sessions, and confirms: "Auth flow tested successfully with proper session storage."
Implementation
Tmux provides a clean API for this functionality:
- Create/manage named sessions
- Send keystrokes to sessions (
tmux send-keys) - Capture output from sessions (
tmux capture-pane) - Check session status and health
This would be backwards compatible - OpenCode would detect tmux availability and fall back to current behavior if not present.
Why This Matters
- GitHub Copilot/Cursor/Aider: None support multiple persistent sessions
- Real Development: Developers always have multiple terminals open
- Complex Testing: Many tools require interactive input
- Better AI Assistance: OpenCode could actually verify its work
Conclusion
This single feature would make OpenCode the only AI assistant capable of truly testing and verifying complex applications, especially those with interactive CLIs or multiple services. It bridges the gap between "code generation" and "working software".
Activity
[-]Feature Request: Terminal Multiplexing Support for Enhanced Agent Capabilities[/-][+]Feature Request: Add `tmux` Support for Multi-Session Agent Testing[/+]nitsanavni commentedon Jul 24, 2025
I use this workflow a lot. Helpful in many situations. Great tool to have.
I use this custom slash command:
lee-b commentedon Jul 26, 2025
Additional potential use case: logging into various servers/containers/jails, for distributed systems/solutions. This is potentially very useful for using opencode to work on IaC, for example.
abda11ah commentedon Dec 24, 2025
Openhands handles it but it is running in docker isolated envirronment which adds a complexity layer for simple setups
thdxr commentedon Mar 25, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.