Worktrees let independent code tasks use separate checkouts. They do not merge the results or coordinate every external resource for you.

Shared baseline → Separate checkout → Independent task → Reviewed integration
  1. 1Shared baseline
  2. 2Separate checkout
  3. 3Independent task
  4. 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.

What to do next

Next: Treat background builds as running work, not completed tasks