When should you use it?
- A process on a server dies without a clear error
- You can reach the box over SSH from your laptop
- You want an explanation before any fix
Not for: Production systems where even read commands need change approval; Handing out root keys you cannot revoke
What do you need, and what do you get?
You need
- Login details for reaching the machine
- A plain description of the symptom
You get
- A stated hypothesis and the evidence checked
- A diagnosis with ranked fixes
- No changes made until you approve
How does it work, step by step?
- Run the agent locallyKeep it on your own machine and let it connect out to the server.
- Describe, do not diagnoseGive the symptom only, so you get an unbiased investigation.
- Approve each remote commandRead every command before it runs, especially as root.
- Ask for evidenceExpect it to check memory, processes, limits and kernel logs and quote what it found.
- Choose the fix yourselfPick from its options, such as adding swap or resizing, and apply it deliberately.
The prompt
Our own prompt, inspired by Flavio Copes and written to work in Custom agent. Values in lime are placeholders.
Connect to my server with: [ssh command]. Problem: [symptom, e.g. a process is killed a few seconds after starting]. Do not change anything. First state your hypothesis and which logs or commands will confirm it. Then check memory, swap, running processes, limits and kernel logs, quoting the relevant lines. End with the likely cause plus a short ranked list of remedies, noting effort and cost. Wait for me to choose before making any change.
Inspired by Flavio Copes: Debugging a process killed on my server with Codex. The prompt above is written by playbooks.bot in our own words; nothing from the original is quoted.
What can go wrong?
- Giving an agent root SSH is powerful; prefer a limited user if diagnosis allows it.
- Fixes like resizing cost money; the agent should propose, not decide.
Our take
Flavio Copes points to the behavior worth demanding from any troubleshooting agent: a hypothesis first, then evidence, then options, with nothing changed along the way. That is how a careful engineer approaches a production box, and you can write it into the prompt explicitly, along with an instruction to stop before making any change. Describing the symptom without your own theory is a subtle but valuable choice, because it avoids steering the agent toward a wrong guess that it will then try to confirm. Running the agent on your laptop and connecting over SSH keeps the struggling server from having to host yet another memory-hungry process, which mattered here since memory was the problem. Approve each remote command rather than granting blanket permission, and prefer read-only commands such as log inspection during diagnosis. When it proposes fixes, like adding swap or limiting memory for a service, choose and apply them yourself, and note what you changed. Set up a simple memory alert afterward so the next out-of-memory kill is noticed before users notice.
Where the time goes back: Log-reading you might not know how to do is handled in minutes, and you still decide the fix.
FAQ
What was the cause?
Did the agent change anything?
Source and credit
Inspired by Flavio Copes. We describe the idea in our own words, link to the original, and wrote the prompt ourselves; nothing is quoted.
- Inspired by
- Debugging a process killed on my server with Codex
- Creator
- Flavio Copes
- Published on
- flaviocopes.com
- Original date
- Sep 15, 2026
- License
- Not openly licensed (the poster keeps all rights), so we quote nothing and link to the original
- Originally for
- Custom agent
- AI dry run
- Oct 23, 2026: passed. Dry-run tested by our AI test agent on sample input. PASS: Gates held on desk check; no live sends or purchases.
AI dry run on sample data; not run with live connected accounts. The playbooks.bot test agent filled the prompt with synthetic inputs, produced the output and checked it against the page's stated outputs and guardrails. - Verified
- Oct 23, 2026: source link resolves to the original, the credited creator published it, our excerpt or prompt matches it, and the license allows our use.
Are you the creator? Claim or correct this page.