APP-4907 — Claude Code subagent: TUI focus
APP-4907 is a Claude Code subagent that keeps TUI input active while an agent prepares a tool call, then hands focus to an approval card when blocking begins.
AGPL-3.0 ★ 720 updated 2026-11-10
.claude/agents/APP-4907---TUI-input-focus-during-agent-drafting.mdWhat APP-4907 - TUI input focus during agent drafting does
APP-4907 defines a fix for TUI input losing keyboard focus while an agent prepares a shell command, file change, or question. A selector may be created in the background, but it must not capture keys before a visible approval surface exists.
When the action reaches AIActionStatus::Blocked, approval cards remain interactive, including the shell-command editor and the AskUserQuestion selector. Once the block is resolved or dismissed, focus returns to the session input with its draft, cursor, and selection preserved. Installation requires placing the subagent file in the platform-specific agent directory.
What it helps with
- keep session input usable during tool-call preparation
- stop a hidden approval selector from consuming keystrokes
- move focus to the shell-command approval editor after blocking
- restore the draft and cursor after a permission prompt closes
- keep
AskUserQuestioninteraction active while answers are awaited
Example prompts for the agent
- Investigate APP-4907 and fix TUI input focus while a shell command is being prepared.
- Test focus handoff from file-edit preparation to the approval card, including cursor preservation.
- Add coverage for
AskUserQuestionand focus restoration after a blocked action is dismissed.
How to install APP-4907 - TUI input focus during agent drafting
Manually: put the files in place
.claude/agents/APP-4907---TUI-input-focus-during-agent-drafting.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/APP-4907---TUI-input-focus-during-agent-drafting.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-4907---TUI-input-focus-during-agent-drafting.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-4907 - TUI input focus during agent drafting
How do I install APP-4907 in Claude Code?
Place the Claude Code subagent file at .claude/agents/APP-4907---TUI-input-focus-during-agent-drafting.md.
What does APP-4907 do?
The subagent specifies a TUI focus fix that leaves session input active until an actual approval card is shown. A blocked action then owns focus through its selector or editor, and the session input regains it when the action ends.
Which focus states does APP-4907 cover?
It covers shell-command preparation, file edits, questions, the AIActionStatus::Blocked state, the command editor, the file-edit approval card, and the AskUserQuestion selector.