C.W.K.
Stream
Lesson 02 of 11 · published

The TUI — @, !, /, Tab

~14 min · codex, tui, fuzzy-search, shell-injection

Level 0🌱 Novice
0 XP0/70 lessons0/11 achievements
0/120 XP to next level120 XP to go0% complete

Full-screen agent collaboration

Codex's TUI is a three-pane terminal application: transcript at the top (conversation + diffs), action stream in the middle (live tool calls), composer at the bottom (where you type). Three keyboard primitives make it different from a chat box: @ for fuzzy file attach, ! for shell-out, / for slash commands. Tab auto-completes and injects suggestions.

Diffs are first-class. When Codex proposes an edit, the TUI shows it as a colored unified diff with [A]pprove [R]eject [E]dit [S]kip-all footer. You don't paste the diff into a different tool to read it; the TUI renders it inline.

Code

Three composer prefixes·text
# @ — fuzzy file search and attach
@ auth        → src/auth.ts, tests/auth.spec.ts, docs/auth-flow.md
              ↑/↓ to select, Enter to attach

# Compose attached files into a prompt:
@src/auth.ts @tests/ Refactor auth to JWT RS256

# ! — run a shell command, output appears in transcript
!git status
!npm test
!git diff HEAD~1
# Codex can reference the output in its next response

# / — open slash command popup
/permissions
/compact
/theme
/clear
Diff approval keys·text
─── src/auth.ts ─────────────────────
@@ -12,7 +12,12 @@
-  function validateToken(token) {
-    return jwt.verify(token, SECRET);
+  async function validateToken(token: string): Promise<TokenPayload> {
+    try {
+      return await jwt.verify(token, SECRET) as TokenPayload;
+    } catch (err) {
+      throw new AuthError('Invalid token', 401);
+    }
+  }
─────────────────────────────────────
[A]pprove  [R]eject  [E]dit  [S]kip all

External links

Exercise

Run a real Codex session in the TUI. Use all three prefixes: attach 2 files via @, run !git diff HEAD~3, open /permissions. Compose a prompt that uses all three contexts.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.