How to run background agents with Claude Code — fire and forget long tasks

Dev.to AI
Generative AI

How to run background agents with Claude Code - fire and forget long tasks One of the most underused patterns in Claude Code is running background agents for long-running tasks. Instead of blocking your session waiting for a 200-file scan or a full test suite, you can fire the task and keep working. This is the pattern I use daily. Here's exactly how it works. The problem: blocking sessions Typical Claude Code session looks like this: You: Scan all 347 files for deprecated API calls Claude: [working.