goose
goose copied to clipboard
`goose session list` does not play nicely in pipes
Running goose session list | head -n1 results in a main thread panic d/t the closed pipe:
$ RUST_BACKTRACE=full goose session list | head -n1
Available sessions:
thread 'main' panicked at library/std/src/io/stdio.rs:1165:9:
failed printing to stdout: Broken pipe (os error 32)
stack backtrace:
0: 0x5d7a8ee5b6b2 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h46a716bba2450163
1: 0x5d7a8ee89173 - core::fmt::write::h275e5980d7008551
2: 0x5d7a8ee56453 - std::io::Write::write_fmt::h561a66a0340b6995
3: 0x5d7a8ee5b502 - std::sys::backtrace::BacktraceLock::print::hafb9d5969adc39a0
4: 0x5d7a8ee5dc52 - std::panicking::default_hook::{{closure}}::hae2e97a5c4b2b777
5: 0x5d7a8ee5da55 - std::panicking::default_hook::h3db1b505cfc4eb79
6: 0x5d7a8ee5e5f2 - std::panicking::rust_panic_with_hook::h409da73ddef13937
7: 0x5d7a8ee5e39a - std::panicking::begin_panic_handler::{{closure}}::h159b61b27f96a9c2
8: 0x5d7a8ee5bba9 - std::sys::backtrace::__rust_end_short_backtrace::h5b56844d75e766fc
9: 0x5d7a8ee5e02d - __rustc[4794b31dd7191200]::rust_begin_unwind
10: 0x5d7a8b66a750 - core::panicking::panic_fmt::hc8737e8cca20a7c8
11: 0x5d7a8ee54f9c - std::io::stdio::_print::h915f3273edec6464
12: 0x5d7a8b7afb55 - goose_cli::cli::cli::{{closure}}::h3a5a4fa94d5731c0
13: 0x5d7a8b7fde61 - goose::main::{{closure}}::hb9c653b64795145e
14: 0x5d7a8b869b67 - tokio::runtime::park::CachedParkThread::block_on::h5124da2fae34f125
15: 0x5d7a8bced561 - tokio::runtime::context::runtime::enter_runtime::h260ba4e8f3dff308
16: 0x5d7a8bf21d67 - tokio::runtime::runtime::Runtime::block_on::hce248cece37c725b
17: 0x5d7a8bd9918e - goose::main::h08af116a0a6432d0
18: 0x5d7a8bd18463 - std::sys::backtrace::__rust_begin_short_backtrace::h8a94b45cb415a6f5
19: 0x5d7a8bda36ad - std::rt::lang_start::{{closure}}::h6bdeb6c5c273ff4c
20: 0x5d7a8ee4a214 - std::rt::lang_start_internal::ha8ef919ae4984948
21: 0x5d7a8bd99265 - main
22: 0x7a3f33029d90 - <unknown>
23: 0x7a3f33029e40 - __libc_start_main
24: 0x5d7a8b66d6de - _start
25: 0x0 - <unknown>
Expected behavior
We should be able to use any non-interactive CLI command in arbitrary pipelines without the goose Goose process panicking.
Info
- OS & Arch: pop_OS! 22.04 (linux kernel 6.16.3) x86_64
- Interface: CLI
- Version: 1.15.0
- Extensions enabled: n/a?
- Provider & Model: any