Skip to content

v0.3.0-alpha — iTerm2 gets its keys back

Choose a tag to compare

@jitokim jitokim released this 18 Jul 15:05
544c27c

What's new

If you run Claude Code in iTerm2, the cockpit's action keys now actually work.

Before this release, iTerm2 users got a half-cockpit. (attach) could bring a loop's window to the front, and r/i quietly detoured through a headless re-drive — but p (stop), k (kill) and a (approve a gate) had no path at all. You watched your fleet and then reached for the mouse.

Now all five act in place, in the terminal you're already looking at:

key what it does for an iTerm2-hosted loop
a approve a gate
r resume a stalled loop
i inject a prompt
p stop the current turn
k kill (two presses)

No multiplexer required. This talks to iTerm2 itself, so a plain macOS + iTerm2 setup — no tmux, no orca, no cmux — is now a first-class host.

It refuses rather than guesses. Before typing anything, fleetops re-reads the target session's own tty and compares it against what the hooks recorded. If they disagree — the classic case being a loop running inside tmux inside iTerm2 — it refuses instead of typing into the wrong layer.

It tells you when it doesn't know. If a send times out, fleetops can't tell whether your keystroke landed. It says exactly that and declines to retry, rather than silently sending your prompt twice.

Also fixed

  • Text was being cut one column short for anyone on a Korean/Japanese/Chinese locale. fleetops measured the ellipsis and status glyphs as two columns wide while the renderer and iTerm2 both drew them as one, so every truncated transcript line lost a character. The width policy is now pinned instead of inherited from your $LANG. (#44)
  • d and x are documented. The previous release split the old dismiss key into d (hide, persists across restarts) and x (delete), but said so in neither --help nor the README — where d still advertised the old "until restart" behaviour.

Known limits — please read before trusting it

  • a (approve) is not fully verified. We measured that a real Enter byte leaves for the session, but not that Claude's gate prompt accepts it as "take the default." Every other backend rests on the same assumption, so this isn't iTerm2-specific — but it isn't proven either.
  • iTerm2 has marked AppleScript deprecated in favour of its Python API. If write ever goes away, r/i fall back to the headless re-drive and k/p/a go dead — they have no fallback. The exposure is one adapter.
  • Spawning new loops (n) still needs a multiplexer.
  • Verification of the tmux-inside-iTerm2 hazard itself, and behaviour under a denied Automation grant, remain unrun. The defenses are implemented and tested; the hazards are not empirically confirmed.

Full architectural reasoning, including which AppleScript mechanisms were rejected and why, is in docs/adr-vendor-independent-actuation.md.