omar@omr.sh:~/notes$

I Let AI Work on My Infrastructure — But I Still Read the Diff

2026-09-24 ai · automation · infrastructure · git · operations

I have reached the point where I am comfortable letting an AI work directly on parts of my infrastructure.

That sentence would have sounded fairly questionable to me not long ago.

Now it feels almost normal.

I use Claude and Codex from the terminal. They inspect files, write configuration, create Hugo templates, prepare deployment users, generate commands, modify CSS, and sometimes carry an entire task from reconnaissance to verification.

But there is one thing I do not want to delegate:

understanding what changed.

A person at a dark desk facing two monitors: one showing an AI agent proposing a Terraform change with a “review diff” prompt, the other showing the actual git diff of that change; a coffee mug on the desk reads “coffee, infra, diffs, repeat”.
fig. 01 — Let the agent work. Read the diff anyway.

The interesting part is not that AI can write commands

Generating shell commands was never the difficult part.

I can search for a command.

I can read a man page.

I can eventually work out the syntax.

What changed with terminal-based AI agents is that they can understand enough context to operate across an entire task.

Instead of asking:

How do I configure Caddy?

I can say:

Inspect the current site.

Prepare a separate Hugo deployment.

Do not touch production.

Create a low-privilege deployment account.

Verify the resulting permissions.

Show me what changed.

That is a completely different interaction.

The AI is no longer just answering a question.

It is participating in the operation.

I still want to know what it is doing

The easiest way to use an agent is also the least interesting one:

do it

and then wait for:

done

I do not want that workflow.

When I use Claude on infrastructure, I usually want it to expose the important steps:

command
reason
execution
result

Not because I enjoy reading every line of shell output.

Because if something breaks six months later, “Claude configured it” is not a useful mental model.

I still need to know:

  • which file controls the behavior;
  • which service owns the configuration;
  • which user executes the process;
  • which directory is production;
  • where the rollback lives;
  • what changed from the previous state.

The agent can perform the work.

I still want the architecture in my head.

Git makes this relationship much better

For the website behind this article, Git quickly became more than version control.

It became the boundary between:

AI changed something

and:

I accepted that change

A normal loop looks something like this:

git status
git diff

Then I look.

Sometimes the result is exactly what I expected.

Sometimes the AI solved the problem correctly but touched more than I wanted.

Sometimes the implementation is technically valid and aesthetically wrong.

Sometimes I simply change my mind.

That is the useful part of the diff.

It turns agentic work into something inspectable.

A successful result can still be the wrong change

This became obvious while rebuilding omr.sh.

Claude could make a visual change that was completely valid:

  • CSS parsed correctly;
  • Hugo built correctly;
  • the browser rendered correctly;
  • nothing crashed.

And I could still look at it and think:

no

One iteration made technical blocks too small and centered them like UI widgets.

Another changed the color balance enough that normal text started feeling slightly green.

Nothing was broken.

It was simply not what I wanted.

That distinction matters far beyond CSS.

Infrastructure has plenty of configurations that are:

valid
working
wrong for this environment

An agent cannot resolve that purely from syntax.

I increasingly treat AI like a very fast engineer with no ownership

That is probably the mental model that works best for me.

It can:

  • inspect;
  • propose;
  • implement;
  • test;
  • compare;
  • document.

It can do those things extremely quickly.

But it does not own the system.

I do.

If an AI creates a deployment path, I decide whether that path makes sense.

If it changes a firewall rule, I still need to understand the boundary.

If it modifies a web server configuration, I want to know the rollback.

If it builds something clever that I cannot explain later, I would rather simplify it.

The speed is useful precisely because I do not have to spend that speed advantage on blindly accepting more complexity.

The agent is also becoming part of how I learn

This is the part I did not expect.

I have been using Linux long enough to remember learning things very differently.

You found documentation.

You read mailing lists.

You searched forums.

You tried something.

It failed.

You read more.

Eventually the command worked, and somewhere in that process you understood why.

AI can remove almost all of that friction.

That can be dangerous if the only goal becomes getting to a working command.

So I try to use it differently.

If Claude is about to run something I do not know well, I want to see it.

If it changes a configuration, I want the diff.

If it creates a workflow, I want it documented.

If a command is useful enough, I will probably run it manually the next time.

The objective is not:

AI knows how to do this for me.

It is:

AI did this with me once.
Now I understand the pattern.

Where I still slow it down

I am much more permissive in a lab than I would be in a critical production environment.

That is one of the reasons I built Titan in the first place.

It gives me somewhere to experiment.

Still, there are operations where I want a deliberate stop before execution.

Anything involving:

firewall policy
routing
authentication
deletion
storage
production cutover
permissions

deserves more attention.

Not necessarily because the agent is likely to fail.

Because the cost of a technically small mistake can be disproportionately large.

Changing one line in Caddy is easy.

Changing the wrong line in Caddy can take the site down.

Removing one directory is easy.

Removing the wrong directory is equally easy.

The shorter the command, the less its blast radius is obvious from its size.

Verification matters more than confidence

One thing I like about agent-driven work is that I can make verification part of the task itself.

For example:

make the change
validate the configuration
reload the service
check its state
perform an HTTP request
inspect the logs

That is much better than:

make the change

For the Hugo cutover on this site, the useful result was not merely that the configuration changed.

It was that afterwards I knew:

Caddy configuration     valid
Caddy service           active
homepage                200
notes archive           200
article                 200
previous webroot        still present
rollback                available

AI makes it cheap to ask for those checks every time.

So I do.

I do not want AI to hide complexity from me

I want it to remove unnecessary effort.

Those are different goals.

If an agent can save me twenty minutes of syntax lookup, good.

If it can inspect five configuration files faster than I can, even better.

If it can turn a rough architectural idea into a working implementation, that is genuinely useful.

But I do not want the end result to become a black box just because the interface to creating it was conversational.

My infrastructure should still be understandable without the conversation that created it.

That means:

  • configuration lives in files;
  • changes are visible in Git where possible;
  • deployment has a documented path;
  • rollback exists;
  • important decisions are written down.

The chat is temporary.

The system is not.

What changed for me

Before using terminal agents heavily, I mostly thought about AI as a faster way to produce code or commands.

I do not think that anymore.

The interesting part is orchestration.

I can describe the state I want, define constraints, let the agent inspect the current state, and then work through the transition with it.

That is powerful.

It also makes review more important, not less.

The faster changes can be produced, the easier it becomes to produce changes that nobody has really understood.

So I let the AI work.

I let it write files.

I let it run commands.

I let it build things I would previously have assembled manually.

But before I trust the result, I still want to see:

git diff

Because automation should make me faster.

It should not make me blind.


← ~/notes