Worktrees let independent code tasks use separate checkouts. They do not merge the results or coordinate every external resource for you.
- 1Shared baseline
- 2Separate checkout
- 3Independent task
- 4Reviewed integration
Work through the example
Prompt: Keep this screen's changes in its own worktree and report the base commit, diff and tests.
One practical example
Use the prompt above on one small, named part of your app. Before accepting an edit, ask the agent to point to the source or configuration that supports its answer. If it cannot locate that context, resolve the missing input before expanding the task.
In the diagram, each arrow represents a handoff you can inspect. Keep the intermediate result rather than jumping directly to the final claim. For example, a reported finding should retain its location, and an executed check should retain its outcome. This gives the next attempt a concrete starting point and makes a misleading completion message easier to challenge.
Apply it to your project
Prompt: Keep this screen's changes in its own worktree and report the base commit, diff and tests. Then compare the resulting diff with the original request. If it changed a neighboring concern, ask why that change was necessary. Save the result only after the relevant check has run, and record any part that remains unverified.
Use the documented client workflow
For the client-specific setup, consult OpenAI’s worktree documentation. The important integration step is reviewing the finished changes back against the intended base. An isolated checkout does not automatically settle competing edits to shared design tokens.
Evidence and limits
Resolve shared simulator and data-store ownership separately.
This is an educational guide. Its presence in the series does not certify a completed client-specific lab. The series evidence record separates executed checks from exercises and blocked environments.
Inspect the source used in this lesson.
Related reading
- ChatGPT and Codex: plan the app, then verify it locally
Separate a browser planning session from a connected development environment.
What to do next
Next: Treat background builds as running work, not completed tasks