huskies: merge 882
This commit is contained in:
@@ -399,14 +399,16 @@ fn run_agent_pty_blocking(
|
||||
|
||||
let _ = child.kill();
|
||||
let wait_result = child.wait();
|
||||
match &wait_result {
|
||||
let exit_ok = match &wait_result {
|
||||
Ok(status) => {
|
||||
slog!("[agent:{story_id}:{agent_name}] Child exited: {status:?}");
|
||||
status.success()
|
||||
}
|
||||
Err(e) => {
|
||||
slog!("[agent:{story_id}:{agent_name}] Child wait error: {e}");
|
||||
false
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Wait for the reader thread to finish so it releases the cloned PTY
|
||||
// master fd before we return. Without this, the next PTY spawn for the
|
||||
@@ -434,5 +436,6 @@ fn run_agent_pty_blocking(
|
||||
Ok(PtyResult {
|
||||
session_id,
|
||||
token_usage,
|
||||
exit_ok,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -10,6 +10,9 @@ use crate::agents::TokenUsage;
|
||||
pub(in crate::agents) struct PtyResult {
|
||||
pub session_id: Option<String>,
|
||||
pub token_usage: Option<TokenUsage>,
|
||||
/// `true` if the child process exited with a zero exit code (normal completion).
|
||||
/// `false` if the process was killed by a signal or exited with a non-zero code.
|
||||
pub exit_ok: bool,
|
||||
}
|
||||
|
||||
pub(super) fn composite_key(story_id: &str, agent_name: &str) -> String {
|
||||
|
||||
Reference in New Issue
Block a user