Skip to content

an open-source alternative to the dots, bots and muses of the world, run an office of claude code/codex like agents on your laptop, sandboxes or anywhere, uses your existing subscriptions

fix(spawn): global defaultModel wins over role tier (explicit pick still wins)

Chaitanya Girieff2593c04e7
diff --git a/src/main/index.ts b/src/main/index.ts
index 93bba8ea..be558dd5 100644
--- a/src/main/index.ts
+++ b/src/main/index.ts
@@ -543,9 +543,10 @@ ipcMain.handle('pty:spawn', async (_evt, opts: SpawnOptions & { hive?: AgentMeta
if (opts.hive) {
const cfg = readConfig();
const args = opts.args ?? [];
- // Default model by role — only if the renderer didn't pass an explicit --model.
+ // Model precedence: an explicit per-agent --model (from the renderer) wins;
+ // else the user's global defaultModel; else the role-based default tier.
if (!args.includes('--model')) {
- const m = modelForRole(opts.hive);
+ const m = cfg.defaultModel ?? modelForRole(opts.hive);
if (m) args.push('--model', m);
}
// Coarse runaway cap.