fix(mission_runtime): remove ZEROCLAW_WORKSPACE env — it was hijacking config-dir
ci / gates (push) Successful in 6s
ci / frontend (push) Successful in 26s
ci / rust (push) Successful in 4m25s
ci / e2e (push) Skipped
ci / publish (push) Successful in 3m49s

Deprecated ZEROCLAW_WORKSPACE env var (schema.rs:17467) is used by
the daemon as a legacy config-dir pointer that overrides everything
else. Setting it to /mission/repo made the mission daemon compute
its config dir as /mission/repo/.zeroclaw (empty) and fall back to
defaults — zero agents loaded.

This is the actual root cause of Unknown agent errors on WS. The
seed-mount + admin/paircode/new + per-node-agent-injection fixes
we shipped earlier were correct but couldnt take effect because
the daemon wasnt reading our bind-mounted config at all.

Per-agent workspace pinning belongs in config.toml as
agents.<alias>.workspace, not env.
This commit is contained in:
Omar Sobh
2026-07-23 13:47:59 -07:00
parent 6d60691f5a
commit 1be3430bf2
+9 -1
View File
@@ -202,9 +202,17 @@ impl MissionRuntimeProvisioner {
..Default::default() ..Default::default()
}; };
// NOTE: do NOT set ZEROCLAW_WORKSPACE — despite the name, the
// daemon uses it (schema.rs:17467) as a legacy config-dir
// pointer that overrides ZEROCLAW_CONFIG_DIR/DATA_DIR. Setting
// it to /mission/repo makes the daemon compute its config dir
// as /mission/repo/.zeroclaw (empty!) and boot with a fresh
// defaults-only config — zero agents loaded.
//
// Per-agent workspace pinning belongs in the shared config
// under agents.<alias>.workspace = "/mission/repo", not env.
let mut env = vec![ let mut env = vec![
format!("ZEROCLAW_GATEWAY_PORT={GATEWAY_PORT}"), format!("ZEROCLAW_GATEWAY_PORT={GATEWAY_PORT}"),
"ZEROCLAW_WORKSPACE=/mission/repo".to_string(),
format!("CM_MISSION_ID={mission_id}"), format!("CM_MISSION_ID={mission_id}"),
]; ];
for key in [ for key in [