All videosCoding agents2:10

Context, workspace and isolation

A separate copy does not prove confinement. Both boundaries need checking.

Links containing ?t= open the video at a specific second.

Video summary

The ideas to retain

01

Five objects worth naming separately

Before designing concurrency or security, make the vocabulary explicit.

02

1. Repository and base revision

The repository contains history, refs, Git objects, configuration, and one or more working trees. An agentic task also needs an identifiable base revision, normally a commit SHA.

03

2. Context view

The model does not automatically receive every byte in the repository. The harness selects, or lets the model retrieve, files, symbols, instructions, diffs, logs, and history.

Key moments

Jump directly to a section

  1. Separate three boundaries
  2. A branch does not hold everything
  3. Two indexes, two copies
  4. The database is still shared
  5. A clean merge can still be wrong
  6. Preserve changes owned by others
Read the reviewed transcript

This video has no narration. This transcript reproduces its visible explanatory text, not an invented voice.

Separate three boundaries

A branch points to commits. A workspace holds working files.

A sandbox restricts effects on files, processes or the network.

A separate copy does not prove confinement. Both boundaries need checking.

A branch does not hold everything

The Git reference points to commit A.

An uncommitted edit changes the file but leaves that reference in place.

Processes and ignored files sit outside this history. A commit does not describe the whole environment.

Two indexes, two copies

Two agents write to separate copies of the same repository.

Each worktree has its own HEAD and index: one edit does not overwrite the other file.

That prevents local file interference. It does not isolate networks or services.

The database is still shared

Worktrees A and B have separate files but share one test database.

A deletes a fixture. B finds zero rows and its test fails.

In a new run, separate service namespaces prevent this specific interference, not every conflict.

A clean merge can still be wrong

One task changes an amount from cents to euros. Another adds a consumer.

They touch different lines, so Git can combine them without a textual conflict.

The consumer expects cents but receives euros. The combined contract still needs a test.

Preserve changes owned by others

The workspace already contained a human edit before the task began.

The agent and another process then add their own changes.

Cleanup must distinguish their owners. Reverting everything would destroy work the agent did not own.