Workspace and execution

This page defines the current contract for workspace identity, execution roots, worktree isolation, and host-local execution policy.

Last verified: 2026-05-23 against src/types.rs ActiveWorkspaceEntry, WorkspaceOccupancyRecord, WorktreeSession, ExecutionSnapshot, and src/runtime/workspace.rs.

Source RFCs

Core model

Every agent has exactly one active workspace. The active workspace defines:

ConceptMeaning
workspace_idStable identifier for the workspace
workspace_anchorFilesystem path to the workspace root
execution_rootThe root for process execution (may differ from anchor)
cwdCurrent working directory for shell commands
projection_kindHow the workspace is projected (CanonicalRoot, GitWorktreeRoot)
access_modeHow the agent holds the workspace (SharedRead, ExclusiveWrite)

Active workspace vs shell cd

Agent home

agent_home is the built-in fallback workspace for agent-local state:

DirectoryPurpose
AGENTS.mdLong-lived agent contract (loaded as guidance)
memory/Curated memory markdown (self.md, operator.md)
notes/Working notes
work-items/WorkItem plan artifacts (plan.md)
skills/Agent-local skills
.holon/Runtime-owned state, ledger, index, cache

Key contract:

Workspace occupancy

Workspaces track occupancy: which agent holds the workspace and how:

FieldPurpose
holder_agent_idThe agent currently occupying the workspace
access_modeSharedRead or ExclusiveWrite
acquired_atWhen occupancy was acquired
released_atWhen occupancy was released (if released)

Workspace occupancy is used for coordination; it is not a hard lock. The runtime uses occupancy records for diagnostics and cleanup, not for preventing concurrent access at the filesystem level.

Worktrees

When an agent needs isolated file changes, UseWorkspace with mode=isolated creates a runtime-managed worktree:

Execution snapshot (ExecutionSnapshot)

The ExecutionSnapshot in AgentSummary captures the current execution context:

Host-local policy

Holon's current execution model is host-local: processes run on the host filesystem with the agent user's permissions. Key constraints:

Known gaps