02Chapter 2: How the agent loop worksThis chapter explains the cycle that Claude Code, Codex CLI, and Copilot CLI all run. It assumes you can use a shell, you know roughly what a large language model is, and you have seen a chat API that takes a list of messages. You don't need to have installed any of the tools yet.5 min read
03Chapter 3: The tools an agent can callThis chapter assumes you are comfortable in a shell, know basic git, and have a rough idea of how a large language model works. It also assumes you have read the previous chapter on the agent loop. A language model only produces text. Tools are what let a terminal coding agent act on your repository5 min read
04Chapter 4: Installing and signing inThis chapter covers getting Claude Code, Codex CLI, and Copilot CLI onto your machine and authenticated. It assumes you are comfortable in a shell, have Node.js and npm installed, and can read environment variables. Version numbers and menu wording change often, so treat the commands below as the st5 min read
05Chapter 5: Working in an interactive sessionThis chapter assumes you can run the install commands from the earlier chapters, that you have signed in to at least one tool, and that you know basic git (commit, branch, diff). It covers the day-to-day mechanics of an interactive session: starting one, giving the agent input, steering it while it 4 min read
06Chapter 6: Context, history, and keeping sessions focusedThis chapter assumes you can start an interactive session in a project, know that an agent calls tools in a loop, and can read a git diff. It covers what the model sees on each turn, why long sessions degrade, and how to keep a session focused in Claude Code, Codex CLI, and Copilot CLI.6 min read
07Chapter 7: Project instructions with CLAUDE.md and AGENTS.mdThis chapter assumes you can run your project's tests and build from a shell, you know basic git, and you have read the earlier chapters on the agent loop and the context window. You should also have one of the three tools installed.6 min read
08Chapter 8: Slash commands for controlling a sessionThis chapter assumes you can start an interactive session in Claude Code, Codex CLI, or Copilot CLI. It also assumes you know what the context window is and have seen the permission prompts. Slash commands are how you manage a session while it runs.5 min read
09Chapter 9: Permissions and approval modesThis chapter assumes you can run a shell, read JSON and TOML, and know what the agent loop and built-in tools are from earlier chapters. It covers how Claude Code, Codex CLI, and Copilot CLI decide whether a tool call runs without asking you, and how to set those rules to match the risk of a task.5 min read
10Chapter 10: Sandboxing what the agent can touchThis chapter assumes you have read the chapter on permissions and approval modes. You should be comfortable with the shell, with file permissions, and with the idea that an agent runs commands on your behalf.5 min read
11Chapter 11: Configuring each tool with settings filesThis chapter assumes you can edit JSON and TOML files and that you know what permission prompts are, from the chapter on permissions and approval modes. Here you will learn where each tool keeps its settings, which file wins when two disagree, and how to commit safe defaults to a repository.4 min read
12Chapter 12: A plan, implement, verify workflowThis chapter assumes you can use a shell and git, can run your project's tests, and know the agent loop from earlier chapters: the model calls a tool, reads the result, and decides what to do next. Here you will apply that loop to a repeatable task workflow.5 min read
13Chapter 13: Checking the agent's work with tests and reviewThis chapter assumes you can run your project's tests and build from the terminal, and that you know basic git (diff, branch, commit). It covers how to check what a terminal coding agent changed before you accept it. Everything here applies to Claude Code, Codex CLI, and Copilot CLI alike.4 min read
14Chapter 14: Using git as a safety netThis chapter assumes you can commit, branch, and read a diff, and that you have already used one of the agents in an interactive session. It builds on the plan, implement, verify workflow. Git is what makes that workflow reversible. An agent can edit many files and run shell commands in a few second5 min read
15Chapter 15: Running agents from scriptsThis chapter assumes you can write shell scripts, read exit codes, and have used at least one of the three tools interactively. It also assumes you know the permission and sandbox settings from earlier chapters.4 min read
16Chapter 16: Connecting external tools through MCPThis chapter assumes you have read the chapters on the agent loop, built-in tools, and permissions. You should be comfortable editing JSON and TOML files and running npx commands.5 min read
17Chapter 17: Custom commands, hooks, and subagentsThis chapter assumes you have used slash commands, read a settings file, and understand the agent loop and permissions from earlier chapters. It covers three ways to extend an agent: saved prompts, scripts that run at fixed points in the loop, and helper agents with separate context. Claude Code sup4 min read
18Chapter 18: Security risks and prompt injectionThis chapter covers how terminal coding agents can be attacked and how to limit the damage. It assumes you know the agent loop, the built-in tools, permission and approval modes, sandboxing, and MCP from earlier chapters. You should also be comfortable reading shell commands and git diff output.5 min read
19Chapter 19: Comparing the three tools and choosing oneThis chapter assumes you have read the earlier chapters. You should know the agent loop, instruction files, permission and approval modes, sandboxing, non-interactive runs, and MCP. It compares Claude Code, Codex CLI, and Copilot CLI on those shared parts and gives a way to pick one for a task.4 min read