A separate checkout is not a separate trust boundary
A Git worktree isolates working files for another task but still runs on its host; it is not a security sandbox or an automatic cloud copy. A hosted Codex task uses a configured repository environment with its own setup. Verify environment details rather than inferring them from the interface.
Before you start
Know whether the project is a Git repository and whether there are uncommitted changes. Identify required local services, credentials, and generated files. Do not assume any environment automatically contains another checkout’s uncommitted work.
Example: a label fix while another task edits the homepage
Direct local work is simple when only one worker is changing files. A worktree can keep a separate label patch from colliding with the homepage checkout. A cloud task may be useful for a configured repository, but a local preview service or uncommitted stylesheet will not become available merely because you ask for it.
- Local check: confirm the current directory and preserve pending edits.
- Worktree check: confirm starting revision and changed-file list before and after work.
- Hosted check: confirm dependency setup, available repository state, and how the returned diff will be reviewed.
Work through the task
- List the task’s required files and services. Choose the environment that actually contains or can safely provision them.
- Record the starting revision or state and the verification command for that environment.
- Give the task a narrow file boundary even when using a separate checkout.
- Review the resulting diff before integration. Resolve conflicts deliberately and retain the task’s evidence before any cleanup.
What a useful result looks like
A useful environment choice includes a concrete transfer plan: which patch returns, where it will be reviewed, and which checks must be rerun after integration. File isolation reduces collisions but does not prove a patch is correct.
When to stop or change direction
Stop if the task depends on unavailable local state, setup asks for excessive secrets, or the worker is about to discard a checkout containing unreviewed changes. Ask for a safe handoff rather than deleting evidence to tidy the workspace.
Verify before continuing
- Did the worker begin from the intended state?
- Are environment-specific limitations disclosed?
- Will the integrated result be tested again in its destination checkout?
QUESTIONS THIS ANSWERS
Questions this answers
- Is a Git worktree a security sandbox?
- How do local and cloud Codex environments differ?
Found something wrong? Report an error or read the corrections policy.
2 SOURCESEvidence ledger
Sources
- 01Worktrees ↗
OpenAI · accessed 4 Sept 2026
- 02Codex cloud ↗
OpenAI · accessed 4 Sept 2026