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. ·
Done withClaude Code
- 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.
Want help getting this working? Join the Vibe Coding Academy ↗ Run by Alex Finn, who also runs this site.
Source: Reddit · Aug 30, 2026
Related use cases
Turn tickets into merged pull requests
Pulls tasks from GitHub Issues or Linear, then runs Claude Code or Codex in isolated Kubernetes pods to carry each one through to a PR.
Turn newsletters into branded LinkedIn carousels
A newsletter writer built a Claude Code skill that converts a newsletter URL or text into 5-10 slide HTML/CSS carousels in under 5 minutes.
Migrate WordPress posts to MDX
Claude Code pulled posts from the WordPress REST API and converted them to MDX with frontmatter, migrating 367 posts and 5 pages in one session.
Build a C compiler with a team of parallel agents
Anthropic's engineering write-up on tasking Opus 4.6 agent teams with building a C compiler.
Build and deploy an app over a weekend
The author had Devin build and deploy an app, finding it quick on PR feedback but weak on legacy monorepos and costly on broad requests.
Have Copilot coding agent write and push code
A developer found the agent good at context and code, but it pushed to a branch leaving main empty and spent hours checking after being told to proceed.
Get 5 like this every morning
The best things people got an AI agent to do, each with the prompt to try it.