CLAUDE CODE AGENTS: FUNDAMENTALS - Chapter 5, Exercise 1 Why a Coding Agent Needs Bash and a Teaching Agent Doesn't ==================================================================================== QUESTION: Explain why a coding agent typically needs Bash access while a teaching agent typically doesn't, tying your answer to each agent's actual purpose. SOLUTION / EXPLANATION: Chapter 1's isolation principle is that a tool allowlist should match exactly what an agent's actual job requires - no more, no less. Applying that principle to these two agents produces genuinely different answers, because their underlying jobs are different. A teaching agent's entire purpose is explaining a concept or piece of code so the learner understands it themselves. That job is accomplished purely through reading and reasoning - there's nothing about explaining something that requires running a shell command. Granting Bash access wouldn't add any real capability toward a teaching agent's actual job; it would only widen what could go wrong if the agent were ever misused or misdirected, exactly the concern Chapter 2's warning box raises about granting tools "just in case." A coding agent's purpose is fundamentally different: it's expected to produce a finished, WORKING code change, not just a plausible-looking edit. This chapter is explicit that part of a coding agent's job is verifying its own change actually works - running the relevant tests or a build step - rather than simply assuming an edit is correct because it looks reasonable. That verification step genuinely requires running something: executing a test suite, a build command, or the modified code itself. Without Bash access, a coding agent could still make an edit, but it would have no way to confirm that edit actually behaves correctly - it would be reduced to guessing at correctness rather than checking it. So the difference isn't arbitrary: Bash access is withheld from the teaching agent because its job never requires it, and granted to the coding agent because verifying a real code change genuinely does require it. -------------------------------------------------------------------------- WHY THIS WORKS AS AN ANSWER: It applies Chapter 1's own isolation principle to both agents specifically, explaining precisely why Bash adds no real capability for explanation but is genuinely necessary for a coding agent to verify its own work, rather than treating the tool difference as an arbitrary default.