Repository navigation
Show Claude Code sessions started in a terminal (Warp, Terminal, iTerm…) - #282
Merged
Merged
Conversation
- ClaudeHost: recognise terminal sessions from the hook's term_program / bundle_id and route them to the Claude Code pill (AgentTask.hostApp). - The pill says "Claude Code" and "Open <terminal>" brings it forward; "Handled in …" notes name the right app. - New setting, off by default: answer terminal sessions' questions and permissions in the notch. Off, the terminal asks itself straight away. - Tests: scripts/test-claude-host.sh. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ssion's app - cmux (com.cmuxterm.app, Louis-CFM#54) sets TERM_PROGRAM=ghostty: the bundle id is checked first, so it's no longer taken for Ghostty. Orca (com.stablyai.orca, reported in Louis-CFM#32) is recognised too. - The finished card's "Open terminal" brings forward the terminal the session runs in, before the fixed list. A Warp session no longer opens Terminal.app. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 7, 2026
Kept upstream's Hermes notes and permission guard next to the terminal routing, and its Claude Desktop "Open Claude" button; "Open terminal" still tries the session's own terminal first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
guerraOrzc
marked this pull request as ready for review
October 7, 2026 22:22
Owner
|
Merged in #326 — thank you @guerraOrzc! Sessions from Warp, Terminal, iTerm, Ghostty and friends were the most requested thing, and keeping their approvals in the terminal unless you opt in is exactly the right default. 🙌 Generated by Claude Code |
JhoanG956
pushed a commit
to JhoanG956/coucou
that referenced
this pull request
Oct 8, 2026
…k the session's own app Louis-CFM#282 records the terminal a Claude Code session runs in (hostApp) for the pill's label and routing; Louis-CFM#238 records every session's app (sessionBundleId). Open terminal tries the Claude Code terminal first, then the session's app (VS Code included, which fixes Louis-CFM#291), then any running terminal, then Terminal.app. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Shows Claude Code sessions started in a terminal (Warp, Terminal, iTerm…) on the Mac notch's Claude Code pill.
Fixes #239. Fixes #54.
This is 1 of 3 PRs split from #280:
mainand doesn't need A.Screenshot
The Claude Code pill with a session from Warp: it says "Claude Code", and its button opens Warp:
What changes
Until now, hook events not coming from VS Code or Cursor were dropped ("Ignored … from WarpTerminal" in
nb.log). Sessions in Warp, Terminal, iTerm, Ghostty, kitty, Alacritty, WezTerm, Hyper, Zed, cmux and Orca (ClaudeHost.swift, matched on__CFBundleIdentifier, elseTERM_PROGRAM; cmux setsTERM_PROGRAM=ghostty, so its bundle id decides) now route to the existingintegration_claudepill:AgentTask.hostApp(nil = VS Code), so nothing changes for VS Code sessions.Questions and permission requests from terminal sessions stay in the terminal by default. The
--askand PermissionRequest hooks hold the request until the notch answers, so showing them in the notch would make the terminal wait. A new setting under the Claude Code hooks, "Answer questions and permissions from terminal sessions in the notch" (off by default), lets terminal users opt into the VS Code behavior. When it is off, the request is answered withaskat once.Like VS Code today, the pill follows the most recently active session.
Not done / known limits
Localizable.xcstrings.Related open PRs
AgentTask(hostApphere,sessionBundleIdthere), so I'll rebase onto Open terminal: bring back the app the session runs in #238 if it lands first.Testing
PHONE_LINK), CoucouAppStore (CODE_SIGNING_ALLOWED=NO) and CoucouPhone (iOS Simulator) build on Xcode 27.scripts/test-*.shpass, including the newtest-claude-host.sh(terminal detection, labels, the setting is off by default).askimmediately.🤖 Generated with Claude Code