From 758d2c48fb5397076cd74ead0fb7d096740d30d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A0=20Arrufat?= Date: Thu, 21 May 2026 18:37:16 +0200 Subject: [PATCH] agent: require --no-llm for basic REPL --- src/agent/Agent.zig | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/src/agent/Agent.zig b/src/agent/Agent.zig index edc3157b..68093e89 100644 --- a/src/agent/Agent.zig +++ b/src/agent/Agent.zig @@ -148,6 +148,7 @@ model: []u8, system_prompt: []const u8, script_file: ?[]const u8, self_heal: bool, +no_llm: bool, interactive: bool, one_shot_task: ?[]const u8, one_shot_attachments: ?[]const []const u8, @@ -183,11 +184,17 @@ pub fn init(allocator: std.mem.Allocator, app: *App, opts: Config.Agent) !*Agent const is_one_shot = opts.task != null; const will_repl = !is_one_shot and (opts.interactive or opts.script_file == null); - const llm: ?Llm = if (opts.no_llm) null else try Llm.resolve(opts); + // Basic-mode REPL (no LLM) must be opted into via --no-llm. Without it, + // the REPL accepts natural language and an absent API key would only + // surface at the first non-PandaScript line — too late to be useful. + // Pure replay (`agent