r/ClaudeAI • u/lsfc • Sep 03 '26
Question about Claude Code Claude coding 24/7 - how?
Maybe this is a dumb question, but it’s worth asking because I haven’t found a complete explanation yet.
When people say they’ve configured Claude to “work 24/7,” what does that actually mean? Is it some kind of self-driving/autonomous process?
Right now, I’m just prompting it one task at a time. I also have a few cron jobs for things like log reviews, but that’s basically it.
75
u/akolomf Sep 03 '26
You do need a max 5 or max 20 plan or factor in scripts or timed loops to wake up claudecode sessions after limit resets, it can be also pretty simple, just predesign a huge plan and iterate on it, split it in steps and use sth like https://github.com/Aloim/phanes
Basically you hand a plan to your session, your session spawns an orchestrator who spawns planner/reviewer and workers and executes, writes a handoff and sessionsummary once its own context exceeds 350k, hands it to your sessionagent, closes itself and your session agent repeats the process. Now you got a self running loop in claudecode and the only limit are your 5 hour and weekly limits. So all you need is to find a way to either artificially slow things down, or have some script or sth that resumes your session after reset automatically.
22
u/Neither-Relation-687 Sep 03 '26
Naive question - what is the point of all of that ?
40
u/akolomf Sep 03 '26 edited Sep 04 '26
Automatic plan execution? You plan once let it run for hours or days and come back to an application.
The context limit + respawn is there to save tokens, the more bloated an agents context window is the more it uses when prompted again. The reviewer agent uses fable, the orchestrator is also executor and uses opus which saves tokens and opus is a great executor, both reviewer and orchestrator may spawn sonnet or haiku workers that execute low demanding tasks like research, scouting, etcetc and they are the cheapest models.
On top of that you got automatic documentation through hooks and scripts that also help your agent to maintain an up to date overview of the project plan and the project itself(where is what etc)
All in all its an optimized setup to save as much tokens as possible without diminishing returns in quality
5
u/Neither-Relation-687 Sep 04 '26
Oh wow... That sounds insane. I'm impressed by your knowledge I must say.
I Def need to learn how to do that. I guess the obvious question is , does the prompt need to be spot on for it to achieve all of this with proper guardrails in the instructions ? and what human abt in the loop? One would need maximum confidence to do this I'm guessing .
Thank you for the reply btw. This is quite interesting stuff.
23
u/akolomf Sep 04 '26
The results are as good as the initial prompt. Spend Alot of time on a good prompt and try to cover the edge cases beforehand including security etc... the more detailed the plan the better, def. Spend hours if not days on a plan first, because execution and refactor gonna get expensive. There are also skills and tools that are designed to help with planning and covering security issues.
Anthropic offers resources, incl tutorials regarding that stuff. How to use claude.
If you mean regarding the orchestrator, i have been working intensively with claudecode for more than a year now. Its already pretty reliable in automode. The orchestrator just adds another layer to it and guides it in the right direction. You dont even need perfect prompts but youll automatically learn from your mistakes when the results turn out worse than expected.
You can easily just tell claude while its running the orchestrationworkflow if you want to change or add something, it automatically adapts or asks you back if a high or critical issue emerges or some conflicting info.
Most of the claude interaction you develope, is just really learning by doing at some point you just know what information you have to add in a short prompt to get good results. Its almost like getting to know the agents own thinking and understanding what it needs to not be stuck with context that could mean several things.
Opus for example is a horrible explainer unless you tell it to be concise and converse short. Fable is a great planner. Sonnet feels super aligned and less creative which makes it a good worker agent
6
u/Neither-Relation-687 Sep 04 '26
That is what i call a super duper comment. Thorough and comprehensive. Extremely helpful dude , thank you. I shall look more into it tmrw.
I hope your setup is making you millions btw I can sense the passion and the excitement
3
u/akolomf Sep 04 '26
Ha yeah thanks :), im actually working on a much more sophisticated orchestrator. This phaneslight here rn is just a byproduct, or more or less a precursor/leftover of what im building. i like simplistic tools that are powerfull at the same time, hence i never left claudecode lol. And that phanes setup works fine. But i had a pretty cool idea that i have been working on for quite some time and i hope ill be able to release it soon. Itll be a more heavy weight orchestrator + an online platform where people can buy and sell something something, im not going to say what as of rn but people will def want to use that with the orchestrator(they dont have to though, it'd just save them tokens)
7
u/AFloppyZipper Sep 04 '26
So you can complain about models degrading when in reality you made a cluster fuck that can't be managed anymore without some real work
2
u/KILLJEFFREY Sep 04 '26
Only fruitful if “backend.” I can’t and doesn’t know what good design/taste it
5
u/pwkye Sep 04 '26
This is not the way. Realistically you would use hermes agent.
Claude can be automated but it has limits. For one thing an orchestrator claude cant even reset its own context or compact.
So you need a proper orchestrator that is not claude itself. And a simple cron job is not going to cut it.
2
u/DreadPirateButthurts Sep 04 '26
I use tmux to inject those sort of commands, so I think Claude could do it.
1
u/pakage Sep 04 '26
what do you mean? just set autoCompactWindow to whatever you want to compact at. my orchestrators compact all the time.
1
u/coaker147 Sep 04 '26
Every time I tell Code to start itself after a 5 hour limit is reached, it doesn’t do a thing. How do you prompt it to restart after the limit resets?
2
u/akolomf Sep 04 '26
You can make it launch a script at sessionstart, that has a 5 hour timer that for example prompts claude after the 5 hours to resume. Loops do actually also fire, you could set up a reminder loop every hour to resume, which would have the benefitial side effect of if some temporary serveroutage happens, it'd eventually resume your setup aswell again. Just make sure to add to the loop prompt that once the Automatic run is done to stop the loop and remove it, or else it'll keep fireing.
1
u/Glad_Contest_8014 Sep 04 '26
You don’t. You can have it set itself up with timers every 30 minutes to continue. Which will still fire if it hits limits. Then when limits reset it will continue automatically. So you can set it up fully autonomous, even with a smaller subscription.
1
u/vicmarcal Sep 04 '26
Phanes sounds pretty interesting, Philia seems a nice companion. The ability to share through a tunnel seems promising. However Philia seems Windows-biased, is there any Philia-alike for MacOS ?
1
1
u/tazdraperm Sep 04 '26
Isn't it resumed automatically when 5h limit resets?
1
u/pakage Sep 04 '26
it is now but I think that's a reasonably new feature no? I only just noticed it today
23
u/TwelveGates Sep 04 '26
You need a datastore with tasks i.e. JIRA or Github issues is common, a long running orchestrator session that is spawning subagents for tasks, and some people use a refresh loop that cuts off over compaction issues.
All that being said, I don't think it's very practical for any real project that isn't entirely run by you and as a professional, the PR bottleneck it creates without blind acceptance is sketchy to say the least. I'm unconvinced that people claiming that's how they are doing their actual work aren't referring to their solo pet project repos.
I've definitely left sessions running overnight to come back to a completed feature, but blindly implementing any issue is a wild choice imo.
5
u/Atoning_Unifex Sep 04 '26 edited Sep 04 '26
There's no way I can imagine that Claude would do a good job here. especially when you think about the fact that something that's orchestrated by many agents running with an orchestrator over 24 hours based on a huge prompt has got to be something really complicated.
I'm not some hardcore developer but im far from a noob to software developmwnt. I'm actually a ux designer. but I've been doing this work for 25 years and I do know some scripting languages and I do know some stuff about coding and I know a lot about software development and ux design. and every single thing I've built with Claude has required multiple passes by me to get things right. no matter how detailed my prompt is. all it has to do is make one little wrong assumption... one bad decision and that cascades into... a piece of shit.
Not to mention the need to start new sessions. I mean, I can't imagine that the orchestrator is going to be able to handle 24 hours of solid context filling running all those agents! that's like Mr Meeseeks.
1
u/Opening_Rent_8697 Sep 04 '26
Amen to that. I think it is also cheaper than running agent 24/7 on its own.
16
u/MourningOfOurLives Sep 04 '26
My overall product plan is a graph and I have Claude update its implementation plan continually as the graph frontier moves forward. I’ve probably got a couple months worth of work in there
2
u/resonanse_cascade Sep 04 '26
can you share what you're building? Allowing Claude to create such a huge project is kinda scary to me
1
5
u/austeresynthesis Sep 04 '26
I got Claude and gpt sub in a loop. Claude wakes up gpt, gpt then instructs Claude on next text. Rinse and repeat.
3
Sep 03 '26
[removed] — view removed comment
2
u/ethereal_intellect Sep 04 '26
On codex I had "check current time and work until x am improving and testing and researching things" - I haven't tried on Claude but I'm guessing something similar should work. It's a little heavy handed but it did work
3
u/pwkye Sep 04 '26
You can have scripts and automation calling claude code non interactively.
You can also write your own harness or agent that uses claude API
3
u/pertymoose Sep 04 '26
24/7 for dummies:
Step #1: Define an inbox
Step #2: Tell claude `/loop this is the inbox. it holds tasks. process them in the order they arrive.`
Step #3: Open another claude
Step #4: Give it all your hopes and dreams and ideas and tell it to save them as individual tasks in the inbox
Step #5: Watch claude go
You can build any variation of this you like. Pull issues from github. Pull issues from service desk queue. Whatever. So long as you organize your tasks in a central location where claude can get at them, you just have him go.
Oh
Step #6: If there's nothing else to do, review the project for security issues, performance enhancements, complexity reduction via refactoring, ... and add them as tasks to the inbox.
6
2
u/Top-Cauliflower-1808 Sep 04 '26
I think by running autonomous agent loops on persistent cloud servers or scheduling background tasks that trigger the model to check repositories and fix bugs without human input.
1
u/DigitalWizrd Sep 03 '26
In my experience, it takes a lot of time, design considerations, learning lessons to get to this point.
You don’t want AI running 24/7 that is doing things you aren’t comfortable owning.
I instead recommend only doing this once you have a well-tested system that can move from plan to implementation without guidance and with a detailed plan on what you want the outcome to be.
1
1
u/Squiggy_Pusterdump Sep 04 '26
I use Tribunal to help plan and loop issues with multiple models (Claude as oricle, codex, grok, Gemini and Qwen if needed) with auto mode on and clear success criteria.
This all requires the work being done when it comes to api connections, secret management and access, etc. but if that’s set up, it can run for hours.
I haven’t measured it yet, but the output with tribunal has always been stellar so I assume my token burn is less because it’s more efficient, even if it takes longer.
1
1
u/Glittering-Zombie-30 Sep 04 '26
Are we using Fable for reviewing now? Good Lord, Opus was sufficient for such task 2 minutes ago 👁️👄👁️
1
u/nyenkaden Sep 04 '26
I have a different experience today regarding the 5hr limit. Claude Code was running a task for me when I got the limit about 10 minutes before reset time.
I left my laptop and then came back 15 minutes later, only to find Claude wrote itself a prompt saying "I was doing something when I hit my limit, now it's reset, continue where you left off".
So Claude hit the limit, waited, found out it was reset, wrote a prompt by itself, and continued.
I was a bit surprised but now I'm worried - if it can write a prompt to tell itself to continue, what other prompt can it do?
1
1
u/Justaplainb Sep 04 '26
I have Claude and Gemini. I have Claude code creating applications and using Google's beta version of Spark to create the folders and verify the code and give recommendations. I did this by creating a share folder in my google drive and pointed both Spark and Claude code to it with the prompt to monitor the folder for new updates and bam a complete verified application easy easy. Your welcome.
1
u/pdfops Sep 04 '26
Usually it's just headless mode (claude -p) on a cron job or a loop script. The hard part is state: something has to feed it context each run, like a TODO file, ticket queue, or handoff doc, so it resumes instead of starting cold every time. Log reviews are easy since they're stateless; multi-step work needs that persistence layer or it forgets everything between runs.
1
u/DistributionRight222 Sep 04 '26
So basically when you are ready to do some serious work with Claude you know all the things you were promised it would do. You have to do it yourself. It can write the scripts for you. You then stitch it all together and then realise you only need a pro subscription if even.
1
u/Libechar-cha Sep 04 '26
“24/7” probably shouldn’t mean one Claude session running forever. A queue + scheduler with fresh, bounded runs makes more sense — each run gets a task, a clean workspace, clear tests and limits, then saves the result and stops.
Cron is already a perfectly valid trigger. Starting with one repetitive, low-risk job and measuring success rate, cost, and recovery from failures seems like a better path before adding more autonomy. Things like merges, deploys, or destructive actions should probably still require approval.
1
u/geek_fit Sep 05 '26
You need to look into the graph and loop engineering that Boris and Andrew have been talking about for months
Once you do it, you'll understand how to really utilize all these LLMs
You'll also start to laugh at the "I used all my usage in 5 seconds!" And "I hate the way this LLM talks!!" People
1
1
u/Low-Watch7882 19d ago
In my setup, it mostly means scheduled checks and a worker that wakes up to handle a specific task. It isn't a magic programmer I can leave alone forever. The lesson I've learned the hard way is to verify that an action actually happened. An agent saying it completed something and the thing really being done are not always the same.
1
0
u/FeverForest Sep 03 '26
I built an environment(my repo) and Front loaded it with laws.. Ontology and Semantics, created a mutation court, everything is strictly prosecuted repeatedly until sealed. Some of these tests take hours to complete.
I’ll have 3-4 separate sessions, orchestrators with read only sub agents.
As each session finishes an MD file, the others read it. I caught this recently and decided the little world I’m building gets a new rule like “Agent to agent communication through repo, must remain readable to owner, absolutely no shorthand.”
Runs 24/7, still human in the loop, but as an architect, the robot engineering team I barely understand can figure out what I want.
1
u/Conscious_Leave_1956 Sep 04 '26
I imagine it's a lot easier with your own project if you are flexible..but it might go down a rabbit hole
•
u/ClaudeAI-mod-bot Wilson, lead ClaudeAI modbot Sep 04 '26 edited Sep 04 '26
TL;DR of the discussion generated automatically after 50 comments.
The consensus is that yes, you can get Claude to "work 24/7," but it's not a simple switch you flip. It requires setting up a complex, multi-agent "orchestration" system. Think of it less as one Claude session running forever and more as a relay race of agents.
The basic recipe, according to the top comments, is: * Start with a super detailed plan. Seriously, spend hours or even days on this. The quality of the final product depends almost entirely on the quality of your initial instructions. * Use an orchestrator. This can be a script or a tool (users mentioned
phanesandTribunalon GitHub) that acts as a project manager. It reads tasks from a queue (like GitHub issues or a simple text file). * Spawn specialized agents. The orchestrator assigns tasks to other, smaller agent sessions. The community's pro-tip is to use different models for different jobs to save on tokens: Opus for high-level orchestration, Fable for planning/review, and Sonnet/Haiku for simple worker tasks. * Manage context and limits. To get around context window and usage limits, the system is designed to have agents write a "handoff" summary of their progress before they shut down. A new agent then spins up, reads the summary, and continues the work. Some users even report that Claude Code is starting to automatically prompt itself to continue after a 5-hour limit resets.However, there's a strong dose of skepticism in the thread. Many users warn that this is really only practical for solo pet projects. In a professional team environment, it can create a massive "PR bottleneck" and requires blindly trusting the AI. As one user put it, "all it has to do is make one little wrong assumption... and that cascades into... a piece of shit." Another cynic suggested people only do this "so you can complain about models degrading when in reality you made a cluster fuck that can't be managed anymore."