DEV Community

Cover image for I took SSH away from my agent. Then my own tool started lying to it.

I took SSH away from my agent. Then my own tool started lying to it.

SangheeSon on October 30, 2026

This spring I wrote twice about not giving Claude SSH access to my home server. The argument was simple: a shell is too sharp, so give the agent a ...
Collapse
 
ascendra_ventures_92c21f2 profile image
Ascendra Ventures •

"A narrow tool that says something false is just as dangerous as a shell" is the half of the argument most people skip. Taking SSH away feels like the safety work is done, and then the agent builds plans on the tool's guesses.

The skipped versus empty list split is the fix I would point other teams to. For a person, "no changes" and "could not compare" read almost the same. For an agent they mean "all good" and "go and look," and a null that a script reads as missing is worse still. Kevin's comment about not found, removed and failed all looking like nothing shows it is the same problem when you sell results to agents.

"Completely removed" with two volumes left behind is a great example, because nobody would have checked.

Did the soak change how you write the golden tests, for example a fixture with no earlier report so skipped cannot drift back quietly?

Collapse
 
higangssh profile image
SangheeSon •

Yes, though the lesson was that the golden alone would not have caught it. The golden froze whatever was there, and skipped on a quiet day was there. It recorded the bug faithfully.

What stops it drifting back is a pair of behaviour tests, one for each direction. A quiet second run must return "notable_changes": [] while the terminal still prints “No significant changes”. A run with no earlier report, and one whose previous snapshot cannot be read, must still say skipped, because there the comparison really was not made. If either side moves, a test names it.

The golden kept its job of making sure the shape cannot change quietly. Next to it there are now tests for the questions it cannot answer: no list anywhere, at any depth, reaches a caller as null, and every key is snake_case. Both of those were found the same way, by an agent reading the answer literally.

Collapse
 
alexshev profile image
Alex Shev •

Removing a capability is only half the control; the remaining tools must report their limits truthfully. A structured result contract with provenance, freshness, and explicit failure states is much safer than natural-language “success” messages. That lets the agent stop or escalate instead of constructing a plan on top of invented evidence.

Collapse
 
higangssh profile image
SangheeSon •

Agreed, and the failure states turned out to be the hard part. “Nothing changed”, “couldn’t compare” and “nothing there to find” all look empty, and they mean different things. If the tool doesn’t say which one it is, the agent guesses.

Collapse
 
kartik-nvjk profile image
Kartik N V J K •

Your quiet first day getting reported as a comparison that couldn't be made would send an agent off to investigate a perfectly healthy box. I like that skipped and [] can't overlap now. Does the golden test include a run with no earlier report, so skipped can't quietly drift back before 2.0?

Collapse
 
higangssh profile image
SangheeSon •

It does, as a pair. A run with no earlier report has to say skipped, and a quiet second run has to return [], so moving either one fails a test by name. They sit next to the golden rather than in it. The golden recorded skipped on that quiet day without complaint, because it froze whatever was there. So it guards the shape, and the two tests guard what the shape means.

Collapse
 
kevinhall profile image
Kevin Hall •

I sell lookup results to agents so I see the same thing from the other side. The empty answer was the one that fooled them most, because "not found", "record removed" and "the call just failed" all look like nothing. The agent reads all three as no and builds on it. Giving every empty row its own status and a short reason fixed more than anything else we tried

Collapse
 
higangssh profile image
SangheeSon •

That’s the same lesson from the side that pays for it. A status per empty row is close to where homebutler ended up. A report that couldn’t compare carries a skipped line saying why, whether it’s a first run or a previous snapshot that couldn’t be read. A comparison that found nothing is just []. The reason turned out to matter as much as the status, because “skipped” alone still left the agent guessing what to do next.

Collapse
 
reidmarlow profile image
Reid Marlow •

Separating what a call changes from what it reveals is where read-only tooling usually fails. I ran into the same problem wrapping systemd inspection when the status output printed environment variables from the unit definition. The command changed nothing on the host, but the model got live credentials in its context and pasted them into the next shell call.

Collapse
 
higangssh profile image
SangheeSon •

Exactly. I changed docker_top to return only the process name too, and inspect never read env values in the first place. Thanks for taking an interest in the post!

Collapse
 
robertpaschal profile image
Odinaka Robert Nnamani •

The docker_top token leak is the sharpest example. A read-only label said nothing about what the output handed to the agent.

Collapse
 
higangssh profile image
SangheeSon •

That one changed how the docs are written. read described what a call does to the machine, and we’d been treating it as if it also described what the call discloses. Now docker_top returns only the process name, so /usr/local/bin/probe serve --token=… comes back as probe, and every read tool’s docs say what it returns, not just that it changes nothing.

Collapse
 
robertpaschal profile image
Odinaka Robert Nnamani •

The probe example makes it concrete. A doc that names the return value, not just the side effect, changes what read-only means here.