- Genial
- AI Automation Tutorials
- Make Claude Code Work for Hours
Make Claude Code Work for Hours
Claude Code has one major problem when you want it to work for hours: it keeps coming back to ask you questions, and that gets bothersome fast. In this walkthrough I show you /goal, the command that fixes exactly this, the exact goal I handed it on camera, and the guardrails you need so it does not burn through your tokens.
What you need
- Claude Code, in any of its forms: the terminal, the extension, or the desktop application
- Ideally the $100 to $200 Claude plan, because long autonomous runs consume a lot of usage
- A task that genuinely takes a long time, not a two minute question
1. The problem: it keeps stopping to ask (0:12)
Claude Code has many commands, but the pain point is always the same. You give it a long piece of work, you walk away, and twenty minutes later it is sitting there waiting for your answer to a clarifying question. When you actually want it to work for hours and hours, that back and forth kills the whole point.
2. What /goal does (0:31)
/goal gives Claude Code a specific goal, and it will not stop working until that goal has been achieved. The goal can be anything: cleaning a CRM, running market research, creating an entire application end to end, generating reports, you name it.
With /goal, a session can run for many hours. I am talking one up to four hours when you want to develop a full application. One important note: this is only available in Claude Code. It is not available in Claude Cowork.
3. How to run it (1:07)
Go into your Claude Code application, whether that is the terminal, the extension or the desktop app, and type:
/goal
The prompt tells you exactly what it does: set a goal, and it is going to work until the condition is met. Then you just give it the goal.
4. The exact goal I gave it (1:30)
To show how it works, I handed it a task that would clearly take a couple of hours:
Go into my YouTube inspiration database, check every channel we're tracking, and for each one generate a report based on its latest 100 videos. Then tell me what we should start creating in terms of content.
I hit /goal with that, and it starts browsing through everything it needs, then comes back to me when it is done. I did not show the finished result in the video because this genuinely takes a long time. That is the point.
5. Precise goal plus a clear exit condition (2:01)
You do have to be careful with /goal. Give it very precise instructions and a very precise exit condition. If you do not, you are going to burn through tokens, and a lot of money, very easily and very quickly.
Claude Code does have safety systems built in, so sometimes it will stop on its own to make sure you do not blow away your entire usage. But it is still always good to spell the exit out yourself, with something like:
If you don't manage to do this within twenty tries, you can simply stop and report back to me.
This is also why I recommend using the feature only on the $100 to $200 Claude plan.
6. It also works on Codex, and with subagents (2:25)
The exact same feature is available on Codex, the desktop application for OpenAI's coding agent. It was actually created by the people over at Codex.
You can also combine /goal with other Claude Code features, like custom commands and agents. You can ask Claude Code to use subagents where each subagent has its own goal. That is a very powerful setup, but also a more advanced one, so get comfortable with single goals first.
7. Start small (3:18)
You can develop an entire application end to end with /goal, but that will eat a lot of tokens and a lot of your usage. So start small: check what is inside one of your Excel sheets, go through your local files, arrange some files, have it create a report. Then progressively move up. That way you learn where the limitations of /goal are before you bet a big task on it.
Pitfalls to avoid
- Vague goals. No precise goal and no exit condition means tokens and money burned for nothing.
- Running it on a small plan. This feature is for the $100 to $200 Claude tier; below that it will drain your usage.
- Jumping straight to a full app build. Warm up on files, sheets and reports first.
- Expecting it to run forever. The built in safety systems will sometimes stop it without you asking, which is by design.
Where to go next
Once you are comfortable handing Claude Code a single long goal, the next level is fanning work out to a whole team of agents: Master Claude Code Dynamic Workflows (49 Agents). And if you want the same long running behavior on OpenAI's side, see ChatGPT will die because of this.


