[FEATURE]: TUI: Statuses via "flags" in current /Session view (feature option to create statuses, labels, etc)
Feature hasn't been suggested before.
- [x] I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
BLUF
A feature request for opencode to add user-defined session flags — lightweight status tags (todo, doing, done, blocked, etc.) defined in opencode.json. They can be applied to any session via a hotkey (%!) (just for example) or /flags, can be shown as colored chips in the session switcher, and browsable through a filtered "flags view" that groups sessions by flag. It replaces the current manual hack of typing [TODO]/[done] into session titles, giving you a fast, keyboard-driven way to mark sessions and come back to them — without the weight of a full kanban board.
**NOTE: Flags also can be commonly inferred as "labels" or "status" but giving more reconfigurable language to user.
EXAMPLE CONFIG: Config (drop in opencode.json): jsonc{ "$schema": "https://opencode.ai/config.json", "session": { "flags": [ { "name": "todo", "key": "t", "color": "amber" }, { "name": "doing", "key": "d", "color": "blue" }, { "name": "done", "key": "o", "color": "green" }, { "name": "blocked", "key": "b", "color": "red" }, { "name": "review", "key": "r", "color": "purple" } ], "flagsView": { "groupBy": "flag", "hideFlags": ["done"] } } }
This issue might be a duplicate of existing issues. Please check:
- #21590: Session status management (Todo, Done, Backlog, etc.) for organizing AI sessions — covers nearly identical functionality: session-level status tags, sidebar filtering/grouping by status, and user-defined labels for sessions.
To github actions: this one is focused on the TUI but is also more open ended in terms of customization. This is a more lightweight and more malleable option to the previous feature suggested.
+1 on this. I have seen that a few related threads are piling up:
- #21590 (kanban-style status board, Craft Agent reference)
- #24017 (bookmarks/topics)
- #15469 was closed as not planned, but that one was about project folders in the web UI, not session-level org — I don't think it should block this
what I actually want day to day: a groupBy view on /sessions, by folder. similar to how file explorer or finder in mac works. Bonus if the folder pre-populates from cwd so I'm not tagging every new session by hand. a "by status" group would be a bonus.
sketch of the view I'd be happy with — collapsible headers in the existing list pane, not a permanent sidebar (a sidebar would eat the chat width and I don't want that):
▾ work (4)
2h ago Refactor auth middleware
1d ago Investigate flaky CI on main
3d ago Add /sessions grouping PoC
1w ago Triage backlog issues
▾ side (2)
4d ago Personal site redesign
2w ago Try out bun runtime
▾ Uncategorized (7)
12m ago Untitled
...
[enter] resume [space] toggle group [g] toggle grouped/flat
config-wise I'd be fine with this — and I think folders (free string) and flags (enum) should stay separate, they pull in different directions. folders are cheap and informal, flags are workflow status:
{
"session": {
"folders": {
"auto": { "from": "cwd", "depth": 1 },
"manual": true
},
"groupBy": "folder"
}
}
bits worth calling out:
auto.from = "cwd"is the friction-killer. ~90% of my sessions would land in the right place with zero effortgroupByis a view toggle, not a per-session attribute. one keystroke (gorctrl+x g, whatever) to flip between grouped and flat- manual set shouldn't fight with auto:
/folder workto set,/folderto show,/folder -to clear,/foldersto list grouped
if it helps scope the work I'd split it into two PRs:
- schema + storage (low risk) — nullable
foldercolumn, backfill old sessions tonull→ "Uncategorized", the four commands, the cwd auto-assign on session creation - TUI view (medium risk) — collapsible headers in the existing list component, the keybind, sort within group by recency
nothing else in the app needs to know about folders. backfill is a no-op, config is all optional with sensible defaults, and the flag work from this issue can land in parallel without touching the same column.
on my end I cobbled together a small plugin that approximates the workflow — set folder, list grouped, sidecar JSON at ~/.config/opencode/session-folders.json. happy to share if anyone wants to dogfood the UX before the TUI ships. I can also open the schema PR if it'd unblock this, but wanted to gut-check the design first.
few things I'm genuinely not sure about:
- is the folder/flag split the right call, or would a single
tags: string[]field be simpler and let users decide semantics? - should
auto.from = "cwd"be on by default or strictly opt-in? I could see existing users being surprised if folders start appearing out of nowhere - one PR or two?
@samuel-pro-ai thanks for pulling for related PRs for me and responding. This is great enrichment to the idea. I think there is a forward path to this and it's important that we make these as general.and configurable BECAUSE down the line could be context or graph rag related buildouts that could use that meta data at a relational level.
Part of me wants to fork to try and play with my own flavor but open code upgrades so much, it'd be too much for me to manage so would be optimal.if they could integrate it into their tool officially.