The Agentic Loop
When you give Claude a task, it works through three phases: gather context, take action, and verify results. These phases blend together — Claude uses tools throughout, whether searching files to understand your code, editing to make changes, or running tests to check its work.
The loop adapts to what you ask. A question about your codebase might only need context gathering. A bug fix cycles through all three phases repeatedly. A refactor might involve extensive verification. Claude decides what each step requires based on what it learned from the previous step, chaining dozens of actions together and course-correcting along the way.
You're part of this loop too. You can interrupt at any point to steer Claude in a different direction, provide additional context, or ask it to try a different approach. Claude works autonomously but stays responsive to your input.
The agentic loop is powered by two components: models that reason and tools that act. Claude Code serves as the agentic harness around Claude — it provides the tools, context management, and execution environment that turn a language model into a capable coding agent.
Models and Tools
Claude Code uses Claude models to understand your code and reason about tasks. Multiple models are available with different tradeoffs — Sonnet handles most coding tasks well, while Opus provides stronger reasoning for complex architectural decisions. Switch with /model during a session or start with claude --model.
Tools are what make Claude Code agentic. Without tools, Claude can only respond with text. With tools, Claude can act: read your code, edit files, run commands, search the web, and interact with external services. Each tool use returns information that feeds back into the loop, informing Claude's next decision.
The built-in tools fall into five categories: • File operations — Read files, edit code, create new files, rename and reorganize • Search — Find files by pattern, search content with regex, explore codebases • Execution — Run shell commands, start servers, run tests, use git • Web — Search the web, fetch documentation, look up error messages • Code intelligence — See type errors and warnings, jump to definitions, find references
You can extend what Claude knows with skills, connect to external services with MCP, automate workflows with hooks, and offload tasks to subagents.
What Claude Can Access
When you run claude in a directory, Claude Code gains access to:
• Your project — Files in your directory and subdirectories, plus files elsewhere with your permission. • Your terminal — Any command you could run: build tools, git, package managers, system utilities, scripts. • Your git state — Current branch, uncommitted changes, and recent commit history. • Your CLAUDE.md — A markdown file where you store project-specific instructions, conventions, and context that Claude should know every session. • Extensions you configure — MCP servers for external services, skills for workflows, subagents for delegated work, and Claude in Chrome for browser interaction.
Because Claude sees your whole project, it can work across it. When you ask Claude to fix the authentication bug, it searches for relevant files, reads multiple files to understand context, makes coordinated edits across them, runs tests to verify the fix, and commits the changes if you ask.
Sessions and Context
Claude Code saves your conversation locally as you work. Each message, tool use, and result is stored, enabling rewinding, resuming, and forking sessions. Before Claude makes code changes, it also snapshots the affected files so you can revert if needed.
Sessions are ephemeral — unlike claude.ai, Claude Code has no persistent memory between sessions. Each new session starts fresh. If you want Claude to know something across sessions, put it in your CLAUDE.md.
Claude's context window holds your conversation history, file contents, command outputs, CLAUDE.md, loaded skills, and system instructions. As you work, context fills up. Claude compacts automatically, but instructions from early in the conversation can get lost. Put persistent rules in CLAUDE.md, and run /context to see what's using space.
Skills load on demand — Claude sees skill descriptions at session start, but the full content only loads when used. Subagents get their own fresh context, completely separate from your main conversation.
Stay Safe with Checkpoints and Permissions
Claude has two safety mechanisms: checkpoints let you undo file changes, and permissions control what Claude can do without asking.
Every file edit is reversible. Before Claude edits any file, it snapshots the current contents. If something goes wrong, press Esc twice to rewind to a previous state, or ask Claude to undo. Checkpoints are local to your session, separate from git.
Press Shift+Tab to cycle through permission modes: • Default — Claude asks before file edits and shell commands • Auto-accept edits — Claude edits files without asking, still asks for commands • Plan mode — Claude uses read-only tools only, creating a plan you can approve before execution • Delegate mode — Claude coordinates work through agent teammates only
You can also allow specific commands in .claude/settings.json so Claude doesn't ask each time.
Work Effectively with Claude Code
Claude Code is conversational — you don't need perfect prompts. Start with what you want, then refine. You can interrupt Claude at any point to steer it in a different direction.
The more precise your initial prompt, the fewer corrections you'll need. Reference specific files, mention constraints, and point to example patterns. Claude performs better when it can check its own work — include test cases, paste screenshots of expected UI, or define the output you want.
For complex problems, separate research from coding. Use plan mode to analyze the codebase first, review the plan, refine it through conversation, then let Claude implement. This two-phase approach produces better results than jumping straight to code.
Think of delegating to a capable colleague — give context and direction, then trust Claude to figure out the details. You don't need to specify which files to read or what commands to run. Claude figures that out.
Ready to unify your data?
Connect all your business tools into one database. Get started with Intellova and unlock better analytics, automations, and AI.
Get Started with IntellovaFound this article helpful? Share it with others.
