A VPS can keep a Codex process alive overnight. It cannot make every earlier decision remain equally available to the model. Those are different reliability problems: keeping the worker running and keeping its next action grounded in the current task.
We use Codex context compaction as the reason to keep important state outside the conversation. Our approach is a manual repository workflow, not an Office Claws memory feature. The goal is to make a long task recoverable without asking a summary to become an audit log.
Codex context compaction is not a backup
Context management reduces the history carried into subsequent model work. Exact behavior depends on the Codex version, model and execution surface. A compressed representation is not a promise that every command result, rejected approach or exception remains available verbatim.
Cursor's recent token-efficiency article makes context assembly a useful operational topic. Its implementation and reported savings belong to Cursor; they are not Codex benchmarks. For Codex settings, use the official configuration reference, which documents compact_prompt and the experimental experimental_compact_prompt_file. We would not override those defaults before establishing a reproducible failure.
| State | Where we keep it | What it proves |
|---|---|---|
| Task constraints | Reviewed task brief and repository instructions | The intended scope, not enforced permissions |
| Changes | Git branch, commit and working tree | What actually changed |
| Validation | Private, task-specific log files | What ran at a particular revision |
| Handoff | Short checkpoint with evidence paths | Where to verify the next decision |
Compaction is not session recovery, disk backup or a usage-limit reset. A larger configured context window does not create model capacity or additional ChatGPT entitlement. See subscription costs and session recovery for those separate concerns.
Run your first agent in about 3 minutes
Install the Office Claws CLI, connect your Contabo account and Codex subscription, and your agent gets its own VPS and a desk in the office.
curl -fsSL https://officeclaws.com/downloads/install.sh | sh$4.99/mo + your own Contabo VPS · keys stay in your keychain
Write a checkpoint at a meaningful boundary
Before a task changes phase—investigation to editing, or editing to validation—we ask for a small checkpoint. Use one file per task in a private task directory. Keep raw logs outside the repository when they might contain customer data, secrets or proprietary output.
This is an illustrative template, not a Codex configuration file. Replace every placeholder with observed state. Do not record a planned test as completed.
Task: replace the request parser; no deployment or schema changes
Repository: <absolute path>
Branch / HEAD: <branch> / <commit>
Working tree: <changed and untracked paths>
Decision: preserve the existing public error format
Evidence: <test command>, <exit status>, <tested revision>, <private log path>
Unresolved: malformed-header case still fails
Next action: inspect the failing case before editing parser.ts
Stop boundary: request review if the public response format must changeWe keep stable coding conventions in AGENTS.md, not in an ever-growing progress diary. A checkpoint describes one task's current state. It should reference the relevant instruction file rather than copy the entire repository handbook.
The file is still untrusted working material: the agent can write an incorrect checkpoint. Have the next phase check Git and the referenced evidence before acting. Never store credentials or treat a sentence saying “approved” as authorization to deploy.
Reduce noisy input without hiding failures
Repeated full test logs and repository dumps consume context without necessarily improving the next decision. Read relevant ranges, preserve the complete output privately, and bring the failure plus its surrounding evidence into the conversation.
For a repository whose actual test command is npm test, this shell example keeps a private log and preserves the test exit status. Run it from the intended checkout; the command executes project code and needs the usual sandbox and credential restrictions.
umask 077
run_dir=$(mktemp -d "${TMPDIR:-/tmp}/codex-check.XXXXXX")
git rev-parse HEAD > "$run_dir/revision.txt"
git status --short > "$run_dir/worktree.txt"
status=0
npm test > "$run_dir/tests.log" 2>&1 || status=$?
tail -n 60 "$run_dir/tests.log"
printf '\nexit=%s\nlog=%s\n' "$status" "$run_dir/tests.log"
exit "$status"The final 60 lines may omit the real failure. Inspect the saved log when necessary; a short excerpt is a navigation aid, not the complete evidence. The recorded HEAD also does not identify uncommitted content by itself. Preserve the relevant diff or a reviewed checkpoint commit if you need an exact tested snapshot. Temporary files can be cleaned up by the host: move required evidence to approved persistent storage before relying on it overnight.
Verify continuity before continuing unattended
After context reduction, or when starting a fresh session, first check the repository path, branch, HEAD and dirty files against the checkpoint. Read unresolved failures and confirm that referenced logs still exist. If code has changed since validation, the old green test is not evidence for the new tree.
If the agent starts repeating completed work or contradicting a recorded decision, pause the task. Reconstruct the current state from files and logs, then choose whether to continue or start a bounded new task. Do not automatically restart the whole job: publishing, migrations and external messages may already have happened.
For parallel agents, separate worktrees and task directories prevent one worker from overwriting another's checkpoint. Keep sandbox and approval boundaries independent of any summary. Review and deployment remain separate gates.
Office Claws provides desktop/CLI management for Codex agents on your own Contabo VPS, with private Tailscale connectivity. It does not automatically preserve these checkpoints, verify their claims or guarantee uninterrupted model work. Your eligible ChatGPT plan and VPS remain separate costs; usage limits still apply even when the server stays available 24/7.
Our recommendation: start with one VPS runner, record a small checkpoint at each phase boundary, and require a verified diff and fresh tests before review. Durable work is about reconstructing the truth, not keeping an infinitely long conversation.