[FEATURE] Session identification for concurrent Claude Code instances

Resolved 💬 3 comments Opened Jan 26, 2026 by mrandreastoth Closed Jan 30, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

When running multiple Claude Code sessions simultaneously, there is no reliable way to identify which session is which.

  • The status line shows static launch-time info that doesn't reflect actual working context
  • The terminal title is auto-generated but becomes dated and irrelevant after hours of work
  • Neither updates automatically as context changes
  • Neither can be controlled by the user, Claude, or configuration

Result: Users mix up sessions, leading to wrong commits, wrong branches, wrong repos, and wasted time.

Naming sessions (via /rename or tools like tmux) is only half the story. A name set at the start of a session becomes stale as the work evolves. The full solution requires dynamic updates as context changes throughout the session.

Proposed Solution

Core requirement: Allow users to see and control what's displayed in the status line and terminal title, with dynamic updates as context changes.

Possible implementation:

  1. Session context store - A per-session key-value store holding context variables (repo, branch, ticket, custom, etc.)
  1. Display templates via configuration

``json
{
"sessionIdentity": {
"statusLine": {
"template": "${cwd} | [${repo}] | ${branch} | ${ticket}",
"fallback": "${cwd}"
},
"terminalTitle": {
"template": "${ticket} - ${repo}",
"fallback": "${repo}"
}
}
}
``

  1. Multiple update mechanisms
  • Automatic - Populate repo, branch, cwd from git/filesystem on each tool use
  • CLI flags - Set context at launch: claude --status "PROJ-12345 Auth refactor"
  • Commands - Update during session: /status "custom text" or /context ticket PROJ-99999
  • Programmatic - Allow Claude to update context based on conversation
  • Hooks - Allow PostToolUse and other hooks to update context
  • MCP - Expose context store so external tools can update session identity
  1. Flexible variable sources - Variables like ${ticket} could come from CLI flags, branch name patterns, CLAUDE.md, environment variables, conversation context, MCP integrations, or user input.

Alternative Solutions

There are no viable alternatives within Claude Code itself.

Terminal-specific workarounds exist (tmux session renaming, iTerm escape sequences) but these are not portable, require specific tooling, and don't address the status line.

Priority

Medium - Would be very helpful

Feature Category

Interactive mode (TUI)

Use Case Example

I run multiple terminal sessions, each with an interactive Claude session working on different tasks concurrently. I constantly find myself asking Claude "what are we working on?" to re-orient myself. Sometimes I think I know and proceed, only to realise I've confused the context with another session.

The terminal titles are auto-generated but become dated and irrelevant after hours of work. The status lines show where I launched from, not what I'm currently working on. There's no reliable visual distinction between sessions.

What I need: Each session should display its repo, branch, and current ticket - updating dynamically as the work evolves. When I glance at my terminal tabs or status line, I should know instantly which session is which.

Additional Context

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗