User guide / Agent access to workspace context

Buffer edits

Development reference · View source

With the edit grant:

  • An edit names an explicit buffer and its current revision, and is one undoable transaction, newlines included.
  • An edit never saves, closes the buffer, applies a directory operation, or completes an external-editor wait. In particular, changing a buffer cannot submit a prompt opened through EDITOR.

Appending works without a revision, so several agents can take turns in one shared buffer without refusing each other.

  • Appends apply one at a time, each kept whole.
  • An agent may pass the ending it last read as expected_tail. If the buffer no longer ends that way — say someone cleared it — the append writes nothing and fails as stale.
  • Each append is one undoable transaction and never saves.