mirror of
https://github.com/openai/codex.git
synced 2026-06-02 11:22:01 +00:00
Remove Plan-mode gate from idle turn injection (#25577)
## Why `try_start_turn_if_idle` is the core helper for starting injected input only when the session is actually idle. It should stay focused on generic turn-lifecycle safety. The previous `ModeKind::Plan` guard mixed caller policy into that helper: Plan mode may choose not to auto-start some extension work, but that decision belongs at the extension or caller boundary rather than in the session injection primitive. ## What changed - Removed the `ModeKind::Plan` early return from `Session::try_start_turn_if_idle`. - Removed the now-unused `ModeKind` import from `core/src/session/inject.rs`. ## Testing Not run locally.
This commit is contained in:
@@ -4,7 +4,6 @@ use super::turn_context::TurnContext;
|
||||
use crate::state::ActiveTurn;
|
||||
use crate::state::TurnState;
|
||||
use crate::tasks::RegularTask;
|
||||
use codex_protocol::config_types::ModeKind;
|
||||
use codex_protocol::models::ResponseItem;
|
||||
use std::sync::Arc;
|
||||
|
||||
@@ -41,9 +40,6 @@ impl Session {
|
||||
if input.is_empty() {
|
||||
return Ok(());
|
||||
}
|
||||
if self.collaboration_mode().await.mode == ModeKind::Plan {
|
||||
return Err(input);
|
||||
}
|
||||
if self.input_queue.has_trigger_turn_mailbox_items().await {
|
||||
return Err(input);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user