Replaying 153 Claude Code & Codex Sessions for Production Blast Radius (and Catching 247 Root SSH Calls)
An ops engineer on r/devops asked today how to explain to teammates why giving an LLM agent root access to production is dangerous when "they built their own wrapper around it and log what it does." Logging what an agen
An ops engineer on r/devops asked today how to explain to teammates why giving an LLM agent root access to production is dangerous when "they built their own wrapper around it and log what it does."
Logging what an agent executes is post-mortem detection, not containment. When an agent holds an unrestricted ssh root@host shell just to run journalctl or systemctl is-active, there is zero technical boundary between a read-only check and systemctl stop, rm -rf, or DROP TABLE over that same socket.
To see what my own local coding agents had actually executed over the past month, I built agentblast (npx agentblast, github.com/princejain756/agentblast) and ran it across all 153 local sessions on my workstation (126 Claude Code sessions in ~/.claude/projects and 27 Codex CLI sessions in ~/.codex/sessions, 1,122 deduplicated shell commands).
What 153 Real Sessions Revealed
AGENTBLAST v0.1.0 Β· Agent Production Blast-Radius & Permission Auditor
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Target : ~/.claude (126 sessions) + ~/.codex (27 sessions)
Shell Replay : 1122 deduplicated commands (1124 raw JSONL rows)
Safety Score : 0/100 (Grade F) Β· Blast-Radius Index: 100/100
Root/Remote SSH : 247 calls (241 read-only probes, 6 remote mutations)
-
247
ssh root@<REDACTED_IP>calls (ABL007):241of those247calls (97.6%) were strictly read-only inspection commands (ls -la,tail -n 40,systemctl is-active), while6performed remote state mutations (systemctl restart,POSTwebhooks). Because the agent usedroot@instead of a restricted read-only SSH principal, every single one of those241log checks carried full root blast radius. -
2 plaintext API tokens in
~/.claude/settings.json(ABL001) + 0permissions.denyrules (ABL003): BothANTHROPIC_API_KEYandANTHROPIC_AUTH_TOKENwere stored in plaintext inside theenvblock ofsettings.json, andpermissions.denywas completely empty. -
41 auto-trusted project roots in
~/.codex/config.toml(ABL006) + file credential store (ABL005): Over weeks of opening folders,~/.codex/config.tomlhad accumulated41[projects."..."].trust_level = "trusted"entries across external drives alongsidecli_auth_credentials_store = "file". - 25 shell commands touching
.envor service credentials (ABL010), 12 daemon commands (ABL012), and 10 agent-config reads (ABL013).
Two Mistakes in My First Pass
My first prototype had two bugs that showed up immediately on real data:
-
False-positive panic on
/tmprm -rf: My initial regex flagged everyrm -rfasCRITICAL. Across1,122commands, my agents had runrm -rftwice:rm -rf /tmp/quantiti-headandcd /tmp && rm -rf obskill. Flagging ephemeral/tmpscratch cleanup as a critical incident trains developers to ignore the tool.agentblastnow inspects target paths and precedingcd /tmpstatements, separating non-/tmprecursive deletions (ABL008,CRITICAL) from/tmp/$TMPDIRscratch cleanups (ABL014,LOW). -
Leaking production IPs and token prefixes in audit output: Printing raw evidence lines from
~/.claude/settings.jsonand~/.claude/projects/**/*.jsonlexposed real server IPv4 addresses and API key prefixes in terminal screenshots.agentblastnow runsredactSensitive()by default, masking public IPv4s as<REDACTED_IP>, API tokens assk-<REDACTED>, and Base64 hook payloads as<REDACTED_B64>.
Try It Locally
# Audit your local ~/.claude and ~/.codex configs + session transcripts
npx agentblast
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.