Agentic coding FAQ

How coding agents work, what to hand them before they start, and how to check the result.

How coding agents work

What is a coding agent, and how does it work?
A coding agent combines a language model with a program called a harness. The model produces a reply or asks to use a tool. The harness runs allowed tools, such as reading files or running tests, and feeds the results back to the model. That loop can repeat several times on a single task.
What is the difference between AGENTS.md, skills, and MCP?
Use AGENTS.md or CLAUDE.md for standing project instructions, such as the checks to run and rules to follow. A skill holds instructions for a particular workflow, such as preparing a release. An MCP server gives the agent access to tools or data, such as an issue tracker. A skill can tell the agent when and how to use a tool supplied by an MCP server.
Why did my agent ignore a rule, and how can I enforce it?
Written rules guide the model, and it can miss them. For a hard boundary, use the harness settings to allow, block, or ask before a tool runs. A sandbox limits what a running command can reach. A hook can enforce a project rule at a tool event, such as blocking edits to a protected file.

Planning and building

When is higher thinking effort worth it?
Use more thinking time for work with open questions, such as tracing a hard-to-reproduce bug or choosing an architecture. A small edit with clear requirements and a check is usually a better fit for lower effort. Alex adjusts effort to the task and checks the result either way.
What should I tell a coding agent before it starts building?
Write down the goal, the scope, and how you will know the work is done. For example, say which customer flow should change, which areas should stay as they are, and how to check the result. Alex works through those decisions with a planning agent, then hands the agreed spec to a fresh session to build.
What belongs in AGENTS.md or CLAUDE.md?
Keep the project instructions short and hand-written. Include the commands the agent should run, firm project rules, and details it would have trouble finding on its own. Alex keeps the reasons for longer-lived architecture decisions in separate decision records and points to them from the instructions.
Why does my coding agent get confused in a long session?
Earlier messages, file reads, and tool results can carry outdated assumptions into the next turn. A test result describes the code at the time the command ran. If the code has changed since then, have the agent rerun the check and use that result.
When should I compact a session or start fresh?
Stay in the session while the recent context is helping. Compaction summarizes earlier turns and may drop details. When Alex starts fresh, he carries over the goal, what changed, what was verified, and the next step in a short handover.

Checking the work

The tests pass. How do I know the change is ready?
Passing tests tell you that the cases they cover worked. Read the diff, then try the user flow or run the command described in the spec. Compare what happens with the expected behavior. An agent can carry the same mistaken assumption into both its code and its tests.
Should the agent review its own code?
Ask the builder to explain its choices and show the checks it ran. Then give a fresh reviewer the requirement and the diff so it can test the change without relying on the builder’s assumptions. A person decides what is ready to merge.
What is a software factory with coding agents?
A software factory makes the steps from request to reviewed pull request repeatable. It can turn an issue into a spec, have an agent implement it, and send the result through project checks and review. Start with one small issue and verify each step before you hand it more work.

Alex teaches these ideas in Agentic Coding Fundamentals.