Skip to content

Add per-tab session identifier (like TERM_SESSION_ID / ITERM_SESSION_ID) for external tool integration #8814

@nzaytsev

Description

@nzaytsev

Pre-submit Checks

Describe the solution you'd like?

Problem

Unlike MacOS Terminal.app ($TERM_SESSION_ID) and iTerm2 ($ITERM_SESSION_ID), Warp doesn't expose any unique identifier per tab in the environment. This makes it impossible for external tools to:

  • Determine which specific Warp tab is currently visible/focused
  • Focus a specific tab programmatically (e.g. when clicking a notification)

The workaround of checking the frontmost app via AppleScript (tell application "System Events" to get name of first process whose frontmost is true) only tells us that Warp is active — not which tab is
active.

Use case (concrete example)

Claude Code supports hooks — shell scripts fired on events like session completion. A Stop hook can send a desktop notification "Claude finished". The ideal UX: if the user is on a different tab, show the
notification; clicking it should focus the exact Warp tab with that session. This works perfectly in Terminal.app via $TERM_SESSION_ID + AppleScript, but is impossible in Warp.

Requested solution

One of:

  1. Set $WARP_TAB_ID (or similar) as a unique env var per tab — analogous to TERM_SESSION_ID
  2. Expose an AppleScript API to query/focus tabs by session identifier
  3. Support a URI scheme: warp://focus?tab_id=XYZ

References

Is your feature request related to a problem? Please describe.

No response

Additional context

No response

Operating system (OS)

macOS

How important is this feature to you?

2

Warp Internal (ignore) - linear-label:39cc6478-1249-4ee7-950b-c428edfeecd1

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions