Expose session name and ID in the /statusline payload
Problem
When running several copilot sessions in parallel (multiple terminals, tmux/wezterm panes, different repos), there is no glanceable way to tell which session is which from the statusline. The cwd shows up, but two sessions in the same repo or two sessions for the same project look identical at a glance.
/rename already gives a session a human-readable name, and --resume works against those names. But the name only surfaces in the picker, not in the running session itself.
Proposal
Expose the current session name (and session ID) in the statusline payload so they can be rendered with statusLine.command.
Suggested fields:
session_name- the user-set name from/rename, or the auto-generated onesession_id- the UUID under~/.copilot/session-state/
Example custom statusline:
[my-refactor] ~/src/repo (main) 120k/200k 18%
vs. today:
~/src/repo (main) 120k/200k 18%
Why this helps
- Multi-pane workflows: one glance identifies the session, no need to scroll back or run
/renameto check - Pairs naturally with #1306 (session ID visibility) and the existing
--resume <name>flow - Cheap to add: the name already exists in session state, just needs to land in the statusline payload
Alternatives considered
- Terminal title (#1211) - works for some terminals but conflicts with shell/tmux title management
- Reading session state from the filesystem in a custom statusline script - possible but fragile and adds latency on every render
This is now supported. The payload passed to a custom statusLine.command already includes both session_id and session_name fields, so your script can read them directly to tell parallel sessions apart (session_name reflects the /rename value once one is set). If you believe this isn't resolved, please comment with details and we'll take another look.