- Book: Prompt Engineering Pocket Guide
- Also by me: Thinking in Go (2-book series) — Complete Guide to Go Programming + Hexagonal Architecture in Go
- My project: Hermes IDE | GitHub — an IDE for developers who ship with Claude Code and other AI coding tools
- Me: xgabriel.com | GitHub
In Antigravity CLI, Ctrl+K "instantly approves the pending subagent action listed in the status alert." In Claude Code the same key deletes from the cursor to the end of the line, the same job it does in Bash and Zsh.
That is the problem with muscle memory when you run more than one agent. Ctrl+R searches your prompt history in Claude Code and in Codex. In Antigravity CLI it opens the Artifact Review panel. Ctrl+O opens the transcript viewer in Claude Code, copies the latest response in Codex (OpenAI's command reference) and expands tool output in Antigravity.
The twelve keys below come up all day while you drive a CLI agent, with what each of the three does with them. Every row comes from the vendor's own docs or, for Codex, from the default keymap in its open-source TUI. Keys change between releases, so the last row tells you how to check what your installed version binds.
Why Antigravity CLI and not Gemini CLI? Since June 18, 2026, Gemini CLI no longer serves Google AI Pro, Google AI Ultra or free individual accounts, and Antigravity CLI took over the terminal (the Gemini CLI team's notice). Enterprise users with Gemini Code Assist licenses and API-key users kept access. If that is you, Gemini CLI's own reference lists Esc Esc, Shift+Tab and Ctrl+G with jobs close to the rows below, plus Ctrl+Y for YOLO mode.
The cheat sheet
| # | What you want | Claude Code | Codex | Antigravity CLI |
|---|---|---|---|---|
| 1 | Stop the current turn | Esc |
Esc |
Esc |
| 2 | Rewind or edit your last prompt |
Esc Esc on empty input |
Esc Esc on empty composer |
/rewind |
| 3 | Cycle modes | Shift+Tab |
Shift+Tab |
Shift+Tab |
| 4 | Send a running command to the background | Ctrl+B |
none (/ps lists them) |
none (/tasks shows them) |
| 5 | Search prompt history | Ctrl+R |
Ctrl+R |
none documented |
| 6 | See the full transcript | Ctrl+O |
Ctrl+T |
Ctrl+O expands tool output |
| 7 | Write the prompt in your editor | Ctrl+G |
Ctrl+G |
Ctrl+G |
| 8 | Run a shell command |
! at the start |
! at the start |
! at the start |
| 9 | Mention a file | @ |
@ |
@ |
| 10 | Paste an image | Ctrl+V |
Ctrl+V |
Ctrl+V |
| 11 | New line without sending | Ctrl+J |
Ctrl+J |
Ctrl+J |
| 12 | Show the shortcut list |
? on empty input |
? |
/help |
Sources per column: Claude Code's interactive mode reference; Codex's command reference, CLI customization page and keymap source; Antigravity CLI's reference, settings and tips and prompting guide.
Keys that steer the session
1. Esc stops the turn in all three. In Claude Code, Claude keeps the work done so far, and any messages you queued go next. In Codex, Esc is the default for interrupt_turn. In Antigravity it "halts active streams." Esc is the safe reflex. Ctrl+C is not: Claude Code treats it as interrupt-or-clear, OpenAI's reference says it closes the Codex session, and Antigravity's reference says it terminates the CLI session, asking first if the agent is working.
2. Esc Esc means three different things. In Claude Code with an empty prompt, it opens the rewind menu, where you restore or summarize code and conversation from an earlier point. With text in the prompt, it clears the draft and saves it to history so Up brings it back. In Codex, on an empty composer, it edits your previous message and forks the chat from there. On long resumed sessions it could report "No previous message to edit" when the prompt sat outside the loaded page; that was closed as fixed in CLI 0.162.1. In Antigravity CLI, Esc Esc only clears the prompt box. To go back, type /rewind (alias /undo).
3. Shift+Tab cycles different modes. Claude Code cycles permission modes: default (shown as Manual), acceptEdits, plan, then bypassPermissions and auto when they are available. Antigravity cycles default, accept-edits, auto and plan, with auto only where it is available. Codex binds Shift+Tab to cycling its collaboration modes, and /plan switches straight into plan mode (command reference). What Codex may do without asking lives in /permissions. Its keymap has next_permission_mode and previous_permission_mode actions with no default key, so /keymap can give them one.

One key, three agents, three different jobs.
4, 5, 6: background, history, transcript. Ctrl+B in Claude Code backgrounds Bash commands and agents (tmux users press it twice). Codex and Antigravity have no backgrounding key in their docs, though Codex's /ps shows background terminals and Antigravity's /tasks opens a Task Manager for background shell logs. Ctrl+R is reverse history search in Claude Code and Codex. Antigravity documents no history search, and its Ctrl+R opens Artifact Review. For the long view, Claude Code's Ctrl+O shows tool calls with a timestamp and the model on each assistant message. Codex puts that on Ctrl+T.
Keys that feed the prompt
7. Ctrl+G opens your editor in all three. Codex uses VISUAL, or EDITOR when VISUAL isn't set. Claude Code also accepts Ctrl+X Ctrl+E, the readline binding, and a /config option prepends Claude's last reply as commented context that it strips on save. Antigravity uses the editor set in /config, or $EDITOR. Set both variables once:
# ~/.zshrc or ~/.bashrc
export VISUAL="vim" # any editor that waits until you close it
export EDITOR="$VISUAL"
This is the key for anything longer than two lines. A prompt with numbered constraints, a pasted stack trace and a "do not touch" list is easier to get right in an editor than in a one-line box.
8 and 9. ! and @ behave alike. A ! at the start runs a shell command in all three. In Claude Code the output goes into the session and Claude responds to it. Codex runs it "under the current approval and sandbox settings." @ starts file-path completion everywhere; in Antigravity, @ plus a subagent's name messages that subagent.
10. Ctrl+V pastes an image. Claude Code inserts an [Image #N] chip at the cursor. In iTerm2 it is Cmd+V, and on Windows and WSL it is Alt+V. Codex binds Ctrl+V and Ctrl+Alt+V, and codex --image attaches one at launch. Antigravity's Ctrl+V pastes screenshots and video recordings as well.
11. Ctrl+J inserts a new line in any terminal. Shift+Enter works too in most modern terminals, but Ctrl+J needs no terminal setup in Claude Code, and Codex and Antigravity bind it as well.
12. When in doubt, ask the tool. ? on an empty Claude Code prompt toggles the shortcut panel. Codex binds ? to its shortcut overlay. Antigravity's /help opens a panel with commands and shortcuts, and /keybindings edits them in ~/.gemini/antigravity-cli/keybindings.json.
The readline keys, and the one that bites
Inside the prompt box, the classic readline keys mostly do what your shell taught you:
| Key | Claude Code | Codex | Antigravity CLI |
|---|---|---|---|
Ctrl+A start of line |
yes | yes | yes |
Ctrl+E end of line |
yes | yes | yes |
Ctrl+W delete back a word |
yes, back to whitespace | yes | not in its reference |
Ctrl+U delete to line start |
yes | yes | not in its reference |
Ctrl+K delete to line end |
yes | yes | approves a subagent action |
Claude Code's Ctrl+W deletes back to the previous whitespace, so one press removes a whole src/utils/foo.ts or --flag=value. Ctrl+Y pastes back what Ctrl+K, Ctrl+U or Ctrl+W removed, in Claude Code and in Codex. In Antigravity, unlearn Ctrl+K as "clear to end of line." If a subagent is waiting on a confirmation, that key approves it.
Antigravity has a key worth stealing for the other tools, too: Alt+J jumps to the next subagent waiting for confirmation.
The layer above the terminal
Those keys work inside one agent. Once three agents run at once, the slow part is finding the one that needs you. That is the problem I build Hermes IDE for, so weigh this section with that in mind.
Hermes runs each agent's own interface in a real terminal, "exactly as it would anywhere else," so the keys in this post belong to the agent, not to Hermes. Its own shortcuts sit on ⌘ on macOS and Ctrl+Shift on Windows and Linux (README):
| Action | macOS | Windows / Linux |
|---|---|---|
| New task | ⌘N | Ctrl+Shift+N |
| Jump to the agent waiting longest | ⌘I | Ctrl+Shift+I |
| Review Desk | ⌘G | Ctrl+Shift+G |
| Prompts | ⌘J | Ctrl+Shift+M |
| Command Palette | ⌘K | Ctrl+Shift+K |
⌘N starts a task on its own hermes/<name> branch in its own worktree, with the task as the agent's first prompt.

The ⌘N New task sheet in Hermes 2.3.4: the task, chips for Claude Code, the project, a new hermes/ worktree, Accept edits, model and effort, and the "Hermes will run" preview of the claude command.
⌘I is the cross-vendor version of Antigravity's Alt+J. It takes you to whichever agent has waited longest, and you answer in that agent's own terminal. Hermes never answers a permission prompt for you and never types into a terminal on its own.
⌘G opens the Review Desk, where changes show by turn or by file with risk flags, and a line comment goes back to the agent that wrote the line.

The Review Desk (⌘G) in By turn view for a Claude Code task: two turns, turn 1's diff of src/db.ts, the changed files and a commit message drafted from the turns.
⌘J opens Prompts: a ready-made prompt from the free Hodios library (10,000+ prompts, personas, workflows and rules) or one of your own, with blanks to fill before it goes into the session or a new task. Since 2.3.4, it searches with the task you already typed.
Hermes is free, source-available under BSL 1.1, and runs on macOS, Windows and Linux. It is not affiliated with Anthropic, OpenAI, Google or Nous Research. Download it or read the source.
If this was useful
Half of the keys above are about writing and rewriting prompts: Ctrl+G for the long one, Esc Esc for the one you sent too early, ⌘J for the one you keep retyping. My Prompt Engineering Pocket Guide covers what goes inside that box, so the second attempt is rarer.

Top comments (0)