C.W.K.
Stream
Lesson 01 of 04 · published

The Agent Lives in Your Terminal

~18 min · mental-model, agent-vs-chatbot, first-principles

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

An AI CLI is not a chatbot in a terminal

Open Claude Code, Codex CLI, or Gemini CLI for the first time and the surface looks like a chatbot — you type, it answers. That framing is the single biggest source of confusion for everyone who comes from web Claude or ChatGPT. An AI CLI is a different category of tool. It is an agent with read access to your real files, write access to your real disk, and an open channel to your real shell. The chat box is the smallest part of it.

The mental model that makes everything click: there's a long-running process holding a conversation, and that conversation is allowed to spawn tool calls. Every tool call lands on your machine — a file read, an edit, a git status, a npm test. The model decides which tools to use; you decide which tools you let it use. That permission boundary is where all the design lives, and you'll see the same boundary repeat across every CLI in this quest.

This shifts what your prompts should look like. In a chat, you ask questions. In an agent, you give a goal and let it work. "Read package.json, find the unused dev dependencies, and remove them" is one prompt — the agent reads, greps, edits, and runs the test suite to confirm. That's not three prompts; it's one autonomous task with a verification loop.

Code

Same prompt, two completely different tools·bash
# Web chat — text in, text out, you copy-paste the result
# (works on any device, no file access)

# AI CLI — same prompt, but it actually runs:
claude "find unused devDependencies in package.json and remove them"
# Reads: package.json
# Greps: import statements across src/
# Edits: package.json
# Runs:  npm install && npm test
# Reports: which deps were removed and whether tests still pass
The agent loop, conceptually·text
[user]    "fix the failing auth test"
[model]   reads tests/auth.spec.ts          ← tool call 1
[model]   reads src/auth.ts                 ← tool call 2
[model]   runs npm test -- auth             ← tool call 3
[model]   sees the failure, edits src/auth  ← tool call 4
[model]   runs npm test -- auth again       ← tool call 5
[model]   "fixed: bcrypt salt rounds were 0"

External links

Exercise

In your own words (no LLM help), write a 4–6 line answer to: "Why does an AI CLI need a permission system, and what would happen without one?" Save it to ~/notes/ai-cli-mental-model.md. You'll re-read this at the end of the quest to see how your answer changes.

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.