From 8ae5bd48cf233315b5f36a7a6b39002a5e77f74b Mon Sep 17 00:00:00 2001 From: salmonik Date: Sun, 15 Nov 2026 18:00:12 +0100 Subject: 0.7.0: resume shows where you left off; no approval for unparsable calls - --continue prints the last answer, or the last reasoning block if there was none - tool arguments are validated before prompting, so an empty bash call becomes an error for the model instead of a blank approval - empty placeholder tool calls are dropped and reported - sessions tolerate invalid UTF-8 lines from a torn write - AGENT686_DEBUG_STREAM=1 dumps SSE frames --- src/agent.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/agent.rs') diff --git a/src/agent.rs b/src/agent.rs index 4bf19ed..f0e1292 100644 --- a/src/agent.rs +++ b/src/agent.rs @@ -342,8 +342,19 @@ fn execute( cancel: &AtomicBool, step: usize, ) -> ToolOutcome { - let args: Value = serde_json::from_str(&call.arguments).unwrap_or_else(|_| json!({})); + let args: Value = match serde_json::from_str(&call.arguments) { + Ok(args) => args, + Err(error) => { + return ToolOutcome::Failed(format!( + "arguments were not valid JSON ({error}); issue the call again with the \ + complete arguments" + )) + } + }; ui::tool_line(step, &call.name, &args); + if let Err(error) = tools::validate(&call.name, &args) { + return ToolOutcome::Failed(format!("{error}; the call was not run")); + } match tools::approval(&call.name) { Approval::Never => match tools::run(&call.name, &args, cancel) { -- cgit v1.2.3