Skip to content
Roberto Mladina
Local time in Ingolstadt:
DE – Deutsch EN – English

Logbook · Event 24 October 2026 · Lessons learned

Empty passwords three times: why secrets never go through the chat

5 min read

  1. 01Hurdle

    Three times, credentials arrived empty on the server, and once a key ended up in the chat.

  2. 02Cause

    The command for storing them had no keyboard, for example because it ran in the AI session instead of my terminal.

  3. 03Solution

    A new command only reads from the keyboard and stores nothing if a value is empty.

  4. 04Result

    Since 6 November 2026 it has stopped on the wrong path instead of silently storing empty values.

Evidence

# Credentials file, 24 Oct 2026
# only whether set, never the value
21:28  DB_NAME      empty
21:28  DB_USER      empty
21:28  DB_PASSWORD  empty
21:47  all three    set

For my AI agents to run a website, they need access credentials: for the database, for the server and for services that warn me when something fails. I store these secrets myself on my server, in files nobody else can read. The agents read them there when they need them. How easily something goes wrong, I experienced twice in one evening. Just under two weeks later it happened a third time.

Terms on this page
AI agent
A program that uses an AI to carry out tasks on its own.
Secrets
Credentials such as passwords and keys that only authorised people may know. Whoever knows them can reach the services they protect.
Dead man’s switch
A service out on the internet that expects a regular sign of life and raises the alarm when it does not arrive.
Claude Code
A program from Anthropic that lets an AI work as an agent on a computer. You write to it in a session, and it runs commands there.
Terminal
A window where you type commands for a computer and read their output.
Context
Everything the model reads along in the conversation. That includes the commands and what they print.
Test copy (staging)
A copy of the website where changes run first. Whatever goes wrong there does not affect the live site.
Model
An AI that has learned from very many texts to write a fitting text in response to a request. It runs at the company that offers it, not on my server.
Rotation
A secret is replaced by a new one, and the old one becomes invalid. This is necessary as soon as someone else may have seen it.
Fail fast
A program stops at the first sign of an error and reports it. That way no half-finished or wrong result is produced.

A key in the chat

On 24 October 2026 at 20:06 I wanted to store the key for the dead man’s switch. That is a service on the internet that raises an alarm if my server does not report in for a while. An agent had written the instructions for it. They said: type the command into the session directly, with an exclamation mark in front. In Claude Code, a “!” at the start runs a command on the server without me having to open a terminal of my own. That is convenient.

Two things went wrong. The command waits for input from the keyboard, but in the session there is none. So it got nothing and stored an empty value. And the key was part of the command line. That made it part of the conversation with the agent (context).

The agent noticed a minute later because it measured: the file was there, the value had length zero. I invalidated the key immediately, generated a new one and stored it in my own terminal at 20:10. At 20:13 the instructions were corrected.

An hour later: three empty values

The same evening it was the turn of the test copy (staging) of inspirezz.de. For that, the agents needed access to a database: name, user and password. At 21:28 I wrote “stored”. The agent checked the file at once, and all three values were empty. How that happened this time, I cannot say for sure. All I know is that the command had no keyboard here either.

I then filled the file by hand with an editor, in my own terminal. At 21:47 all three values were set, about 20 minutes later than planned. At 21:30 the agents’ rules already said: I store secrets myself, in my own terminal, never in the chat and never via the exclamation mark. With the note that it had happened twice on 24 October.

Why a secret does not belong in the chat

Everything that happens in a session becomes part of the conversation: my messages, the commands and what they print. The conversation goes to the model’s provider with every answer, and on my server it is written down. A password that once stood there cannot be taken back. That is why it counts as exposed and has to be replaced (rotation), like the key that evening.

The same rule applies in the other direction. No command of the agents may print a secret. They only check whether a value is set, never the value itself. That is what the evidence above looks like.

The third time, despite a warning

On 6 November 2026 this site was added, with two databases. The instructions now warned explicitly: not via the exclamation mark, the values stay empty there. At 12:57 both files were created, and all six values were empty.

The warning had prevented nothing. So the agent changed the command itself. The new command only reads from the keyboard. If there is none, it stops at once (fail fast), without creating a file. If a value is empty, it stores nothing and reports “LEER: nichts gespeichert” (German for “EMPTY: nothing stored”). Only when everything is there does it report “gespeichert” (“stored”). At 13:04 it was finished and tested, and at 13:14 all six values were stored correctly.

Since 8 November 2026 this command has been in the checklist for every new site. The agent only fills in the site and the file name before sending it to me.

What I take from this

A rule in a text did not prevent the error, not even with the note that it had already happened twice. What prevented it was a tool that does not allow the error. The wrong way no longer leads to an empty file but to a clear message before anything is stored.

What is still open

How the values became empty the second and third time, I still do not know for sure. The new command makes that matter less, because it catches every way without a keyboard.

Writing this post turned up one more thing: two older instructions for the dead man’s switch key had the old command without this protection. Since 8 November 2026 they have had the new one. The old command now only exists in the records from the start of the first two sites, no longer in any instructions.