Model-Driven vs Hard-Coded Decisions
Let the model decide; reserve code for guarantees.
Two Ways to Decide
Every agent you build has to make decisions. Who makes them is the design choice.
There are two options:
- Model-driven: Claude looks at the situation and chooses the next step.
- Hard-coded: your code forces the step, no matter what.
The rule for the exam: let the model decide, and reserve hard code for guarantees you cannot afford to get wrong.
Why the Model Should Drive
Real tasks are open-ended. The order of steps is not known in advance.
A customer message might need one lookup, or three. A research task might branch in ways you cannot predict. Claude reads the live context every turn and adapts.
If you hard-code the path, you freeze the agent into one rigid script. It breaks the moment reality differs from your plan. So the default is: give Claude tools and let it choose.
All lessons in this course
- What Makes a System Agentic
- Model-Driven vs Hard-Coded Decisions
- When to Use an Agent
- The Agentic Loop Overview