fix: prevent tool-use marker leakage in toolshim output (#8310)

Signed-off-by: Eugenio La Cava <eugeniolcv@gmail.com>
Signed-off-by: Michael Neale <michael.neale@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Michael Neale <michael.neale@gmail.com>
This commit is contained in:
Eugenio
2026-05-14 07:49:37 +02:00
committed by GitHub
parent 826cce0257
commit 7fc3537751
6 changed files with 1161 additions and 60 deletions
+19 -2
View File
@@ -1,8 +1,7 @@
use anyhow::Result;
use goose_cli::cli::cli;
#[tokio::main]
async fn main() -> Result<()> {
async fn run() -> Result<()> {
if let Err(e) = goose_cli::logging::setup_logging(None) {
eprintln!("Warning: Failed to initialize logging: {}", e);
}
@@ -17,3 +16,21 @@ async fn main() -> Result<()> {
result
}
fn main() -> Result<()> {
let handle = std::thread::Builder::new()
.name("goose-cli-main".to_string())
.stack_size(8 * 1024 * 1024)
.spawn(|| {
let runtime = tokio::runtime::Builder::new_multi_thread()
.enable_all()
.build()
.expect("Failed to build Tokio runtime");
runtime.block_on(run())
})
.map_err(|e| anyhow::anyhow!("Failed to spawn goose-cli main thread: {}", e))?;
handle
.join()
.map_err(|_| anyhow::anyhow!("goose-cli main thread panicked"))?
}