CLAUDE CODE AGENTS: FUNDAMENTALS - Chapter 4, Exercise 3 Why "Explain and Fix" Is the Wrong Ask for a Teaching Agent ==================================================================================== QUESTION: A developer asks a teaching agent to "explain why this function is broken and what's wrong with it," expecting the code to also get fixed as part of the answer. Explain what's likely to go wrong with this expectation, using this chapter's own material. SOLUTION / EXPLANATION: This chapter is explicit that a teaching agent's purpose is building the learner's own understanding, not producing finished work - and its tool access reflects that directly: a well-designed teaching agent is typically granted only Read/Grep access, with no Edit or Write tools at all, since its whole job is explanation rather than modification. This isn't an oversight; per Chapter 1's own isolation principle, it's a deliberate restriction matching the agent's actual intended purpose. Given that, the developer's expectation runs into a real, structural problem: even if the teaching agent produces an excellent, accurate explanation of why the function is broken, it has no tool available to actually apply a fix to the code - it can describe what should change, but it cannot make that change itself. The developer asking it to also "fix" the function is asking for something the agent's own design deliberately does not provide, not something it's simply choosing not to do. This is exactly the scenario this chapter's own "When Not to Use a Teaching Agent" section addresses: routing a "just fix it" request through a teaching agent produces, at best, a good explanation with no actual code change - wasting the step where the developer expected a finished result. A coding agent (or the same developer, now armed with the teaching agent's explanation) is the one actually equipped to apply the fix. The corrected approach: use the teaching agent to build understanding of why the function is broken first, then hand the actual fix to a coding agent (or apply it directly) as a separate, deliberate second step. -------------------------------------------------------------------------- WHY THIS WORKS AS AN ANSWER: It connects the failure directly to the teaching agent's own deliberately restricted tool access (no Edit/Write), explaining that the missing fix isn't a shortcoming but a structural consequence of the agent's intended design, and names the correct two-step alternative rather than treating the mismatch as a mysterious failure.