24/7 AI Agentic Coding (Runs Without You)

Claude Code agents run overnight fixing TypeScript errors in a Convex project, checking in every 5-10 minutes without human intervention. A tmux orchestrator manages tasks, spawns sub-agents, and monitors logs. The presenter shares free open-source code to replicate the system, which achieved 67% cost reduction and complete error resolution.
Chapters
So we've spoken about agentic coding before on this channel, but I feel like I need to take another shot at this because this feels like literal magic. And if you can learn how to do this, what I'm going to try and show you in this video, I guarantee it will completely change the way that you look at coding and how you can actually do more in your coding workflows. So I'm going to do my best to kind of explain to you one of the ex— an example of where I actually did this last night. I set up an agent that ran autonomously for multiple hours. I'm talking like 5 hours where it just ran and coded for, for the entire night. And so, yeah, that's what I'm going to be showing you. So you can actually see over here, I'm just scrolling up. And what I want to try and do is I'm going to go line by line and, well, I'm going to try my best to make it engaging, but I want to show you exactly what actually happened over here. So. Looking at this workflow, what I want you to see is actually this part over here. Good progress. You fixed the queue contains errors, but there's still one TypeScript error in convex entities. OAuth possibly null. And this is a prompt that was sent into the Claude code window, but it was not sent by me. It was sent by another agent. And you can kind of see over here that after it was sent, this agent went, perfect. You're right. I need to add a null check to that. and then it started working on that. Then a little bit later we got another message, status check. You said you fixed the errors, but I'm still seeing some TypeScript errors in the dev server. The error is still showing auth context is possibly null at line 740. Can you double check and show that the changes are actually safe? And you can see the engineer went again and starts fixing all of those errors and this just continues. So, you know, I'll keep scrolling here, but like, excellent, the TypeScript errors appear to be resolved. I no longer see the auth context possibly null error. So it is actively going through looking at the errors and then feeding that to the engineer to say, hey, this is still not working correctly. Please, can you make these changes? And you can notice that it's starting to track off this entire phase 1. So I've made a video on this previously, but where this all starts is I actually do a very, very in-depth spec. On exactly like what the agent needs to be working on. So you can see over here, this is a huge, huge spec document. And this is actually only just for the one side of it. But if I scroll through here, it's got all the plans. And then there's sub, sub spec documents where I literally get it to break down exactly what I wanted to do when it's working the entire night. And this is the only reason that it's possible to code this way is because you have to do a lot of upfront work. To set it up with the right information. But once you've done that, once you've actually got all of the specs created, and you reviewed it, and you made sure that it's good, then you can start to take advantage of the system of automation where the agents can run without you. And so continuing over here, you can see the, the next prompt: Outstanding work. Phase 1 was successfully completed. You achieved 67% cost reduction to target and resolved all the TypeScript errors. Now let's discuss phase 2 planning. And keep in mind, while this is happening, I'm, I'm fast asleep. I'm not even, I'm not even thinking about this. And this is, this is basically the future. Like, I mean, imagine you could get all this time back. You don't have to be there to actually oversee the project. You can have an agent that's doing it for you. And you can see, okay, it plans out phase 2. And then the project manager says, approved. Your phase 2 recommendation is excellent. Let's proceed with the search debouncing. and now to fast forward a bit, you know, this just continues for hours and hours. And then if we get all the way to the bottom, you can see over here, uh, we reach this mission accomplished, Convex Automation project completed. We look at the entire, it gives you an entire summary. It gives you everything. And then it even says it's been an honor working on this critical infrastructure project. So let's, now we've seen from the engineer's view, what I'm going to show you next is from the project manager or orchestrator's view. Of this project. So I'm going to just go and open up Tmux over here. If you haven't seen my, my previous video, I go kind of more in depth on Tmux. But if I go to tmux-org, which is where this is actually, where this is located, this is the project manager that's in control and looking at the agents. So this is the project manager view, and this will tell us another side of the story of what actually happened while I was asleep. So you can see over here. The orchestrator is also showing that the final project is complete. But if we scroll all the way up, you can see where this actually started. So what I did is I opened up a new Claude Code session and I actually said like, hey, what's up? I want you to please get started working with an agent in the Source Wave first window. If you type in tmux ls, you can find that window. I'd like you to ask the agent to get started on the spec sheet. I'm going to give you, I'm going to share the specs with you so you can actually make a plan. And I'd like you to please work with the agent and schedule regular check-ins every 5 to 10 minutes to go through and ensure the agent is continuing to work. And then I just dragged in the spec sheet and you can see it said, I'll help you get started with the agent in the SourceWave first window and work on the spec sheet. And you can see it goes and finds the agent and then it reads the spec sheet. Then you can see it says, let's check the current state of the Claude agent. It looks at what has been happening and says, great, I can see the Claude agent is already waiting. Let me create a to-do list and track our work and start communicating with the agent about the convex optimization. So it creates its own to-do list and it sends that to the agent using this script. Then it updates its to-do list and it says, now let me schedule regular check-ins and wait for the agent's response. So it's, it looks and it says, great, the agent is actively working on the specs. Let me schedule the first check-in. It creates its own, yeah, it looks for the window that it's in and then it schedules itself to check in in 5 minutes and it marks it as complete and it provides a summary. So perfect. I've successfully briefed the agent. I've scheduled my own regular check-in and boom. Now you can see over here, the check-in actually happens. And this is the magic is that I've built a bash script where the agent can actually set a time for itself. For a script to run that will essentially just restart the agent and prompt it with this. So time for Orchestrator check, and then it provides, it provides a, you know, an actual like Orchestrator note that it needs to look at, and it just starts working again. So again, looks at the agent, it says excellent, the agent is actively working on phase 1, and then it actually messages the agent like, hey, status update, this is your scheduled 5-minute check-in, please provide a quick update on your progress. And, and then it just keeps going over here. Now what you'll notice is if I just scroll down a little bit, there was a time where I actually said I actually wanted it to also look at the, look at the dev logs because you can see over here at the top I've actually got another tmux window which shows all of the server logs and all of the database logs. So I actually somewhere over here I actually mentioned to it that Hey, this is something that I want you to look at as well. Um, and then it basically just took that and it started giving the agent the TypeScript errors. So now we have this agent that is scheduling check-ins for itself and it's able to speak to the engineer and look at the dev logs, uh, the, the, the server logs and be able to tell the engineer like, hey, this is still not fixed. We need to continue working on this. We need to look at the, the, the, um, the fixes. Right. And basically it just continues with that the whole night. So by the end you can see, uh, yeah, it successfully finished all the TypeScript errors and it keeps on scheduling. And then we say phase 1 complete, and then it keeps on working. Phase 2 approved. And then eventually as we keep going over here, it finished all the phases. And the very last thing that it does is it just mentions, uh, yeah, ChatGPT is completed. And, um, yeah, I could keep going, but I'm sure you get the point. This thing was working without me having to do anything, and it's all because of the system that I set up. So next, what I'm going to show you is how you can get this set up for yourself, because I know that maybe this looks overwhelming. It looks like something that's really difficult to do. The good news is it's not that difficult because I've already done all of the work. I've already created this entire, you know, structure. So the next thing is you're probably wondering how you can get this set up for yourself. And I know it maybe seems like something that's very complicated, but the good news is I've already done all the hard work for you. I've created the entire structure and put it into this free open source GitHub repository where you can actually download this for yourself and set it up on your own Claude code. So what this is, I've called it the orchestrator, and it essentially allows you to run agents 24/7 while you sleep. So here's an example of how it works. You have one main orchestrator that you speak to, and it can spawn out other subagents to continue working. And I've got some examples, just like I showed you in this video, of how it actually works. And then here's also some basic ways for you to get it set up. So everything is included in here, and you can literally just read through and see how this project is working. And Once you've downloaded it, all you'd need to do, if I just go back over here, is if I scroll all the way to the top, I just launched up Claude Code in the repository. And then I just basically started by prompting it what I wanted it to do. So that's really what it comes down to. A lot of the magic is just in a couple of bash scripts and also the Claude MD file, which I've already created. And that pretty much covers it. So again, really think that this is so powerful and I don't see many people talking about this. Another thing that I'll just quickly share, but I probably need to make a second video on it, is the only way for you to make this work is you need to give Claude the ability to, to, to have full access without having to ask you if it needs to use a specific tool or whatever it is. And I see this all the time is that like there's a, there's videos where people are still telling Claude like, okay, yes, you have access to this tool. Yes, you have access to this tool. And to me, it just feels so much. Slower and like, I don't want to do that. So one of the first things when I set up Claude Code is I figured out how to completely remove all those, those permission, permission requests and just give it full access to my system. And, you know, who knows, maybe that, maybe that leads to like some unexpected behavior. But if you follow what I showed in this video with the spec sheets and always making sure to back up your work, always making sure to have like regular Git, then you can really make this something that allows you to get much further in your development very quickly. And I'm excited to show you because I've actually finished a full-blown SaaS just built on this method, and I'm gonna be sharing exactly how I built it in coming videos. So if you like this video, please make sure to subscribe, and I will see you in the next one.










