Static reading edition · s08-04
Experiment with branches, forks and small checks
Compare two implementation approaches without confusing their conversations, checkouts or evidence.
Understand the approach
A useful experiment has a question, a baseline and a decision criterion. “Try another approach” is incomplete unless you know what to compare. In Orbit Notes, compare two implementations of searchNotes in notes.cjs against the same uppercase, whitespace, substring and object-preservation checks. One approach can filter the original objects; another can copy and lowercase every returned note. Both may appear to solve search, yet only one preserves the stated identity contract. The method should produce evidence that helps choose, not merely two different summaries.
A Codex chat fork preserves a conversation branch. A Git branch or worktree separates repository work in a different way. Current CLI documentation supports managed worktrees for suitable new or forked local tasks, but a chat fork in the same checkout can still affect the same files. Before parallel implementation, identify which checkout each task edits. Read-only exploration can share a project more easily than simultaneous edits.
Keep the experiment small enough to inspect and reverse. Save a baseline, give both candidates the same input and run the same relevant checks. Do not merge both solutions merely because both produced plausible summaries. Decide using behavior, simplicity and maintenance implications. A passing test is useful evidence, but the final result still needs a human-readable diff and an explanation of what the test does not cover.
Compare isolated experiments against one baseline
Two candidates start from the same baseline and remain separate. Their checks are compared before choosing one. An unsuccessful candidate is discarded without replacing unrelated work.
A comparison whose losing candidate is plausible
Both supplied implementations normalize the query and match n1/n3. Candidate A filters the original objects; candidate B maps them to new objects with lowercased titles. Running the unchanged checks in two fresh directories gives A six passes, B five passes and one identity failure. Inspect the actual query text too: B alters the displayed titles.
This distinguishes search matching from the preservation contract. A chat fork branches conversation; the two actual temporary directory paths establish file isolation here. Keep the losing result as evidence, then choose the simpler contract-preserving implementation.
Prefer sequential experiments when isolation is unclear
Parallel work is an option, not a prerequisite. If the client cannot establish separate checkouts or the task is tiny, test candidate A, preserve its diff, restore the verified baseline and test candidate B. Record the sequence and keep the evidence. This often gives a beginner a clearer comparison than coordinating several active agents with uncertain file ownership.
About your environment
Checked 21 October 2026. Feature availability varies by client and host.
Try it step by step
- Write one comparison question and an acceptance example before creating another chat or checkout.
- Preserve the baseline and decide whether the candidates need separate working directories to avoid file conflicts.
- Ask for two bounded approaches, recording the checkout and changed files for each candidate.
- Run the same checks, inspect the diffs and keep one result through an explicit, reviewable integration step.
A useful starting example
Illustration · adapt before use.
Compare two small approaches to searchNotes in the disposable Orbit Notes lab. Read README.md, AGENTS.md and checks.cjs; reproduce the baseline with node --test checks.cjs. Keep edits in separate verified copies, or compare plans read-only if isolation is unavailable. Evaluate both with the unchanged six checks and node cli.cjs " REVIEW ". Preserve source data, tests and unrelated work. Recommend one implementation with file evidence; do not merge or publish automatically.Compare implementations against the same contract
These candidate mechanisms are compared with the supplied identity/order checks; use separate copies or sequential baselines.
function candidateA(notes, query) {
const needle = query.trim().toLowerCase();
return notes.filter(note => note.title.toLowerCase().includes(needle));
}
function candidateB(notes, query) {
const needle = query.trim().toLowerCase();
return notes.map(note => ({ ...note, title: note.title.toLowerCase() }))
.filter(note => note.title.includes(needle));
}Both candidates match the same two note IDs for " REVIEW ".
Candidate A returns the original note objects in order.
Candidate B creates new objects and changes their title text, violating the preservation contract.These are complete comparison functions, not two unexplained fragments. Search IDs alone cannot choose correctly: the supplied identity check rejects the cloned objects. Evaluate the implementation copied into notes.cjs against the same six unchanged checks.
Your turn
Create two separate Orbit Notes practice copies from the same supplied starter. Compare a query-normalizing filter that returns original note objects with a copy-and-normalize approach. Run the same six checks in both directories and record their actual paths. Choose the implementation using search behavior, input identity and order, then inspect its diff. If you cannot run code, compare two README outlines in separate files and explicitly mark behavior checks unrun.
Try the exercise before opening its reference answer. Use a disposable practice folder.
Orbit Notes project and recovery capstone
Extract into a new practice folder and keep the included labs folder. Run these commands from that extraction root, or from the course folder, using an existing Node.js installation.
- Command 1 text
node labs/project-workflow/create-workspace.cjsCheck: Returns a new owned temporary path. Open that exact copy in the app; the shipped starter stays broken.
- Command 2 text
node labs/project-workflow/verify-depth.cjsCheck: Runs two candidate implementations and recovery counterexamples in fresh copies. Reports paths, facts and preservation; live skill/instruction discovery remains a separate observation.
Follow this lesson’s specific walkthrough and compare its result with the answer key. Commands are relative to the course folder. The offline demonstration never claims a live Codex client loaded instructions, selected a skill or retrieved a connected record.
Check your result
- Both candidates begin from the same verified baseline and are judged against the same task requirements.
- You can identify each candidate’s conversation and actual filesystem location without assuming they are the same thing.
- The selected result has an inspected diff, comparable checks and a clear reason for the decision.
Reference answer & rubric Try the exercise before opening
Use the same data and checks, then select the candidate that satisfies normalization and preservation.
- Record the baseline copy and the same padded uppercase query for both candidates.
- Keep candidate edits separate, either in distinct copies or sequentially from the baseline.
- Run all supplied checks, including input identity and order.
- Compare the actual result with the lesson-specific answer key; record unrun client observations separately from executed local checks.
Check your understanding
When does a chat fork guarantee independent file edits?
- Whenever the conversation has a new name.
- Only when the work is actually separated into an appropriate checkout or workflow.
- Whenever the agent says the approaches are different.
Reveal the answer and explanation
Answer 2: Only when the work is actually separated into an appropriate checkout or workflow.
Separate transcript IDs do not isolate a shared directory. Verify the actual filesystem boundary.
Take this quiz in the interactive lesson to save your answer in the browser.
When it does not work
Each candidate passes a different set of tests.
Likely cause: The comparison changed its criteria mid-experiment.
What to try: Use the unchanged supplied checks for both.
Two forks overwrite each other.
Likely cause: Separate chats edited the same directory.
What to try: Use separate copies/worktrees or run the experiment sequentially.
Common mistakes
- Forking two chats into the same checkout and assuming their concurrent edits are isolated.
- Changing the evaluation cases for the preferred candidate and calling the comparison fair.
Source mapping & differences · alternative
The source’s save/rewind/try-again pattern is preserved through explicit baselines and isolated or sequential Codex experiments rather than automatic rewind snapshots.
Source topic: Workflow patterns ↗Go to the source
Official documentation, checked 21 October 2026. Product names, controls and availability may vary with your version, platform or account.
Completion and quiz progress are saved
only in the interactive course.