Safety & Containment Invariants

agentic-go implements strict containment and deterministic boundaries to prevent AI agents from corrupting repository history or escaping workspace folders.

Containment vs Sandboxing

Terminology Notice: Containment

We describe our filesystem controls as containment, never as sandboxing. While symlinks are resolved and paths are locked within the workspace boundary, compiling and running Go test suites runs with the local user's execution privileges. Never execute verification against untrusted repositories.

Core Safety Invariants

  1. Zero Git State Mutation: agentic-go never runs git commit, git push, git branch, or git stash. Version control operations remain strictly in human control.
  2. Symlink Resolution: All paths are checked against symlink escapes. Files outside the configured workspace cannot be read, edited, or evaluated.
  3. Preimage Validation & Journaling: go_refactor writes a recovery journal before touching disk and validates exact SHA-256 preimages for every target file.
  4. Generated File Protection: Files containing standard Go generator headers (e.g. DO NOT EDIT) are protected against destructive refactoring edits.
  5. Telemetry Disabled: Pinned gopls sidecar has all crash reporting and remote telemetry permanently disabled.