A ten-minute exercise for a CLI coding agent, checked against the vendor's own documentation.
The claim worth keeping
A practitioner's walkthrough for GitHub Copilot CLI opens with a question rather than a technique. You return to a coding session. The session summary says a test was added. The test runner finds one fewer test than the summary implies. Which do you believe?
The answer the exercise insists on is that the summary is not evidence. In its own words, a chat summary "can describe an edit that never reached disk." The remedy is to open the test file and look for the assertion, and to run the suite in your own terminal rather than asking the agent what the suite said.
That is a small point and an important one, because it identifies the precise failure mode that context compaction introduces. Compaction replaces a long conversation with a shorter description of it. The description is generated by the same system whose work it describes, and it is generated from the conversation rather than from the repository. Any divergence between the two — an edit the model believes it made, a command it believes it ran — survives compaction as an assertion with nothing behind it.
The exercise, step by step
The shape is deliberately minimal: change one file, compact, come back, and verify from outside the agent.
Establish a known starting state. A small project with a keyword-matching classifier and three passing tests, and a clean working tree. A sentence about a crushed mug contains none of the classifier's keywords, so the classifier returns its fallback category.
Leave plan mode, and explicitly refuse any leftover implementation plan that would modify the classifier. The exercise is not about changing behaviour; it is about pinning current behaviour in a test.
Append exactly one test asserting that fallback result. Instruct the agent to leave the function and the existing three tests alone, and to leave version control alone.
Confirm the production diff is empty before going any further.
Compact once, as a deliberate act, with no focusing instruction.
Exit, then resume the most recent session from the same directory.
Ask the resumed agent to run the suite — and then run it yourself, in your own terminal, because that is the step the summary cannot fake.
Stage only the test file and commit it yourself. The end state is four passing tests, an untouched classifier, an empty status output, and a commit touching exactly one path.
The discipline is visible in what the human keeps: the commit, the diff check and the test run. The agent is allowed to write a test and read a result. It is not allowed to be the only witness to either.
Checked against the vendor's documentation
The walkthrough's claims about the tool divide cleanly into three groups.
Confirmed. Plan mode exists, and is documented as a mode in which the agent "analyzes your request, asks clarifying questions to understand scope and requirements, and builds a plan before writing any code." Shift+Tab cycles between modes, as the walkthrough says. Manual compaction is documented, along with the ability to cancel it mid-flight, and so is a command that prints a token-usage breakdown. The agent can run shell commands and version-control operations, and the documentation is explicit that permission is required unless granted by flag or by a session-level permission setting — including per-subcommand granularity, so denying a single push while allowing the rest is a supported configuration rather than a convention.
One addition the walkthrough does not mention, and it matters more than anything in the exercise. Compaction is not only a manual act. The documentation describes automatic compaction when the conversation approaches 95% of the token limit, compressing history in the background "without interrupting your workflow," and presents this as enabling effectively unbounded sessions. So the failure mode the exercise rehearses is not opt-in. A long session will compact whether or not anyone types the command, at a moment nobody chose, and the verification habit has to be continuous rather than attached to a deliberate step.
Not checkable from the documentation's public pages. Those pages carry no description of the exit command, no statement of what the resume-most-recent flag does, and no account of the interactive session picker — though the documentation's own table of contents lists sections that would hold them, so the honest verdict is that these are not covered there rather than undocumented. A version number the walkthrough pins its instructions to appears nowhere in the documentation, which offers commands to print and update the version instead. Readers following a version-specific instruction should check locally rather than trust the number.
The gap that gives the exercise its reason to exist. Nowhere in the documentation's public pages does it say what compaction keeps and what it drops. It says history is compressed. It does not enumerate what survives: file edits, tool approvals, pending state, anything. The one adjacent fact it does state is that tool approvals are scoped to a session and are requested again in a new session or on resuming the current one in the future — so at least one category of state is explicitly not carried across a resume.
That silence is the finding. A practitioner has written a verification ritual whose entire purpose is to compensate for an undocumented lossy transformation in the middle of the workflow. The ritual is sound. The need for it is a documentation defect.
Failure modes this surfaces
Summary-as-evidence. The highest-value habit here is refusing to let a generated summary stand in for a file or an exit code. This generalises past compaction to any point where a model reports on its own work.
Silent automatic compaction. Because compaction can fire on a threshold, a workflow validated on short sessions may behave differently on long ones with no visible cause.
Scope creep during compaction recovery. The exercise explicitly refuses a stale plan on resume. A resumed agent holding a summary of an abandoned intention will act on it unless told not to.
Letting the agent hold version control. Keeping commits in human hands means the diff is reviewed before it becomes history, and makes an empty production diff a checkable claim rather than a reported one.
Version-pinned instructions in fast-moving tools. An instruction tied to a point release ages invisibly.
Review checklist
Does your workflow have a step where a model's description of its work is the only evidence that the work happened? Replace it with a file read, a diff or an exit code.
Do you know the compaction threshold of the harness you use, and whether compaction can fire without a prompt?
On resume, do you explicitly discard plans and intentions that pre-date the compaction?
Which permissions are scoped to a session rather than persisted, and which will be re-requested on resume?
Who runs the test suite of record — the agent, or you?
Is the commit boundary drawn so that an unintended production change would be visible before it lands?
Provenance, and a limit the source states about itself
The walkthrough's written form is paywalled past its setup section: the published free text ends before the loop's steps begin. A companion video covers the same material in full, and this summary is written from it.
The source states its own most important limit out loud, and it should be carried with every claim above: the session as published was not run live, and there is no sample transcript of it. The repository state and test results were verified separately. So this is a designed loop supported by a verified end state, not a recorded run — which is a reasonable thing to publish, and a thing a reader should know before treating the sequence as tested.
Related
R188 — evaluating the harness layer rather than the model, on the same vendor's tooling.
R146 — the shared-runtime architecture beneath this CLI, which explains why sessions are cheap to keep and resume.
R373 — a coordinator that cannot read its own threads, where a summary written by the summarised party is the only channel; the same epistemic problem one layer up.
R216 — how long an agent can run alone depends on who could fool its check, which is this exercise's thesis stated generally.