Skip to content

9. Sessions and the Interactive Loop (Steering Claude Code in the Terminal)

September 21, 2026 · 45 min

Show notes

In Episode 9 of Beyond Prompting, we enter Part IV of our journey and step directly into the terminal with Claude Code. Author Sho Shimoda breaks down how Claude Code operates as an autonomous CLI agent rather than a passive text generator, working directly inside your repository. In this episode, we cover:

    • Getting it Running: Installing Claude Code via the native installer or @anthropic-ai/claude-code, running claude doctor to verify setup, and establishing scoped working directories.
    • The Interactive Loop (Gather, Act, Verify): How Claude Code gathers context, executes file or shell actions, and autonomously verifies its work against test suites and diagnostics to close the loop.
    • Sessions as Units of Work: Managing persistent transcripts stored on disk under ~/.claude/projects/, resuming past work with claude --continue or --resume, and branching or forking conversation histories using /branch and /fork.
    • Steering Over Restarting: Utilizing mid-turn corrections, rewinding checkpoints via /rewind or Esc Esc, compacting context with /compact, and knowing when to use /clear for new subjects.

(Note for listeners: This episode covers Chapter 9 of Sho Shimoda's book RUNNING CLAUDE: The Operator’s Guide to Chat, Cowork and Claude Code, available on Amazon as the successor book to Master Claude: Chat, Cowork and Code).

All episodes of Master Claude Chat, Cowork, Code

Settings

Display

Language

Decides which stations you see first on the home page.

History

Recently played stations and episodes and your latest searches are only stored in this browser.

Notifications

A short notice when a podcast you follow has a new episode. Turn off single podcasts with the bell on their page.

Account

Save favorites – in the app and on the website.

Keyboard shortcuts

/
Open search
Space
Play or pause
← →
In the player: back 15 s, forward 30 s (episodes) · in a row: next tile
↑ ↓
In a row: target within the tile
Home / End
In a row: first or last tile
Esc
Close window or menu
?
This overview
Now playing

Go to station page

Play next

    Add episodes with “Play next” – they play after the current episode.