ENABLE_BACKGROUND_TASKS allows Claude Code to run long tasks in background
Ian Nuttall (@iannuttall) shared a useful Claude Code pro tip for handling long-running tasks.
Claude Code Pro Tip
Add this line to your .zshrc
or .bashrc
(ask Claude Code to do it for you):
export ENABLE_BACKGROUND_TASKS=1
This allows you to move long-running tasks to the background to keep chatting with Claude Code while tasks execute.
Key Points
- Environment variable enables background task execution in Claude Code
- Keeps the chat interface responsive during long operations
- Can be added to shell configuration files automatically by Claude Code
- Improves workflow efficiency for developers