Working while you are away
Can you run Codex 24/7? What keeps a task moving
Compare local schedules with cloud execution, read running/waiting/failed/finished states, and download a manual overnight review checklist before repeating work.
Based on public documentation and selected source code. These workflows have not been tested here on multiple devices. Availability and compatibility can change.
Define what “24/7” should mean
There are three different promises hidden in the phrase run Codex 24/7: being able to open a conversation at any time, keeping an execution host online, and making useful progress without a person replying. A service can deliver one while failing the others. Ask which outcome you need before paying for more compute.
For example, a server can be healthy all night while the agent waits for a decision about a failing test. Conversely, an agent may finish in twenty minutes and correctly stop. Neither situation calls for an infinite loop that keeps sending “continue.”
Remove the laptop dependency
OpenAI documents that Codex Cloud tasks can continue while your computer sleeps. That is one available option for work that fits its environment. A self-managed remote host is another architectural option, but its power, process supervision, access and backups become your responsibility.
A terminal session manager can keep a process attached to a server after a client disconnects; it does not prevent the server from shutting down or restore a process after every crash. Check the cloud vs local guide before choosing where execution should live.
Plan for the stops that uptime cannot fix
- Missing decisions: spell out what the agent may decide and which questions require you. Preserve approvals for consequential actions.
- Unavailable dependencies: test access to the repository, required service and package registry before leaving.
- Usage or billing limits: check the current limits of the account or API you use. A hosting subscription does not remove model limits.
- Failures and retries: give retries a cap and save the final error. Repeatedly running a failed deployment or migration can create additional damage.
- Completion: define a stopping point, such as a reviewable patch and test output. “Keep working forever” cannot be accepted as complete.
For scripted jobs, OpenAI documents non-interactive execution and session continuation. Treat it as a way to build bounded workflows. It is not evidence that every job can run without supervision.
Give an overnight task an acceptance boundary
Investigate the failing pagination test in the selected repository. Make a proposed fix on a separate branch, run the relevant tests, and summarize the changed files. Stop if service access is missing or if the fix needs a product decision. Do not deploy. Leave the failing command and the next question in the conversation.
This example makes the next morning useful even if work stops early. You can inspect a result or answer a specific question. Record the task identifier, execution host and working directory so you can find the right place again.
Check continuity before leaving real work unattended
- Start a small, bounded task and confirm it can run the project’s normal checks.
- Disconnect the viewing device. Reconnect and inspect the task’s last event and working files.
- Check an expected stop, such as a missing test dependency. Verify that the reason is visible.
- Return from another device and confirm you can distinguish running, waiting, failed and finished states.
- Save important changes in source control and keep a way to stop the workload.
These are proposed acceptance checks, not results from a CodexAnywhere deployment. We have not run a multi-device endurance test. If the session stopped, the resume guide explains how to return without assuming that every process survived.
Scheduled checks and one continuous run are different
A recurring check starts or returns to work at selected times; it does not prove that one command ran through the gap. OpenAI’s scheduled-task documentation says local-project tasks need the computer on, the app running and the project available. Keep the execution host and schedule type in your notes.
Cloud tasks can continue while your computer sleeps because execution is remote. That does not establish that a local terminal session, uncommitted files or credentials were copied into the cloud task. Set up and check the intended environment first.
For an ongoing review, a schedule inside the same chat can reuse its context; separate scheduled runs can start new chats. Choose based on the work you want to preserve. Test a bounded prompt manually before scheduling it, then review the first results. This guide does not configure an automation or change your computer’s sleep settings.
Read the last state before repeating anything
| Observed state | Evidence to inspect | Useful next action |
|---|---|---|
| Running | A recent event or a process on the same execution host, with the repository and working directory identified. | Check progress there. Do not start another copy of the same command just because your viewing device disconnected. |
| Waiting for input | A specific unresolved decision or permission request, with the work saved so far. | Resolve that item within your authorized scope. More compute or a shorter schedule does not supply a missing decision. |
| Failed | The failed operation, error and any receipt or remote state that shows whether it partly succeeded. | Check the effect first, then retry only the unresolved operation with a cap. A timeout is not proof that nothing happened. |
| Finished | The requested patch or report and its actual validation output. | Review the result. Start the next bounded objective only when there is one; completion is a normal stopping point. |
Record the last verified action separately from an attempted action. For example, a deployment command timing out calls for checking the existing deployment’s state, not immediately creating a second deployment. This is an operational example, not a claim that we tested your deployment provider.
A small handoff you can check the next morning
- Identify the chat or CLI session, execution host, repository, branch and working directory.
- Write one acceptance condition and the actions the agent may perform. Note the questions it must leave for you.
- Keep a record of the last verified result, current running/waiting/failed/finished state and unresolved effects before a retry.
- Save important changes and an independent readable copy of the conversation. A transcript is not a repository backup or process checkpoint.
- On return, inspect the same host and saved state before resuming. Use the session recovery checklist when you need to find the right saved conversation.
Download the overnight review checklist (Markdown). Fill it in in your own notes; it is a blank manual worksheet, not a monitor, scheduler or automatic recovery tool. It contains no access tokens or executable commands.
The conversation-backup guide explains how to keep a reading copy independent of the provider account. The available local archive and invitation-only macOS backup pilot have different boundaries; neither is advertised here as an unattended Codex execution service.
More Codex guides
Common questions
Can a cloud server give me unlimited Codex usage?
No. Compute availability and model usage are separate. Account limits, billing and the permissions of the chosen integration still apply.
Does reconnecting restart an interrupted command?
Not necessarily. Inspect the task and process state first. A command may have completed, failed or still be running. Repeating a command blindly can duplicate side effects.
Does CodexAnywhere currently provide 24/7 execution?
No. CodexAnywhere provides a local archive for supported exported conversations. It does not provide a 24/7 agent-execution service or validated cross-device execution handoff.
Will a local scheduled task run while my computer sleeps?
A desktop scheduled task that needs local project files depends on the computer being on, the app running and the project still being available. Cloud tasks use a remote environment instead. A recurrence rule alone does not make local execution independent of your machine.
Does backing up a conversation keep its commands running?
No. A conversation backup preserves supported exported text and files for reading. It does not keep a process alive, transfer the repository or prove that unfinished commands can resume on another host. Inspect the execution state separately.