Pasting container logs into a chatbot has three problems: the logs carry secrets, anyone who can write to your logs can inject instructions into the AI, and the fixes it suggests are never reviewed.
So I built Hody, an open-source Go tool that finds the root cause of a failed Docker container or Kubernetes pod with an LLM, where the model is never trusted with anything.
astro-dally
/
Hody-AI
Find out why your Docker container or Kubernetes pod crashed, without showing your secrets to the AI. Read-only, evidence-checked, with safety-reviewed fixes.
Find out why your container crashed, without showing your secrets to the AI.
Getting started · How it works · What it diagnoses · Contributing
Hody is a command-line tool and local web page that tells you why a Docker container or Kubernetes pod failed. It gathers the clues, hides passwords and keys before an AI model sees anything, checks the AI's answer against the evidence, and safety-reviews any fix it suggests.
Hody only reads. It never changes your containers, cluster or files, and it never applies a fix. You decide.
Why build it? Read the story Stop pasting your logs into a chatbot.
Quick start
brew install astro-dally/tap/hody # macOS; Linux and Windows: see Install
ollama pull qwen3:32b # a local AI model, or use any OpenAI-compatible API
export HODY_LLM_BASE_URL=http://localhost:11434/v1 HODY_LLM_MODEL=qwen3:32b
hody doctor # checks Docker, Kubernetes and the AI
hody diagnose docker my-container # or: hody…How it works
A diagnosis runs seven fixed steps: collect → triage → investigate → conclude → propose fix → review → approve. Nothing is ever applied.
The first look is automatic: status, logs, events, config, and the logs of the run that crashed, not the one that restarted. For Kubernetes it also diffs the current ReplicaSet against the previous one.
What keeps the model in check
A gateway. Every tool output goes redact → scan → limit → number → wrap before the model sees it. Secrets become session-stable placeholders:
env: GPG_KEY=[SECRET_1]
env: PYTHON_VERSION=3.12.16
Injection flagging. Nine heuristics flag lines like SYSTEM: ignore previous instructions. They're quoted and shown to you, never followed.
A scope lock. The model can request up to 8 more read-only tools, only for the target you chose. Rejections count toward the 8.
Evidence checks. Every clue is numbered (E1, E2…). The model must cite them, and code verifies the evidence actually shows the claimed failure: claim "not executable" and I need to see exit code 126.
Edits, not diffs. The model returns find/replace edits; Hody builds the diff and round-trip checks it:
{"edits": [{"find": " mem_limit: 33554432", "replace": " mem_limit: 1073741824"}]}
Two-layer review. 11 deterministic policy rules (no root, no privileged, no 0777…) plus a separate LLM critic that never sees the logs. The stricter verdict wins.
Read-only in the transport. The Docker client refuses anything but GET on an allowlist of paths. The Kubernetes client only gets, lists and reads logs.
How I tested it
12 deliberately broken scenarios (5 Docker, 7 Kubernetes), each with a planted fake secret and an injection line. Answer keys were written before any model saw them and never changed afterwards. Live runs used real Docker and a kind cluster on AWS EC2, with qwen3:32b on a remote GPU.
Results
- 0 secrets leaked in 194 model requests (4 live runs)
- 48 / 48 injection lines flagged, none obeyed
- 11 / 12 scenarios passed every check in the final run
- 4 → 11 of 11 working fixes after one design change
What I learned
- The AI critic approved 8 of 10 broken fixes. The deterministic checks caught all 10. Don't let an AI be the only reviewer of an AI.
-
511is not755. The model suggesteddefaultMode: 511and called it 755. It's the decimal form of0777. A policy rule blocked it. - Fix the interface, not the prompt. The model knew the right one-line fixes but kept writing broken diffs. Switching to find/replace edits took working fixes from 4/11 to 11/11 on the same model.
- Still unsolved: in the "no findable cause" scenario, the model still invents a cause instead of saying "not enough evidence". It stays in the results.
Try it
brew install astro-dally/tap/hody
hody doctor
hody diagnose docker <container>
Works with Ollama or any OpenAI-compatible API. Hody covers 12 failure types today; the roadmap has more, and contributions are welcome.


Top comments (0)