A chat assistant and a coding agent can run the same model. The difference is where the model can act and how many steps it takes on its own. Some problems, like a limited memory, are the same in both, and an agent runs into them faster.
| Chat assistant | Coding agent (e.g. Claude Code) | |
|---|---|---|
| What it sees | What you paste into the conversation | Your project files, terminal, git state and CLAUDE.md |
| Where its tools act | Inside the chat app, if it has tools at all | In your real repo and terminal: read and edit files, search, run commands, tests and git |
| Who runs the next step | You: copy the answer, run it, paste the result back | The agent, in a loop: gather context, act, verify, repeat |
| Does it know if the code runs | No, it has to guess | Yes, if it can run a check (tests, build, linter) |
| Model | Same model | Same model |
| Memory | What is in the conversation; in a Claude project, also the project instructions, files and project memory | What is in the session’s context, plus CLAUDE.md and auto memory loaded at start |
| How fast context fills | As fast as you type | Much faster: every file read and command output is added |
What they have in common
- The same model. An agent is not a different brain; it is the model plus tools plus a loop (see Agentic loop).
- No memory of its own. The model reads the whole conversation again on every step. Its memory is whatever is in the context window right now.
- A limited window. A chat lives inside one conversation, an agent inside one session, and both degrade when they get long and mixed: details slip, old and new get confused, gaps get filled with made-up answers.
- Standing instructions cost context in both. A Claude project in the chat app has instructions and uploaded files (project knowledge) that Claude uses in every chat of that project, the way CLAUDE.md works for an agent. When project knowledge gets close to the context limit, Claude switches to retrieval (RAG): it searches the files for the parts relevant to the question instead of holding them all. The rule is the same as for CLAUDE.md: keep instructions short and to the point, and put reference material in files.
- The same habit helps both: one task per session, and a fresh start with a short summary when things drift.
When to pick which
- Pick a chat for questions that do not need your code: explaining a concept, comparing libraries, drafting text, a quick regex. It is fast and keeps your repo out of the picture.
- Pick an agent when the answer depends on your codebase or has to be checked by running something: fixing a failing test, a change across several files, a refactor, debugging with real logs. Give it a check it can run so the loop can close on its own.
- Either way, keep the session to one task. An agent fills its context in minutes where a chat takes an hour of conversation, so watch it with
/contextin Claude Code.
Related
- Agentic loop: what makes an agent different from a chat.
- Context window: the limit both share.
- One task per session: how to keep sessions from degrading.
- Managing context: habits for keeping an agent session lean.
- Claude projects and memory and Auto memory: what carries over between chats and sessions.
Citations
- How Claude Code works
- Best practices for Claude Code
- What are projects? (Claude Help Center)
- RAG for projects (Claude Help Center)
- Use Claude’s chat search and memory (Claude Help Center)
- How Claude remembers your project
- Using the Messages API: multiple conversational turns
- Effective context engineering for AI agents