anomalyco / anomalyco/opencode
[FEATURE]: Open session selector with -s without a session ID
Open
@simonklee is already working on this.
Since Sep 12, 2026.
2.0
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
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
Currently, opencode -s <session-id> resumes a specific session
I'd like to contribute opencode -s which starts the TUI and immediately opens the /session selector.
Update for V2
- v1 uses yargs which made no values default to
"": https://github.com/anomalyco/opencode/pull/48719). - v2 uses effect, which rejects a string flag without a value: https://github.com/anomalyco/opencode/pull/50052
Extra; what I use today (requires fzf jq):
opencode2 session list --format json |
jq -r '.[] | [.id, (.title // "Untitled"), ((.updated / 1000) | strftime("%Y-%m-%d %H:%M"))] | @tsv' |
fzf --delimiter=$'\t' --border --height=60% --header=$'Session ID\tTitle\tUpdated' |
cut -f1 |
xargs -I{} sh -c 'opencode2 -s "$1" < /dev/tty' sh {}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.