Tools··Task Continuity v1 · Local-Only
Agent Workspace — Local Continuity Workbench Across Coding Agents
A local-only continuity workbench for heterogeneous coding agents (Antigravity, Codex, OpenCode) built around immutable briefs, monotonic owner_epoch worktree locks, read-only Git snapshots, and Handoff Packet v1.
Python 3.12SQLite WALGit FactsFastAPI / Local GUICross-Harness SkillsPowerShell / Bash
Why Build a Local Continuity Layer
Switching coding agents mid-task — because a quota runs out, a context window fills up, or a different harness is better for review — usually forces you to reconstruct state by hand. Native chat logs do not travel across tools, and half-edited working trees rarely say which changes were actually tested.
Agent Workspace (antigravity-env) deliberately avoids building another agent loop or scraping chat transcripts. Instead, it persists the minimum structured state needed for a clean handoff on the same local Git worktree:
Rendering diagram…
Core Engineering Guardrails
- Single-Writer Worktree Fencing (
owner_epoch): Resolves canonicalgit_worktree_idfrom--show-topleveland--git-common-dirso symlinks and case aliases map to one worktree while separate Git worktrees remain distinct. Every start or transfer incrementsowner_epochinside a SQLite immediate transaction, fencing out stale executions. - Deterministic Facts vs. Semantic Notes:
core/git_facts.pycaptures branch,HEAD,git status --porcelain=v1 --untracked-files=all, bounded diff stats, and honest test provenance (measuredvs.reported, anchored totested_headanddirty_at_capture) without invoking any LLM. Even if the source model loses quota mid-edit, handoff still succeeds deterministically. - No Credentials, No Transcripts, No Destructive Git:
Handoff Packet v1is strictly local-only, never ships API keys or raw chat logs, and never callsgit reset,git clean, orgit stashto silently wipe prior work.
Related Deep Dive
- Companion Article: Switching Coding Agents Mid-Task: Checkpoints, Git Facts, and Staleness Checks — walks through a concrete local handoff packet and the exact rules used to tell whether a prior checkpoint is still trustworthy.