r/ClaudeCode • u/Beneficial_Use2116 • 21m ago
Discussion I wrote a small script that reads your saved Claude Code sessions and shows what your agent actually ran
I wanted to know what Claude Code had really executed on my machine, so I wrote a script (Python standard library only, runs locally, uploads nothing) that reads the saved sessions. It lists risky-looking shell commands (force push, push to main, rm -rf) reads of secret files like .env, edits outside the project, and what your deny rules would have caught.
On my own logs: 513 tool calls, 15 flagged as a push to main or rm -rf and similar. 14 of those 15 ran without a click from me, because an allow rule had approved them. That's what made me tighten my allow rules.
Caveat: it matches on the logged command text, so it will flag some harmless things and miss unusual spellings. Read it as "what to look at", not an audit.git clone https://github.com/tarunagarwal1981/ops-ai && cd ops-ai/agent-flight-recorder && python recorder.py
There's a --demo flag to see a report on made-up history first. What else would you want it to flag?
•
u/AutoModerator 21m ago
Hey! Thanks for posting to r/ClaudeCode
While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.
For help, project discussions, tips, and general chat, join the ClaudeCode Discord.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/Quick_Orchid_1144 10m ago
14 of 15 running without a click isn't a finding, that's your settings.json allow list doing exactly what you configured. Flagging `git push`to main when you've already allowed `git push`is just reading your own config back to you with a red border on it.
1
u/Distinct_Fill621 4m ago
14 of the 15 ran without a click because your allow rules approved them. That's not a leaky sandbox, that's you writing your own permissions and then being surprised by them.