What did your coding agent do?
Open a Claude Code or Codex session log and see every command and tool call it made, sorted by what it could do: deleted, pushed, reached another machine, read a secret, moved money. Then get the rules that make it ask a person next time. The file never leaves this page.
1Your session log
The file is read in this page and nothing is uploaded or stored. Session logs hold everything the agent read, keys included, so there is no share link on purpose.
2What the agent did
Claude Code session: 14 calls from 2026-11-25 09:10 to 2026-11-25 09:36 UTC. This is a made-up example; open your own log to audit it.
- 3 only looked
- 5 changed files
- 2 reached other machines
- 1 could move money
- 3 hard to undo
- 3 risks
- 3 checks
- 2 tips
RiskHard to undo: 3 calls
a force push rewrites the remote's history, kubectl is hard to undo, rm -r deletes whole foldersDeleting, force-pushing, changing cloud resources, running as administrator: none of these can be taken back from the terminal. The log doesn't say whether someone approved each one at a prompt; a rule makes sure someone does.
RiskCould move money: 1 call
mcp__stripe__create_refundCalls that can refund, charge or pay. Money is the place for an amount limit and a person above it.
RiskRead or touched secret files
.envAnything the agent reads goes to the model, and from there into whatever it writes or sends next. A deny rule keeps these files out.
CheckChanged agent settings, hooks or CI
/home/dev/shop/.github/workflows/deploy.yml, /home/dev/.zshrcThese files decide what an agent may do next time, or run on their own: agent settings, instructions, git hooks, CI workflows and shell start-up files. Changes to them deserve a second look.
CheckWrote files outside the project folder
/home/dev/.zshrcThe session started in /home/dev/shop. Files outside it belong to other projects or to your account.
CheckReached other machines: 2 hosts
docs.example-host.com, api.example-host.comEach address can bring untrusted text in and carry data out. Check each one was meant.
TipRefused: 1 call
A person, a rule or a hook said no to these, and the agent did not run them.
TipFailed: 1 call
These ran and failed. A failed command can still have done part of its work.
Make it ask next time
Ask and deny rules for what this session did, never allow: one session is no reason to ask less. Merge them into ~/.claude/settings.json or the project’s .claude/settings.json. The hook sends each question to your phone, so the agent can wait for you away from the desk (set it up).
.claude/settings.json
{
"$schema": "https://json.schemastore.org/claude-code-settings.json",
"hooks": {
"PermissionRequest": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "variantgate hook claude-code",
"timeout": 180
}
]
}
]
},
"permissions": {
"ask": [
"Bash(curl *)",
"Bash(git push)",
"Bash(git push *)",
"Bash(kubectl *)",
"Bash(rm *)",
"WebFetch",
"mcp__stripe__create_refund"
],
"deny": [
"Read(**/.env)",
"Read(**/.env.*)"
]
}
}
The report, for an incident note or a pull request:
Changed filesBash09:14:00failed
npm testChanged filesEdit09:18:00
/home/dev/shop/src/checkout.tsChanged filesBash09:20:00
npm test && git add -A && git commit -m 'Fix checkout total'Reached other machinesWebFetch09:22:00
https://docs.example-host.com/deploysfetches a web page: text from outside comes in, and the address can carry data out
Changed filesEdit09:24:00
/home/dev/shop/.github/workflows/deploy.ymlHard to undoBash09:26:00
git push --force origin maina force push rewrites the remote's history
Reached other machinesBash09:28:00
curl -X POST https://api.example-host.com/v1/deploys -H "Authorization: Bearer $DEPLOY_TOKEN" -d '{"branch":"main"}'curl sends data
Hard to undoBash09:30:00refused
kubectl delete pod -l app=shopkubectl is hard to undo
Could move moneymcp__stripe__create_refund09:32:00
{"amount":4900,"payment_intent":"pi_sample"}"create" in the name changes data.; It is about a refund, so it may move money.
Hard to undoBash09:34:00
rm -rf dist node_modules/.cacherm -r deletes whole folders
Changed filesWrite09:36:00
/home/dev/.zshrc
What the audit points out
It reads the log’s text, so it sees the command an agent ran, not what the command did once it ran. A script run with python or node counts as not sure, and anything the audit doesn’t know is never counted as only looking. For the tools themselves, before a session starts, use the tool risk checker.
| Option | For example | Why it matters |
|---|---|---|
| Hard to undo | For examplerm -r, git push --force, git reset --hard, kubectl delete, terraform, sudo | Why it mattersNone of these can be taken back from the terminal. |
| Could move money | For exampleA refund or payment tool, data sent to a payment API | Why it mattersMoney is the place for an amount limit and a person above it. |
| Secret files | For examplecat .env, Read ~/.ssh/id_ed25519, .aws/credentials | Why it mattersWhat the agent reads goes to the model and can end up in what it writes or sends next. |
| Other machines | For examplecurl, ssh, WebFetch, gh pr create, a script piped from curl into sh | Why it mattersEach address can bring untrusted text in and carry data out. |
| Settings and stray files | For example.github/workflows, .git/hooks, .claude/settings.json, AGENTS.md, ~/.zshrc, files outside the project | Why it mattersThese decide what runs next time, or belong to other projects. |
Get asked before, not after
An audit tells you what happened. With the VariantGate hook, Claude Code, Codex and the other coding agents send each risky call to your inbox, email, Slack or phone, and wait for a yes, with every answer recorded. Free for one person and 100 requests a month, with no card.
Questions
Where are Claude Code's and Codex's session logs?
Claude Code writes one JSON lines file per session to ~/.claude/projects/, in a folder named after the project's path with each / and . turned into -, and the file named after the session id. The newest one is ls -t ~/.claude/projects/*/*.jsonl | head -1. Subagents write their own files to a subagents folder beside it. Codex writes one rollout file per session to ~/.codex/sessions/YEAR/MONTH/DAY/, and the newest is ls -t ~/.codex/sessions/*/*/*/*.jsonl | head -1.
Is my session log uploaded anywhere?
Nothing leaves your browser. The page reads the file with the browser's own file reader and works it out in JavaScript on this page; there is no upload, no share link and nothing is stored. A session log holds everything the agent read, which can include keys and customer data, so keep it off any service you have not checked, this one included: you can confirm it in your browser's network tab.
How does the audit decide what a call did?
It reads every tool call in the log and sorts it by what it did. Shell commands are read word by word: rm, git push, git reset --hard, kubectl, terraform and sudo count as hard to undo; curl, ssh, scp and gh pr as reaching other machines; installs, builds, tests and edits as changing files; ls, cat, grep and git status as only looking. A command it does not know counts as not sure, never as only looking. MCP and framework tools are read by their name, the way the tool risk checker reads them.
Does it show which calls I approved?
Not from the log alone. When the log records a refusal, as Claude Code's does when you reject a call, the audit shows it as refused, but a call that ran does not say whether you approved it at a prompt or a rule let it through. That is the point of the rules it writes: they make sure a person is asked the next time, and with the VariantGate hook the question reaches your phone so a long session doesn't stall while you're away.
What rules does it write?
Only ask and deny rules, never allow. One session is no reason to let the next one do more without asking. For Claude Code it writes permissions.ask for each risky command and tool, permissions.deny for secret files the session read, and the hook that sends questions to VariantGate. For Codex it writes a prefix_rule with decision prompt for each risky command, for ~/.codex/rules/default.rules.
Which logs can it read?
Claude Code transcripts, Codex rollout files (including code mode, where it reads the commands inside the script), and lists of messages in the OpenAI chat, OpenAI Responses or Anthropic format, which covers most agent frameworks' saved conversations. A line cut off mid-write, as in a session still running, is skipped and the rest is read.