AI Services Market
AI Services Market › Use cases › Software & DevOps
Software & DevOpsDone with Claude Code Aug 30, 2026

Run a Claude Code refactor unattended

A Claude Code agent ran 40 minutes unattended on a refactor; it worked and tests passed, but the user couldn't tell what it did in between. · Aug 30, 2026

Run a Claude Code refactor unattended preview
What They Did
The post says a Claude Code agent was left alone for about 40 minutes to do a refactor, and when the user returned the refactor worked and tests passed. In the comments, people describe how they handle this in practice: run the agent in a low-privilege account, inspect git diffs afterward, or log tool calls with Claude Code’s PreToolUse/PostToolUse hooks or session JSONL files under ~/.claude/projects to reconstruct what files and commands it touched.
How It Went
The reported outcome was that the refactor succeeded and tests passed, but the user had no clear timeline, diff summary, or visibility into whether it read sensitive files or made outside calls. Commenters said transcripts are poor for auditing, and recommended relying on diffs, permissions, and tool-level logs instead.
Worth Knowing
The clearest catch was visibility: a long unattended run may succeed, but without separate logging or diff review you may not know what happened in between.
Try it yourself with Claude Code

Refactor [module or area of the codebase] to [goal, e.g. split it into smaller functions or remove the deprecated API]. As you work, keep a running log file called PROGRESS.md noting each change you make and why, and run [test command] after each major step. Stop when all tests pass and give me a short summary of the files you touched and anything you weren't sure about.

Read the original ↗