Lifestyle
Context and task handoff
Long work needs durable decisions and evidence, not just a long conversation. README explains use, design documents explain choices, handoffs record current progress and AGENTS.md holds ongoing instructions. Do not turn all temporary progress into permanent rules.
About 12 min read · Practice 22 min

Practical · Desktop / CLI / VS Code / JetBrains / cloud
Before you start
On this page
Back to the Codex learning hubCodex learning hub: tutorial directoryA planned 60-lesson, ten-unit Codex curriculum, from setup and your first task to MD instructions and advanced integrations. Find your next lesson by experience, platform, goal or command; unpublished entries show their status.Read the full article
Goal and preparation
Session resumptionSessions, resuming and forkingDistinguish new, resumed and forked tasks, locate the right history and verify the directory and remaining work.Read the full article preserves conversation, which may not reflect current disk state. A handoff records goals, verified facts, unresolved issues and next steps for fresh validation. It is not a complete chat transcript or a file guaranteed to load automatically. Explicitly request it in the next task.
Step 1: Prepare a faulty copy and state marker
From the first-project ZIPFinish your first small projectUse an independent copy of the Small Steps todo website to change its heading and background. Identify the five practice files and compare the diff, core tests and two viewport widths while preserving behavior and data.Read the full article, copy the five broken files into a new codex-handoff-lab. Unlike start, this fixture incorrectly returns unfinished tasks for Completed. Open the root in your editor and add LAB_STATE.txt below. Verify location with Get-Location in PowerShell or pwd on macOS/Linux, then run tests.
Lab: codex-handoff-lab
Revision: BROKEN-1
node --test core.test.mjs
Expect two passes and one filter failure. Mark this verified only after observing it. If Node is missing or the path is wrong, record the blocker and actual error summary instead of assumed counts. Do not store accounts, keys or full private tool output; fictional markers and relevant test evidence are enough.
Step 2: Write a verifiable handoff
Create handoff.md at the root. This complete example assumes the observed baseline above; correct Observed if your result differs. Goal defines the outcome, Scope allowed edits, Observed revision and commands, Not checked missing evidence and Next the first checks for the next session.
# Small Steps handoff
## Goal
Completed shows only completed tasks. Keep ordering, storage and existing UI.
## Scope
Lab: codex-handoff-lab. Only core.mjs may need a program change.
Do not change tests or add dependencies. Preserve other work.
## Observed
LAB_STATE.txt: Revision: BROKEN-1.
Command: node --test core.test.mjs
Result: 2 passed, 1 failed in the filter case.
The completed branch of visibleTasks currently selects unfinished tasks.
## Not checked
Browser interaction: NOT RUN.
Publishing and deployment: NOT PERFORMED.
## Next
1. Re-read LAB_STATE.txt, core.mjs and the test file; do not trust this record over current files.
2. Re-run the baseline before deciding whether a fix is still needed.
3. If still faulty, change only the completed predicate, then test and review the diff.
4. Manually check Read completed / Build active under all three filters.
## Stop condition
If revision, test results or files differ, report the mismatch and revise this record before editing program code.
“Made some changes” is not verifiable evidence. File names, behavior, executed commands and omitted checks let another person repeat the work. In a Git project, add branch and commit, but inspect uncommitted diff too: equal commits do not guarantee equal working trees. Do not invent a commit ID for this lab.
Step 3: Make the handoff stale and start fresh
Make a controlled change: copy only expected/core.mjs from the ZIP over this lab's core.mjs, change LAB_STATE.txt to Revision: FIXED-2 and leave handoff.md stale. Tests should now pass all three. This simulates another collaborator fixing the code after the recorded conversation. Other program files and tests remain unchanged.
Create a new desktop task for the same lab. In CLI, /exit to the shell, verify the directory and launch codex again without resume. Send the following request. Expect it to detect FIXED-2 versus recorded BROKEN-1 and three passing tests, then propose updating the record without modifying the already correct filter.
Continue this lab using handoff.md, but first verify it against current files. Read LAB_STATE.txt, core.mjs and core.test.mjs. Run node --test core.test.mjs. Do not edit anything yet.
Compare the recorded revision, predicate and test result with current evidence. Report mismatches and propose the smallest next step. Browser checks must remain NOT RUN unless actually performed.
If it still proposes fixing Completed, ask which current line is wrong and which test still fails. Current evidence must take priority over stale notes. Then authorize only handoff.md: update Observed to FIXED-2 and the actual three passes, and Next to the remaining browser checks. Briefly record that the original handoff was stale and revalidated.
Long conversations, compact and document roles
CLI /compact condenses long conversations while retaining important context. Enter it in the interactive composer, follow any confirmation and then compare its restated goal, constraints and remaining work with handoff.md. This lab need not artificially fill context. Compaction is not a file backup, Git rollback or guarantee that every detail survives. Preserve important decisions in readable files.
| File | Stores | Update when |
|---|---|---|
| AGENTS.md | Durable rules and commands | Working conventions change |
| README.md | Entry point and startup | Usage changes |
| Design document | Behavior, tradeoffs, constraints | A design decision is accepted |
| handoff.md | Current evidence, blockers, next step | Pausing, handing off or validating |
Check the handoff read-only after compaction
/compact
Use the command only in the original CLI task when compaction is needed, then send the request below. Do not pad the chat for practice. The answer should preserve the core.mjs-only program scope, unchanged tests and pending browser checks. Recover omitted constraints from files; never change FIXED-2 back to BROKEN-1 merely to match a summary.
After compaction, read handoff.md and LAB_STATE.txt from disk. Restate the goal, allowed changes, preserved files, actual recorded checks and remaining work. Compare the summary with the files and identify conflicts or missing constraints. Do not edit files or rerun tests in this check. Label recorded evidence separately from checks performed in this turn.
See rules and context filesSeparating rules, documentation and contextSeparate working rules, project entry points, design requirements and handoff state. Check outdated hypotheses against actual files and tests.Read the full article. Do not permanently place an entire incident log in AGENTS.md so every task inherits stale details. Put the present goal and last verification date near the top of the handoff, retain concise resolved outcomes, and remove or label invalid paths and temporary hypotheses.
Troubleshooting, restoration and acceptance
If the new task cannot find the file, check directory and name rather than searching the entire computer. If unread, provide its path and request the observed Revision. A test succeeding in another directory does not validate this code. If failure differs from the handoff, preserve both results and times, reread relevant files and decide before changing tests.
Completion requires an explanation of stale versus current state, updated handoff.md and evidence that core.mjs was not redundantly edited. To repeat, restore only broken/core.mjs, set LAB_STATE.txt to BROKEN-1 and restore the reference handoff. Diagram 1 records facts, 2 revalidates on handoff, 3 updates next steps. Model dialogue and /compact are documented procedures; record your own execution. The reference defect and fix have separate local tests.
Back to the Codex learning hubCodex learning hub: tutorial directoryA planned 60-lesson, ten-unit Codex curriculum, from setup and your first task to MD instructions and advanced integrations. Find your next lesson by experience, platform, goal or command; unpublished entries show their status.Read the full article
Read the full description
Evidence to Handoff to Resume
Lifestyle
Codex learning hub: tutorial directory
A planned 60-lesson, ten-unit Codex curriculum, from setup and your first task to MD instructions and advanced integrations. Find your next lesson by experience, platform, goal or command; unpublished entries show their status.
Lifestyle
Worktrees and isolated tasks
A Git worktree gives one repository multiple working directories on different branches. It isolates file edits, but databases, ports and external services may still be shared. File isolation is not full resource isolation.
Lifestyle
Workshop: build a small website
Plan and build the Small Steps task website from brief.md, with adding, completing, deleting, filtering and local persistence. Separate HTML, CSS, data functions, UI events and tests, verify with Node and browser checks, and document restart and recovery steps.
Lifestyle
Usage and efficiency: reducing rework
Record task conditions, model options, time and outcomes to reduce unnecessary retries and excess context.
Articles that cite this one
Latest travel guides

GuideTokyo
Where to Stay in Tokyo: Comparing Shinjuku, Ueno, Tokyo Station, Shibuya, Asakusa, Ikebukuro, and Ginza, Plus Airport Access, Accommodation Tax, and Luggage Delivery
Where should you stay in Tokyo? Compare Shinjuku, Ueno, Tokyo Station, Shibuya, Asakusa, Ikebukuro, and Ginza by the same criteria: access from Narita and Haneda, transit routes, nearby attractions, neighborhood character, and who each area suits. Includes a comparison table, a Yamanote Line diagram, Tokyo’s accommodation tax as verified in 2026/9 (changing to 3% in 2027/4), and Airport TA-Q-BIN luggage shipping rules.
- Budget
- Hotels

GuideTokyo
How to Choose Tokyo Transit Passes: Are Suica, Welcome Suica, the Tokyo Subway Ticket, and the JR Pass Worth It?
On a first Tokyo trip, start with an IC card and pay per ride (Welcome Suica has no deposit and is valid for 28 days). If you take four or more subway rides in a day, add a 72-hour Tokyo Subway Ticket for 2,000 yen; a JR Pass is never worthwhile if you stay in Tokyo and do not go to Kansai. See what TOURIST PASMO, Suica on iPhone, and the Tokyo Metro day pass do and do not cover, with a decision chart. Prices verified in September 2026.
- Transport
- Budget

GuideTokyo
Tokyo Disneyland and DisneySea Guide: Ticket Prices, Fantasy Springs, Disney Premier Access (DPA), Standby Pass, and Which Park to Choose for Your First Visit
Tokyo Disney one-day Passport prices vary: most weekdays in 9/2026 cost ¥9,900 and weekends ¥10,900. At 14:00 daily, tickets go on sale for the same date two months later. Free Priority Pass is no longer on the official service list; only paid Disney Premier Access (¥1,000–3,500 per person per use) shortens waits. Covers hours, the 25th anniversary, Standby Pass, Entry Request, Fantasy Springs access and first-visit park choice; checked on the official site in 9/2026.
- Itineraries
- Family
Sources
- CLI commands and session controls · Checked:
- Prompting and context · Checked:
- AGENTS.md discovery · Checked: