Skip to content

Open source Grok Bot alternative, Bring your own agent and subscription: message Claude Code, Codex, Gemini CLI, Cursor, Copilot and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal. Agent-agnostic and free. Also a Muse and Dots alternative. Built in Rust.

fix(host): let agents start right after Node.js is added

leepokai20e2367bb62a
diff --git a/host/src/agent/backends.rs b/host/src/agent/backends.rs
index 8595c003..034c72a4 100644
--- a/host/src/agent/backends.rs
+++ b/host/src/agent/backends.rs
@@ -490,8 +490,6 @@ fn well_known_dirs() -> Vec<PathBuf> {
versions.sort_by_key(|p| std::cmp::Reverse(node_version(p)));
dirs.extend(versions.into_iter().map(|p| p.join("bin")));
}
- // Last, so the computer's own Node comes first.
- dirs.extend(node::search_dirs());
dirs
}
@@ -510,6 +508,13 @@ pub fn hydrate_path() {
path.push(p);
}
}
+ // Codync's Node last, so the computer's own comes first; listed even before it exists, so
+ // adding it (a separate `codync-host node` process) counts without another refresh.
+ for p in node::search_dirs() {
+ if seen.insert(p.clone()) {
+ path.push(p);
+ }
+ }
if let Ok(joined) = std::env::join_paths(&path) {
// SAFETY: called at startup and from the single refresh command, before/between spawns.
unsafe { std::env::set_var("PATH", joined) };
diff --git a/host/src/agent/registry.rs b/host/src/agent/registry.rs
index c900c716..408334e5 100644
--- a/host/src/agent/registry.rs
+++ b/host/src/agent/registry.rs
@@ -177,9 +177,7 @@ pub async fn command(agent: &Value, progress: impl Fn(&str)) -> Result<Cmd> {
),
args: args_of(&d["uvx"]),
}),
- None if needs_node(agent) => {
- bail!("{name} needs Node.js on this computer: add it in {name}'s setup in Extensions")
- }
+ None if needs_node(agent) => bail!("{name} needs Node.js on this computer: add it in Extensions"),
None => bail!("{name} has no build for this computer (needs uv)"),
}
}