Skip to content

A tiny friend in your Mac's notch and on your iPhone that keeps an eye on your AI coding agents: Claude Code, Codex, Cursor, Gemini CLI, Antigravity and more. Approve from the notch or your Lock Screen.

Claude Desktop: a declarable agent pill for sessions from the Claude app

Samuel Martinez344dc12f556b
diff --git a/NotchBuddy/Sources/App/HookServer.swift b/NotchBuddy/Sources/App/HookServer.swift
index ca734bfd..422f9178 100644
--- a/NotchBuddy/Sources/App/HookServer.swift
+++ b/NotchBuddy/Sources/App/HookServer.swift
@@ -2042,6 +2042,10 @@ def main():
i += 1
if agent:
payload.setdefault('coucou_agent', agent)
+ # Claude Code sessions from the Claude desktop app (Code tab) report this entrypoint;
+ # route them to the Claude Desktop pill instead of dropping them (no VS Code terminal).
+ if not payload.get('coucou_agent') and os.environ.get('CLAUDE_CODE_ENTRYPOINT') == 'claude-desktop':
+ payload['coucou_agent'] = 'claude-desktop'
# Enrich with terminal context
env = os.environ
@@ -2309,6 +2313,10 @@ def main():
i += 1
if agent:
payload.setdefault('coucou_agent', agent)
+ # Claude Code sessions from the Claude desktop app (Code tab) report this entrypoint;
+ # route them to the Claude Desktop pill instead of dropping them (no VS Code terminal).
+ if not payload.get('coucou_agent') and os.environ.get('CLAUDE_CODE_ENTRYPOINT') == 'claude-desktop':
+ payload['coucou_agent'] = 'claude-desktop'
env = os.environ
payload.setdefault('term_program', env.get('TERM_PROGRAM', ''))
diff --git a/NotchBuddy/Sources/App/IslandViewContent.swift b/NotchBuddy/Sources/App/IslandViewContent.swift
index 73ce2df7..33d14aed 100644
--- a/NotchBuddy/Sources/App/IslandViewContent.swift
+++ b/NotchBuddy/Sources/App/IslandViewContent.swift
@@ -207,6 +207,8 @@ struct OverviewView: View {
NSWorkspace.shared.openApplication(at: url, configuration: .init(), completionHandler: nil)
}
#endif
+ case "agent_claude-desktop":
+ openClaudeDesktopApp()
case "agent_gemini", "agent_antigravity":
#if !APPSTORE
let terminalBundleIds = ["com.apple.Terminal", "com.googlecode.iterm2",
@@ -529,6 +531,15 @@ struct ErrorView: View {
}
}
+/// Brings the Claude desktop app forward (or launches it) — target of the Claude Desktop pill.
+private let claudeDesktopBundleId = "com.anthropic.claudefordesktop"
+
+private func openClaudeDesktopApp() {
+ if let url = NSWorkspace.shared.urlForApplication(withBundleIdentifier: claudeDesktopBundleId) {
+ NSWorkspace.shared.openApplication(at: url, configuration: .init(), completionHandler: nil)
+ }
+}
+
// MARK: - Finished
struct FinishedView: View {
@@ -548,18 +559,26 @@ struct FinishedView: View {
.lineLimit(1)
.truncationMode(.tail)
HStack(spacing: 8) {
- #if !APPSTORE
- PrimaryButton("Open terminal") {
- let terminalBundleIds = ["com.apple.Terminal", "com.googlecode.iterm2", "net.kovidgoyal.kitty", "com.mitchellh.ghostty"]
- let activated = terminalBundleIds.compactMap { id in
- NSWorkspace.shared.runningApplications.first { $0.bundleIdentifier == id }
- }.first.map { $0.activate(options: .activateIgnoringOtherApps) }
- if activated == nil {
- NSWorkspace.shared.open(URL(fileURLWithPath: "/System/Applications/Utilities/Terminal.app"))
+ if state.focusTask?.id == "agent_claude-desktop" {
+ // Sessions from the Claude desktop app live there, not in a terminal.
+ PrimaryButton("Open Claude") {
+ openClaudeDesktopApp()
+ NotificationCenter.default.post(name: .islandCollapse, object: nil)
}
- NotificationCenter.default.post(name: .islandCollapse, object: nil)
+ } else {
+ #if !APPSTORE
+ PrimaryButton("Open terminal") {
+ let terminalBundleIds = ["com.apple.Terminal", "com.googlecode.iterm2", "net.kovidgoyal.kitty", "com.mitchellh.ghostty"]
+ let activated = terminalBundleIds.compactMap { id in
+ NSWorkspace.shared.runningApplications.first { $0.bundleIdentifier == id }
+ }.first.map { $0.activate(options: .activateIgnoringOtherApps) }
+ if activated == nil {
+ NSWorkspace.shared.open(URL(fileURLWithPath: "/System/Applications/Utilities/Terminal.app"))
+ }
+ NotificationCenter.default.post(name: .islandCollapse, object: nil)
+ }
+ #endif
}
- #endif
SecondaryButton("OK") {
NotificationCenter.default.post(name: .islandCollapse, object: nil)
}
@@ -1586,6 +1605,8 @@ struct IntegrationCardView: View {
#else
return false
#endif
+ case "agent_claude-desktop":
+ return true // nothing to install: the relay tags desktop sessions on its own
case "agent_cursor", "agent_codex":
return false // coming soon
case "integration_music":
diff --git a/NotchBuddy/Sources/App/PillCatalog.swift b/NotchBuddy/Sources/App/PillCatalog.swift
index 530b5ecf..b554cb8e 100644
--- a/NotchBuddy/Sources/App/PillCatalog.swift
+++ b/NotchBuddy/Sources/App/PillCatalog.swift
@@ -37,6 +37,7 @@ struct PillDefinition {
case "integration_claude": return "Claude Code"
case "agent_cursor": return "Cursor"
case "agent_codex": return "Codex"
+ case "agent_claude-desktop": return "Claude Desktop"
default: return "Agent"
}
}
@@ -59,6 +60,10 @@ enum PillCatalog {
// ── Agents ───────────────────────────────────────────────────────────
.init(id: "agent_gemini", name: "Gemini CLI", color: "#8AB4F8",
category: .agent, subtitle: "Agent", source: .agent, githubOnly: true),
+ // Claude Code sessions run from the Claude desktop app: the relay tags them
+ // `coucou_agent: claude-desktop` from CLAUDE_CODE_ENTRYPOINT, so nothing to install.
+ .init(id: "agent_claude-desktop", name: "Claude Desktop", color: "#D97757",
+ category: .agent, subtitle: "Agent", source: .agent),
// ── AI for the chat ──────────────────────────────────────────────────
.init(id: "ai_anthropic", name: "Anthropic", color: ChatProvider.anthropic.accentHex,
category: .ai, subtitle: "Chat", source: .n8n),
diff --git a/docs/AGENTS.md b/docs/AGENTS.md
index 055a9afa..43408d10 100644
--- a/docs/AGENTS.md
+++ b/docs/AGENTS.md
@@ -101,6 +101,8 @@ A catalog pill that is not checked in Settings behaves like any other agent: it
The GitHub build exposes Gemini CLI (`agent_gemini`) and Antigravity (`agent_antigravity`) in Settings → Active pills. Cursor (`agent_cursor`) and Codex (`agent_codex`, GitHub build only) are there too — their pills can be declared and set as the main pill; session support is coming in a future version.
+Claude Desktop (`agent_claude-desktop`, every build) is there as well. Claude Code sessions started from the Claude desktop app's Code tab carry `CLAUDE_CODE_ENTRYPOINT=claude-desktop`; the relay tags them `coucou_agent: claude-desktop` on its own (an explicit `--agent` still wins), so nothing extra is installed. Declare the pill to keep it after the session ends; the ↗ button opens the Claude app.
+
## Real-world examples
### Gemini CLI (macOS)