Monorepo: no way to see which working directory a session is in (especially on mobile)

Status Fixed / completed
Reported on v2.1.222
Maintainer reply ✓ Yes — bcherny
Activity 3 comments · opened Aug 14, 2026 · closed Aug 17, 2026
💡 Likely answer: A maintainer (bcherny, collaborator) responded on this thread — see the highlighted reply below.

Problem

In a monorepo, there is no way to tell which working directory a session belongs to.

I run a monorepo where each subdirectory is a distinct working context (vc-agents/nate, vc-agents/morgan, vc-agents/sloane, and several more). Sessions are always launched from the subdirectory, and which subdirectory a session is in is the single most important fact about it — it determines the persona, the tooling, and the scope of the work.

The session list identifies sessions only by the repo root name (vc-agents). A dozen sessions spread across six subdirectories are visually indistinguishable.

Desktop has a workaround, mobile has none

On the desktop app I can hover the project name and see the full path including the subdirectory. That's enough to get by.

On mobile and claude.ai/code there is no hover affordance, so the information is simply unavailable. With Remote Control this is exactly where I need it most: the phone is where I'm picking between sessions without the surrounding context of my desktop screen.

The data already exists

Each session stores its cwd, and Claude Code already computes a cwd-derived name into ~/.claude/sessions/<pid>.json:

{"cwd":"/…/vc-agents/nate","sessionId":"…","name":"nate-b8","nameSource":"derived"}

nate-b8 / morgan-d8 / sloane-1c is precisely the disambiguator I want. It's computed on every session and never surfaced in the session list or on mobile.

Either fix would solve it

Option A — display the cwd. Show the subdirectory (or the existing derived name) where the project name is currently displayed, at minimum on mobile/web where no hover exists.

Option B — let us set the title programmatically at session launch. A hook that can set or prefix the session title would let monorepo users encode whatever disambiguator they need. Today no hook event's output schema can set a title, so there is no way to automate this.

Option A is the better default since it requires no configuration and helps every monorepo user. Option B is more general and would cover cases the built-in derivation can't anticipate.

Workarounds tried, all dead ends

  • CLAUDE_REMOTE_CONTROL_SESSION_NAME_PREFIX per folder via a project settings.json env block. The variable never reaches the session's process environment (verified with ps eww, which shows 15 other CLAUDE_* vars present but not this one). It also only feeds the lowest-priority name fallback, which the first prompt immediately outranks.
  • Hooks. No hook event's JSON output schema includes a title/name field.
  • Renaming sessions to carry the prefix. Renames apply on desktop but do not propagate to an already-connected Remote Control session, so mobile keeps the original title. Filed separately.
  • /rename per session. Works, but requires remembering to run it at every single session creation, which defeats the purpose.

Environment

  • Claude Code desktop app 1.26832.0
  • Managed CLI 2.1.222 (~/Library/Application Support/Claude/claude-code/2.1.222/)
  • macOS 24.5.0
  • Remote Control enabled, Team plan

View original on GitHub ↗

3 Comments

bcherny collaborator · 2 months ago

You can already do your Option B: a SessionStart hook can set the session title from the launch folder. Return {"hookSpecificOutput": {"hookEventName": "SessionStart", "sessionTitle": "<subdir name>"}} from the hook (it receives cwd in its input), and the title shows in the session list, including on claude.ai and mobile. You can also pass claude --name <name> at launch or /rename mid-session. Docs: https://code.claude.com/docs/en/hooks#sessionstart-decision-control and https://code.claude.com/docs/en/sessions#name-your-sessions. If a subdirectory display on mobile is still needed after that, feel free to open a focused request.

🤖 Generated with Claude Code

thedug · 1 month ago

Doesn't work in Claude code for n the desktop app.

github-actions[bot] · 7 days ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.