[PR #7729] feat: add --resume flag to interactively select session #12490

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

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

State: closed
Merged: No


Summary

Adds a --resume (-r) flag to the run command. When used, it fetches available sessions and presents an interactive list (using @clack/prompts) for the user to select one to resume.

This mimics the behavior of claude code --resume.

Changes

  • Modified packages/opencode/src/cli/cmd/run.ts to add resume option and handling logic.
  • Uses Locale.todayTimeOrDateTime for friendly timestamps.
  • Filters out sub-sessions (sessions with parentID).

Testing

  • Verified opencode run --help shows the new flag.
  • Verified typecheck passes.

Fixes #2404

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/7729 **State:** closed **Merged:** No --- ## Summary Adds a `--resume` (`-r`) flag to the `run` command. When used, it fetches available sessions and presents an interactive list (using `@clack/prompts`) for the user to select one to resume. This mimics the behavior of `claude code --resume`. ## Changes - Modified `packages/opencode/src/cli/cmd/run.ts` to add `resume` option and handling logic. - Uses `Locale.todayTimeOrDateTime` for friendly timestamps. - Filters out sub-sessions (sessions with `parentID`). ## Testing - Verified `opencode run --help` shows the new flag. - Verified typecheck passes. Fixes #2404
yindo added the pull-request label 2026-02-16 18:17:24 -05:00
yindo closed this issue 2026-02-16 18:17:24 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12490