diff --git a/hive-c0re/src/actions.rs b/hive-c0re/src/actions.rs index 16ff465e..13d6f40d 100644 --- a/hive-c0re/src/actions.rs +++ b/hive-c0re/src/actions.rs @@ -324,8 +324,15 @@ async fn run_approval_init_config( crate::topology::add_child(&approval.agent, &approval.commit_ref) .map_err(|e| anyhow::anyhow!("topology add_child: {e}"))?; } - lifecycle::setup_proposed(&proposed_dir, &approval.agent).await?; + // Create the agent's state root as a btrfs subvolume FIRST, before + // any dir-seed touches it. `ensure_agent_state_subvolume` is + // progressive ("root exists → skip"), and `setup_proposed` does a + // `create_dir_all` on the proposed-config path which would + // materialise the state root as a plain directory — after which + // the subvolume create is silently skipped and the agent never + // lands on a subvolume (no quota, no snapshot). Order matters. lifecycle::ensure_agent_state_subvolume(&approval.agent).await?; + lifecycle::setup_proposed(&proposed_dir, &approval.agent).await?; lifecycle::ensure_claude_dir(&claude_dir)?; lifecycle::ensure_state_dir(¬es_dir)?; Ok(())