# CODE-1895-tui-lrc-typeahead-wiring

CODE-1895-tui-lrc-typeahead-wiring is a Claude Code subagent that restores typed input in the TUI after a long-running command ends. It handles shell typeahead at the next prompt.

- subagent · `type=agent` · Claude Code, Codex, Cursor · ★ 720 repo stars
- Author: dominikmartn
- License: AGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/dominikmartn/harp/tree/HEAD/agents/specs/CODE-1895-tui-lrc-typeahead-wiring.md
- Updated: 2026-11-10
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/agents/code-1895-tui-lrc-typeahead-wiring

## What it does

This subagent wires typeahead events into Warp's TUI input editor. Text entered while a command such as `sleep 5` is running is placed into the next prompt after the command exits.

The shared terminal model keeps its existing detection and insertion policy. The TUI applies the result through `replace_first_n_characters`, then moves the cursor to the end, so successive partial events replace earlier text instead of appending duplicates.

Agent-requested commands are excluded from automatic insertion, and alt-screen applications keep their current behavior. The `InputMatching` path for bash 3.2 is best-effort and needs keystrokes forwarded through the TUI PTY; the reported fix targets `ShellReported`.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/agents/CODE-1895-tui-lrc-typeahead-wiring.md` — For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

### Codex

**Manually: put the files in place**
- File: `.codex/agents/CODE-1895-tui-lrc-typeahead-wiring.toml` — Codex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/

### Cursor

**Manually: put the files in place**
- File: `.cursor/agents/CODE-1895-tui-lrc-typeahead-wiring.md` — Cursor also reads .claude/agents/

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/dominikmartn/harp/tree/HEAD/agents/specs/CODE-1895-tui-lrc-typeahead-wiring.md

## When to use it
- restore text typed during a long-running shell command
- replace an earlier partial typeahead buffer
- exclude input from agent-requested commands
- preserve PTY delivery to the foreground process
- keep alt-screen applications out of typeahead handling

## Example prompts
- Investigate CODE-1895 and wire typeahead into the Warp TUI input editor.
- Fix the case where `echo hi` is typed during `sleep 5` and should appear after the command finishes.
- Verify that `ec` followed by `echo hi` leaves one `echo hi` buffer, while agent-requested commands do not insert typeahead.

## Similar
- [codex-tui-proof](https://affpapa.org/en/nevibecode/plugins/codex-tui-proof.md) — plugin · ★ 1596 repo stars
- [tui-design](https://affpapa.org/en/nevibecode/skills/tui-design.md) — skill · 1400 installs
- [tui-debug-in-pane](https://affpapa.org/en/nevibecode/skills/tui-debug-in-pane.md) — skill · ★ 3206 repo stars
- [tui-validate](https://affpapa.org/en/nevibecode/skills/tui-validate.md) — skill · ★ 3206 repo stars
- [ratatui-tui](https://affpapa.org/en/nevibecode/skills/ratatui-tui.md) — skill · 959 installs
- [create-agent-tui](https://affpapa.org/en/nevibecode/skills/create-agent-tui.md) — skill · 358 installs

From the same set: [dominikmartn/harp](https://affpapa.org/en/nevibecode/by/dominikmartn/harp.md) — 62 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
