Skip to content

fix(agents): log warn when child.kill() fails in codex_adapter#642

Merged
majiayu000 merged 1 commit intomainfrom
feat/627-log-kill-failure
Apr 10, 2026
Merged

fix(agents): log warn when child.kill() fails in codex_adapter#642
majiayu000 merged 1 commit intomainfrom
feat/627-log-kill-failure

Conversation

@majiayu000
Copy link
Copy Markdown
Owner

Summary

  • Replace let _ = child.kill().await with if let Err(e) pattern that emits a tracing::warn! with the PID and error
  • Orphaned processes are now visible in traces instead of silently failing

Fixes #627

Test plan

  • cargo fmt --all — no changes
  • cargo clippy --workspace --all-targets -- -D warnings — clean
  • cargo test --workspace — all pass

Replace silent `let _ = child.kill().await` with a warn-level log so
orphaned processes are visible in traces instead of silently failing.

Fixes #627

Signed-off-by: majiayu000 <1835304752@qq.com>
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request improves error handling in the CodexAdapter by explicitly checking and logging failures when attempting to kill a child process during an interrupt. Previously, the result of the kill operation was ignored; it now records the process ID and the error message. I have no feedback to provide as no review comments were submitted.

@majiayu000 majiayu000 merged commit 22b610e into main Apr 10, 2026
9 checks passed
@majiayu000 majiayu000 deleted the feat/627-log-kill-failure branch April 10, 2026 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

child.kill() 结果被 let _ = 静默丢弃

1 participant