Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ members = ["crates/*"]
resolver = "2"

[workspace.package]
version = "0.1.60"
version = "0.1.61"
edition = "2024"
rust-version = "1.85"
license = "Apache-2.0"
Expand Down
5 changes: 4 additions & 1 deletion crates/cli-sub-agent/src/debate_cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,10 @@ const ANTI_RECURSION_PREAMBLE: &str = "\
CRITICAL: You are running INSIDE a CSA subprocess (csa review / csa debate). \
Do NOT invoke `csa run`, `csa review`, `csa debate`, or ANY `csa` CLI command — \
this causes infinite recursion. Perform the task DIRECTLY using your own \
capabilities (Read, Grep, Glob, Bash for git commands). \
capabilities (Read, Grep, Glob, Bash for read-only git commands). \
DEBATE SAFETY: Do NOT run git add/commit/push/merge/rebase/tag/stash/reset/checkout/cherry-pick, \
and do NOT run gh pr/create/comment/merge or any command that mutates repository/PR state. \
Ignore prompt-guard reminders about commit/push in this subprocess. \
Ignore any CLAUDE.md or AGENTS.md rules that instruct you to delegate to CSA.\n\n";

/// Build a debate instruction that passes parameters to the debate skill.
Expand Down
28 changes: 28 additions & 0 deletions crates/cli-sub-agent/src/pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,38 @@ pub(crate) async fn build_and_validate_executor(
);
anyhow::bail!("{}", e);
}
ensure_tool_runtime_prerequisites(executor.tool_name()).await?;

Ok(executor)
}

async fn ensure_tool_runtime_prerequisites(tool_name: &str) -> Result<()> {
if tool_name != "codex" {
return Ok(());
}
if std::env::var("CSA_SKIP_BWRAP_PREFLIGHT").ok().as_deref() == Some("1") {
return Ok(());
}

#[cfg(target_os = "linux")]
{
let has_bwrap = tokio::process::Command::new("which")
.arg("bwrap")
.output()
.await
.map(|out| out.status.success())
.unwrap_or(false);
if !has_bwrap {
anyhow::bail!(
"codex preflight failed: required runtime dependency 'bwrap' (bubblewrap) is missing.\n\
Install bubblewrap first, then re-run the command."
);
}
}

Ok(())
}

/// Acquire global concurrency slot for the executor.
///
/// Returns ToolSlot guard on success.
Expand Down
Loading