Most people use Claude Code the same way they use a chatbot — type a prompt, watch it work, respond to questions, babysit the output.
That's fine for one-off fixes. But it doesn't scale.
Here's the pattern I've been running instead: Claude Code as a background agent you dispatch tasks to, then walk away.
The setup is simple:
1. Invoke Claude Code with --print and --permission-mode bypassPermissions
2. Pass a task description on stdin or as a prompt
3. It runs to completion and exits — no TTY required
4. Pipe the output wherever you need it (Telegram, log file, another agent)
Example command:
claude --print --permission-mode bypassPermissions "Fix the failing test in auth_service.py and commit the result"
That's it. Claude reads the codebase, finds the test, fixes it, commits, and exits. You get a message when it's done.
Where it gets powerful:
• Schedule via cron — "every weekday at 9am, review open GitHub issues and draft fixes"
• Chain agents — one agent researches, another implements, another reviews
• Run multiple in parallel — different tasks on different branches simultaneously
• Trigger on events — new PR opens, run a review agent automatically
The key mindset shift: Claude Code is not a chat interface. It's a programmable worker. Once you stop treating it like a chatbot and start treating it like a subprocess, the whole thing opens up.
What are you currently babysitting that you could delegate to a background agent?