From 714534475818e6e5dced91ecad100ca9e286ccce Mon Sep 17 00:00:00 2001 From: salmonik Date: Sun, 15 Nov 2026 15:37:56 +0100 Subject: 0.4.1 + 0.4.2: abort integrity, stream completeness, tool-call indexing - an aborted multi-call step now answers every announced tool call - sessions with unanswered calls are repaired by appending results - a stream without [DONE]/finish_reason is an error, not an answer - tool call deltas keyed by index can no longer vanish or invent empty calls - one-shot exit codes: 130 aborted, 3 denied --- src/main.rs | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index ccd4e37..9a5012f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -114,7 +114,7 @@ fn main() { if !prompt_words.is_empty() { let prompt = prompt_words.join(" "); - if let Err(error) = agent::run_turn( + match agent::run_turn( &cfg, &mut session, &mut history, @@ -122,14 +122,30 @@ fn main() { &signal::CANCEL, &mut approver, ) { - eprintln!("agent686: {error}"); - std::process::exit(1); + Ok(report) => { + if report.aborted { + std::process::exit(130); + } + if report.denied > 0 { + std::process::exit(3); + } + } + Err(error) => { + eprintln!("agent686: {error}"); + std::process::exit(1); + } } return; } let mut editor = Editor::new(); let interactive = editor.is_interactive(); + if !interactive && !cfg.yolo { + eprintln!( + "agent686: stdin is not a terminal, so write/edit/bash will be denied; \ + pass --yolo to allow them" + ); + } if interactive { eprintln!( "agent686 · {} · session {}{}", -- cgit v1.2.3