workspace configuration section controls where Symphony creates per-issue workspace directories for agent execution.
Configuration
WORKFLOW.md
Fields
Base directory for all agent workspaces.Each issue gets an isolated subdirectory under this root:Supports:
- Tilde expansion:
~/code/workspacesexpands to home directory - Environment variables:
$WORKSPACE_ROOTreads from environment - Absolute paths:
/var/symphony/workspaces - Relative paths: Bare names without separators (discouraged)
- Paths containing
/or\are expanded to absolute paths - Bare strings without separators are preserved as-is
- Environment variable references using
$VAR_NAMEare resolved before expansion
Workspace Lifecycle
Creation and Reuse
Workspaces are persistent across runs:- First run: Directory is created and
after_createhook executes - Subsequent runs: Existing directory is reused (no hook)
- Successful completion: Workspace is preserved (not deleted)
- Terminal states: Workspace is cleaned up on next service startup
Path Sanitization
Issue identifiers are sanitized to create safe directory names:- Only
[A-Za-z0-9._-]characters are preserved - All other characters are replaced with
_ - Example:
ABC-123staysABC-123,XYZ/456becomesXYZ_456
Safety Invariants
Symphony enforces strict workspace path validation:Critical: Codex agents run only inside validated workspace paths. Workspace paths must:
- Be inside the configured workspace root (path prefix check)
- Not equal the workspace root itself
- Not contain symlinks that escape the root
Path Expansion Examples
Tilde Expansion
/home/username/symphony-workspaces
Environment Variable
$SYMPHONY_WORKSPACE_ROOT from environment, then expands the path.
Absolute Path
System Temp (Default)
<system-temp-dir>/symphony_workspaces
Workspace Structure
Example workspace layout for issueABC-123:
Configuration Reloading
Workspace root changes are applied dynamically:- New workspace creations use the updated root
- Existing workspaces continue in their original location
- Running agents are not affected by configuration changes
Cleanup Behavior
Startup Cleanup
On service startup, Symphony:- Queries the tracker for all issues in terminal states
- Removes workspace directories for those issues
- Continues startup even if cleanup fails (logs warning)
Reconciliation Cleanup
During each poll tick:- Running issues that transition to terminal states are stopped
- Their workspaces are immediately cleaned up
- Issues that become non-active (but not terminal) are stopped without cleanup