[FEATURE] Expose the current Claude session PID to the statusline utility

Resolved 💬 3 comments Opened Feb 25, 2026 by luiscardozo Closed Mar 1, 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, it is difficult to tell them apart in some external CLI commands. I need a way to easily differentiate 2 running sessions, with a globally understood identifier, like a Process ID (PID)

Proposed Solution

Expose the Claude Code Process ID (PID) to the JSON generated to the /statusline utility, so we can display the PID if needed.

Alternative Solutions

running a subshell inside claude and checking the parent PID. However, some commands are blacklisted by my company, and this cannot be exposed to the status line

Priority

Low - Nice to have

Feature Category

Interactive mode (TUI)

Use Case Example

Enable my statusline script to display the PID.
In another terminal, I will be able to send signals to Claude via its PID, or, when a Claude session is killed by the Sandbox, I will be able to see which one was killed and debug the reason

Additional Context

_No response_

View original on GitHub ↗

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