diff --git a/codex-rs/.codex/policy.codexpolicy b/codex-rs/.codex/policy.codexpolicy new file mode 100644 index 0000000000..adb6cdaaff --- /dev/null +++ b/codex-rs/.codex/policy.codexpolicy @@ -0,0 +1,13 @@ +# Execpolicy v2 smoke-test policy +prefix_rule( + pattern = ["echo", ["a", "b"]], + decision = "allow", + match = ["echo c"], + not_match = ["echo-policy-allowed"], +) + +prefix_rule( + pattern = ["echo", "c"], + decision = "forbidden", + match = ["echo c"], +) diff --git a/codex-rs/tui/src/chatwidget/agent.rs b/codex-rs/tui/src/chatwidget/agent.rs index bf15b6c4ad..06ac44aa16 100644 --- a/codex-rs/tui/src/chatwidget/agent.rs +++ b/codex-rs/tui/src/chatwidget/agent.rs @@ -10,6 +10,7 @@ use tokio::sync::mpsc::unbounded_channel; use crate::app_event::AppEvent; use crate::app_event_sender::AppEventSender; +use crate::history_cell; /// Spawn the agent bootstrapper and op forwarding loop, returning the /// `UnboundedSender` used by the UI to submit operations. @@ -29,8 +30,12 @@ pub(crate) fn spawn_agent( } = match server.new_conversation(config).await { Ok(v) => v, Err(e) => { - // TODO: surface this error to the user. - tracing::error!("failed to initialize codex: {e}"); + let message = + format!("Failed to initialize Codex: {e}"); + tracing::error!("{message}"); + app_event_tx_clone.send(AppEvent::InsertHistoryCell(Box::new( + history_cell::new_error_event(message), + ))); return; } };