Planning and resuming investigations
Choose a decomposition strategy and recover the right context when work resumes.
Investigate a delayed shipment report
A repository generates a daily dispatch report. Some shipments appear late after a timezone change. The initial request names a symptom but leaves the responsible component open.
1.6 · Let dependencies determine the work order
Begin an open-ended investigation by mapping ingestion, storage, and display. Trace one failing example across those boundaries. If storage already holds the wrong date, prioritize the writer and its tests. If storage is correct, investigate the formatter. Revise the plan after each observation. A fixed list that always visits every component wastes work and can miss a newly discovered dependency.
A predictable release review benefits from a different structure. Review each changed file for its local assumptions, then compare the writer’s timestamp format with the reader’s parser in a separate integration pass. A file can be correct in isolation and still break its caller. The integration pass needs both interfaces and the local findings.
Choose the dependency that controls the next step
One team reviews a fixed three-file change for a common date format. Another team must discover why a shipment is classified late on Sundays. Both propose a three-stage script that always checks the parser, renderer, then database. Which parts justify a fixed sequence?
Compare the two plans
For the known review, inspect each file locally against the same date contract, then run an integration pass from producer to consumer. A parser emitting UTC and a renderer assuming local time can each look reasonable in isolation. The final pass must follow the value across that boundary.
For the incident, first map where “late” is computed and collect one failing Sunday record. If the stored instant is correct but the printed date changes, investigate conversion at the renderer. If the instant was already wrong on ingest, follow that branch. Rank subsequent tasks by evidence and stop when the fix passes a reproduction plus an adjacent nonfailing case.
Video background · freeCodeCamp at 5:47:27 · Sequential prompt chains
1.7 · Resume, fork, or rebuild the context
Name the investigation and resume it with claude --resume dispatch-report when its observations still apply. Identify files that changed while the session was paused and reread them. If an extensive rewrite invalidated most file reads, begin a fresh session with a short verified summary, revision ID, outstanding questions, and instructions to inspect the new sources.
To compare two proposed fixes, fork from the same checkpoint before either branch changes its assumptions. SDK session forking (called fork_session in Python) creates independent conversation histories. It does not isolate edits to a shared working directory. Separate the workspaces if both experiments write files.
Resume yesterday’s case after the code moved
An investigation named cutoff established that the parser and scheduler use UTC. Overnight a colleague changed only the parser. Two reviewers want to compare alternative fixes against the same starting evidence. Which state must be refreshed before they branch?
Pick a recovery path
Resume the named conversation with --resume cutoff, identify the new commit and changed path, and recheck the parser and its contract with the scheduler. Record which findings remain valid at the new revision. Fork from that verified baseline for independent alternatives. Use separate working copies if branches will change files, since conversation forks can still point at the same checkout.
If the parser, scheduler and fixtures were all replaced, starting fresh with a short record of the symptom, expected behavior and source revisions is often cheaper than repairing old tool results. A restored conversation can remember what was observed without proving it is still true.
Video background · freeCodeCamp at 6:47:56 · Forking from a shared conversation
Checkpoint exercise
Record one confirmed fact, its source revision, an untested hypothesis, and the next discriminating test. After a branch switch, verify the revision before using the fact. A stale conclusion should become a question for the new run.
Further reading · Official CCAR-F exam guide, sample questions and practice exercises · Subagents in the Agent SDK
Planning and resuming investigations quiz
Answer 6 questions. Check each answer for an explanation.