mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
[codex] Surface runtime warnings in codex exec (#27415)
## Why `codex exec` drops thread-scoped warning notifications. Warnings discovered while a thread starts, including unreadable or invalid UTF-8 project `AGENTS.md` files, therefore become silent. ## What changed - Process global and primary-thread warning notifications while continuing to ignore warnings from unrelated threads. - Render runtime warnings in human output and expose them through the existing non-fatal error item in JSONL output. - Add focused routing, rendering, and malformed project-instruction coverage.
This commit is contained in:
@@ -1256,6 +1256,11 @@ fn should_process_notification(
|
||||
) -> bool {
|
||||
match notification {
|
||||
ServerNotification::ConfigWarning(_) | ServerNotification::DeprecationNotice(_) => true,
|
||||
// TODO(anp) resolve duplicate startup warnings
|
||||
ServerNotification::Warning(notification) => notification
|
||||
.thread_id
|
||||
.as_deref()
|
||||
.is_none_or(|candidate| candidate == thread_id),
|
||||
ServerNotification::Error(notification) => {
|
||||
notification.thread_id == thread_id && notification.turn_id == turn_id
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user