APP-4902 — Claude Code subagent: window focus
APP-4902 - window-scoped background focus suppression is a Claude Code subagent that narrows Warp focus blocking during background computer-use sessions.
AGPL-3.0 ★ 720 updated 2026-11-10
.claude/agents/APP-4902---window-scoped-background-focus-suppression.mdWhat APP-4902 - window-scoped background focus suppression does
This subagent defines a macOS fix for background computer-use in Warp. It keeps the selected window controllable without raising it, while independent focus changes to other Warp windows continue normally.
The change covers per-PID event taps, the activation primer, ActiveSession, and TapContext. Focus events 13, 19, and 20 are dropped only when their window identity matches the target activation; events for another window, missing identity, or the target-process tap pass through. Each session carries its own activation state, and teardown preserves the existing focus-restoration lifecycle. The scenario uses AppKit, CGEvent, and window-addressing fields.
What it helps with
- keep a background Warp window controllable
- let users focus another Warp window during computer-use
- separate activation state across concurrent sessions
- restore the previous frontmost window during teardown
- test filtering for focus events
13,19, and20
Example prompts for the agent
- Implement APP-4902 in
crates/computer_use/src/mac/activation.rswhile preserving the existing event-tap order and activation primer. - Add regression coverage for window-identity focus filtering in
crates/computer_use/src/mac/activation_tests.rs. - Check that concurrent sessions and owner-scoped teardown keep their activation state isolated.
How to install APP-4902 - window-scoped background focus suppression
Manually: put the files in place
.claude/agents/APP-4902---window-scoped-background-focus-suppression.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/APP-4902---window-scoped-background-focus-suppression.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/APP-4902---window-scoped-background-focus-suppression.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about APP-4902 - window-scoped background focus suppression
How do I install APP-4902 - window-scoped background focus suppression in Claude Code?
Add the agent file at .claude/agents/APP-4902---window-scoped-background-focus-suppression.md.
What does APP-4902 - window-scoped background focus suppression do?
It specifies a background computer-use fix that blocks activation only for the target window, allowing normal focus changes to other Warp windows.
What does APP-4902 - window-scoped background focus suppression require?
The described scenario is for macOS computer-use in Warp. It uses AppKit, CGEvent, per-PID event taps, and window-addressing identity.