mirror of
https://github.com/openai/codex.git
synced 2026-04-25 15:15:15 +00:00
Reject ask user question tool in Execute and Custom (#9560)
## Summary - Keep `request_user_input` in the tool list but reject it at runtime in Execute/Custom modes with a clear model-facing error. - Add a session accessor for current collaboration mode and enforce the gate in the request_user_input handler. - Update core/app-server tests to use Plan mode for success and add Execute/Custom rejection coverage.
This commit is contained in:
@@ -12,6 +12,8 @@ use codex_app_server_protocol::ThreadStartResponse;
|
||||
use codex_app_server_protocol::TurnStartParams;
|
||||
use codex_app_server_protocol::TurnStartResponse;
|
||||
use codex_app_server_protocol::UserInput as V2UserInput;
|
||||
use codex_protocol::config_types::CollaborationMode;
|
||||
use codex_protocol::config_types::Settings;
|
||||
use codex_protocol::openai_models::ReasoningEffort;
|
||||
use tokio::time::timeout;
|
||||
|
||||
@@ -52,6 +54,11 @@ async fn request_user_input_round_trip() -> Result<()> {
|
||||
}],
|
||||
model: Some("mock-model".to_string()),
|
||||
effort: Some(ReasoningEffort::Medium),
|
||||
collaboration_mode: Some(CollaborationMode::Plan(Settings {
|
||||
model: "mock-model".to_string(),
|
||||
reasoning_effort: Some(ReasoningEffort::Medium),
|
||||
developer_instructions: None,
|
||||
})),
|
||||
..Default::default()
|
||||
})
|
||||
.await?;
|
||||
|
||||
Reference in New Issue
Block a user