[FEATURE] Configurable peer-registration session name (per-project prefix) for cross-session messaging

Status Open
Maintainer reply None cached
Activity 1 comment · opened Aug 23, 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

Cross-session messaging registers each session under an auto-generated name derived from the working-directory basename. For worktree-per-feature workflows this produces generic, ambiguous peer names: worktrees at apex/application/library and apex/application/trading register as library-XX and trading-XX, with no hint of which project they belong to. With many projects open at once (20–30 workspaces here), ListAgents fills with names like library, api, application that can't be told apart without falling back to inspecting the socket registry.

Per the cross-session messaging docs, the only overrides today are:

  • /rename — per conversation: it survives resume, but every new chat in the same window reverts to the auto-name, so at fleet scale it's a recurring manual tax, not a setup step.
  • --name — terminal-only; the VS Code extension exposes no launch flags.

The remaining workaround is naming the worktree directory apex-library so the basename carries the prefix — which works but forces the filesystem layout to serve the messaging feature.

Proposed Solution

A settings key that sets or templates the session's registered name, resolved through normal settings scopes so a project or worktree .claude/settings.json can carry it:

{ "sessionName": "apex-${dirBasename}" }

A session in apex/application/library would then register as apex-library-XX. Even a static prefix key ("sessionNamePrefix": "apex-") would cover the core need. Because settings already resolve per-directory, worktrees inherit the project's prefix with zero per-session ritual, and collision handling / uniquification can stay exactly as it is.

Additional Context

Related prior requests — all closed (stale/duplicate) and pre-dating cross-session messaging (v2.1.224), and aimed at display titles rather than the peer-registration name: #72555, #63264, #33029, #41466. The open #69411 covers templating the display title for /resume/terminal; this request is specifically about the name ListAgents/SendMessage register and address, which now has behavioral weight (it's how sessions target each other).

Environment: VS Code extension, macOS.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗