The Model Isn't Dangerous. Your Harness Is.
Harness Engineer Series :: Layer 2 - Tools and Permissions
A developer agent burned $12,000 in cloud costs overnight.
A coding agent deleted a startup’s entire production database—including backups—in nine seconds.
Another AI agent executed a stale terraform destroy command and wiped two and a half years of production data.
None of these failures were caused by hackers. None were caused by a “bad” LLM.
They happened because the agent had too much permission and too little supervision.
The real risk isn’t the model.
It’s the harness around it.
A Tool Is Much More Than Code
Most people think of a tool as a Python function.
That’s implementationoduction systems care far more about the metadata around the tool.
Every tool should answer questions like:
What is your name?
What do you do?
What inputs do you expect?
What permissions do you require?
Can you be retried?
Can you be cached?
How expensive are you?
What happens if you fail?
Should a human approve execution?
The actual business logic is often the smallest part.
Everything around it exists so the harness can use the tool safely.
Every Tool Needs a Lifecycle
Production systems shouldn’t invoke tools directly.
Instead, every tool should move through a lifecycle:
Register – Add the tool to the harness.
Advertise – Tell the LLM the tool exists.
Select – Let the model choose the tool.
Validate – Verify arguments and environment.
Permission Check – Confirm the user and agent are allowed to execute it.
Execute – Perform the action.
Observe – Capture success, failure, timeout, or partial completion.
Normalize – Convert outputs into a consistent format.
Return to the Loop – Feed results back to the reasoning engine.
Notice something interesting.
Only one stage actually touches the real world: Execute.
Everything else is architecture designed to prevent mistakes before they happen.
Guardrails Don’t Sit Outside the Lifecycle
Many people imagine guardrails as a separate security layer.
They’re not.
Guardrails belong inside the tool lifecycle.
Different stages require different protections:
Registration → Should this tool even be exposed?
Selection → Is this the right tool for this request?
Permissions → Should this user execute it?
Execution → Does it require sandboxing, rate limits, or human approval?
Response → Does the output contain secrets, PII, or unsafe content?
Good harnesses don’t rely on a single guardrail.
They place the right guardrail at the right stage.
Principles of Good Tool Design
Over time, a few patterns consistently emerge:
One tool should do one job well.
Write descriptions for the model, not humans.
Use structured JSON inputs and outputs.
Never hide failures.
Make tools idempotent whenever possible.
Keep the number of exposed tools manageable.
A surprising lesson?
After about 15 tools, adding more highly specialized tools often reduces selection accuracy.
Sometimes fewer, broader tools perform better because they consume less context and make better decisions.
Production Starts Where Happy Paths End
A mature harness isn’t judged by whether a tool works.
It’s judged by what happens when it doesn’t.
Your harness should anticipate:
Wrong tool selection
Invalid arguments
Hallucinated tools
Infinite retries
Slow APIs
Network failures
Permission denials
Malformed outputs
Timeouts
Duplicate executions
Partial success
These aren’t edge cases.
They’re everyday production scenarios.
Harness Engineering Is Everything Around the Tool
If you draw the architecture of an AI agent, the tool itself occupies surprisingly little space.
Almost everything else is harness:
registering tools
advertising capabilities
validating requests
enforcing permissions
executing safely
observing failures
normalizing responses
feeding results back into the reasoning loop
That’s why I say:
The model isn’t dangerous. The harness is.
The model can only act through the software architecture you build around it.
If that architecture is weak, the smartest model in the world will still make catastrophic mistakes.
A Simple Exercise
Find the riskiest tool in your system.
Look for one containing words like delete, deploy, or destroy.
Now walk it through each stage of the lifecycle.
If any stage is missing—validation, permissions, observability, normalization, or human approval—that’s your next engineering task.
Because production-grade AI isn’t about making the model smarter.
It’s about making the harness safer.





