What is Claude Code?Lesson 2 of 18

What is a Coding Assistant?

The Anatomy of a Coding Assistant

A coding assistant combines a large language model with a set of development tools. The language model provides reasoning and code generation, while the tools enable real-world interaction with your codebase, file system, and development environment.

Language ModelReasoning + Code GenerationFile ToolsShell CommandsSearch + GitYour Codebase + File System

A coding assistant = language model + development tools

The key limitation is that language models can only process text. They cannot natively read files, execute commands, or browse the web. Every non-text action requires a tool -- a structured interface that bridges the gap between text generation and real-world interaction.

How Tool Use Works Under the Hood

When you ask a coding assistant to 'fix the failing test', a precise choreography of tool calls happens behind the scenes. The assistant doesn't do everything at once -- it iterates through a cycle of reasoning, acting, and observing.

  • 1.The system prompt tells the LLM which tools are available and how to request them
  • 2.The LLM analyzes your request and decides which tool to call first (e.g., read the test file)
  • 3.The host environment executes the tool call and returns the result as text
  • 4.The LLM processes the result, reasons about what to do next, and may call another tool
  • 5.This loop continues until the LLM has enough information to complete the task or take action
textThe iterative tool use cycle in action
User: Fix the failing test in auth.test.ts

[LLM thinks] I need to read the test file first
[Tool call]  read_file("src/__tests__/auth.test.ts")
[Result]     ... test code with expect(result).toBe(true) ...

[LLM thinks] Now I need to see the implementation
[Tool call]  read_file("src/auth/login.ts")
[Result]     ... implementation returning false ...

[LLM thinks] The function returns false but test expects true. Bug is on line 23.
[Tool call]  edit_file("src/auth/login.ts", line 23, fix)
[Result]     File updated

[LLM thinks] Let me verify the fix works
[Tool call]  run_command("npm test -- auth.test.ts")
[Result]     All tests passing

Quality Matters

The quality of this tool use cycle -- knowing which tool to call, what order to call them, and how to interpret results -- is what separates great coding assistants from mediocre ones. Claude excels here because of its advanced reasoning about tool composition.

Key Takeaways

  • A coding assistant = language model (reasoning) + tools (real-world interaction)
  • Language models can only process text -- all file, command, and search operations require tools
  • Tool use is iterative: the LLM reasons, calls a tool, observes the result, then decides the next step
  • The quality of tool use directly determines the assistant's effectiveness at real development tasks
  • Claude's advantage is superior multi-step tool composition -- chaining reads, edits, and commands intelligently

Check Your Understanding

Test what you learned in this lesson.

Q1.When a coding assistant encounters the task 'fix the failing test', what is typically the FIRST tool call it makes?

Q2.What distinguishes Claude's tool use from other language models?

Q3.In the tool use cycle, what happens after the host environment executes a tool call?