[PR #5460] fix: add --session flag to attach command #11411

Closed
opened 2026-02-16 18:16:14 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/5460

State: closed
Merged: Yes


Summary

  • Adds --session/-s option to the attach command
  • Passes sessionID to tui() so users can open a specific session when attaching to a running server

Usage: opencode attach http://localhost:4096 -s <session_id>

Test plan

  • Start server with opencode serve --port 4096
  • Attach with session flag: opencode attach http://localhost:4096 -s <existing_session_id>
  • Verify TUI opens directly to that session

Fixes #5445

🤖 Generated with Claude Code

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/5460 **State:** closed **Merged:** Yes --- ## Summary - Adds `--session`/`-s` option to the `attach` command - Passes `sessionID` to `tui()` so users can open a specific session when attaching to a running server Usage: `opencode attach http://localhost:4096 -s <session_id>` ## Test plan - [ ] Start server with `opencode serve --port 4096` - [ ] Attach with session flag: `opencode attach http://localhost:4096 -s <existing_session_id>` - [ ] Verify TUI opens directly to that session Fixes #5445 🤖 Generated with [Claude Code](https://claude.com/claude-code)
yindo added the pull-request label 2026-02-16 18:16:14 -05:00
yindo closed this issue 2026-02-16 18:16:14 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11411