From e2630356f48aa29bb8193fa7e49087b7cdee953a Mon Sep 17 00:00:00 2001 From: amanthanvi Date: Fri, 13 Feb 2026 14:21:56 -0500 Subject: [PATCH 1/7] feat(settings): add pause-queue-on-response-required setting --- src-tauri/src/types.rs | 12 ++++++++++++ src/features/settings/hooks/useAppSettings.ts | 1 + src/types.ts | 1 + 3 files changed, 14 insertions(+) diff --git a/src-tauri/src/types.rs b/src-tauri/src/types.rs index 96d0088ea..2319a0d75 100644 --- a/src-tauri/src/types.rs +++ b/src-tauri/src/types.rs @@ -624,6 +624,11 @@ pub(crate) struct AppSettings { alias = "experimentalSteerEnabled" )] pub(crate) steer_enabled: bool, + #[serde( + default = "default_pause_queued_messages_when_response_required", + rename = "pauseQueuedMessagesWhenResponseRequired" + )] + pub(crate) pause_queued_messages_when_response_required: bool, #[serde( default = "default_unified_exec_enabled", rename = "unifiedExecEnabled", @@ -961,6 +966,10 @@ fn default_steer_enabled() -> bool { true } +fn default_pause_queued_messages_when_response_required() -> bool { + true +} + fn default_unified_exec_enabled() -> bool { true } @@ -1200,6 +1209,8 @@ impl Default for AppSettings { experimental_collab_enabled: false, collaboration_modes_enabled: true, steer_enabled: true, + pause_queued_messages_when_response_required: + default_pause_queued_messages_when_response_required(), unified_exec_enabled: true, experimental_apps_enabled: false, personality: default_personality(), @@ -1362,6 +1373,7 @@ mod tests { assert!(settings.commit_message_prompt.contains("{diff}")); assert!(settings.collaboration_modes_enabled); assert!(settings.steer_enabled); + assert!(settings.pause_queued_messages_when_response_required); assert!(settings.unified_exec_enabled); assert!(!settings.experimental_apps_enabled); assert_eq!(settings.personality, "friendly"); diff --git a/src/features/settings/hooks/useAppSettings.ts b/src/features/settings/hooks/useAppSettings.ts index 684d1e1a7..e974a6342 100644 --- a/src/features/settings/hooks/useAppSettings.ts +++ b/src/features/settings/hooks/useAppSettings.ts @@ -79,6 +79,7 @@ function buildDefaultSettings(): AppSettings { experimentalCollabEnabled: false, collaborationModesEnabled: true, steerEnabled: true, + pauseQueuedMessagesWhenResponseRequired: true, unifiedExecEnabled: true, experimentalAppsEnabled: false, personality: "friendly", diff --git a/src/types.ts b/src/types.ts index 1cb08b092..04b9dd5e7 100644 --- a/src/types.ts +++ b/src/types.ts @@ -224,6 +224,7 @@ export type AppSettings = { experimentalCollabEnabled: boolean; collaborationModesEnabled: boolean; steerEnabled: boolean; + pauseQueuedMessagesWhenResponseRequired: boolean; unifiedExecEnabled: boolean; experimentalAppsEnabled: boolean; personality: PersonalityPreference; From 4eef2119d6bb9f22d93cc87e338860530e507246 Mon Sep 17 00:00:00 2001 From: amanthanvi Date: Fri, 13 Feb 2026 14:29:18 -0500 Subject: [PATCH 2/7] fix(threads): pause queued auto-flush when response required --- src/App.tsx | 63 +++++++++++++++++++ .../app/hooks/useComposerController.ts | 3 + src/features/threads/hooks/useQueuedSend.ts | 5 +- 3 files changed, 70 insertions(+), 1 deletion(-) diff --git a/src/App.tsx b/src/App.tsx index 6a4f6911e..a88ee58b6 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -113,6 +113,7 @@ import type { ComposerEditorSettings, WorkspaceInfo, } from "@/types"; +import { toolStatusTone } from "@/features/messages/utils/messageRenderUtils"; import { OPEN_APP_STORAGE_KEY } from "@app/constants"; import { useOpenAppIcons } from "@app/hooks/useOpenAppIcons"; import { useAccountSwitching } from "@app/hooks/useAccountSwitching"; @@ -1178,6 +1179,67 @@ function MainApp() { const activeTurnId = activeThreadId ? activeTurnIdByThread[activeThreadId] ?? null : null; + const hasUserInputRequestForActiveThread = Boolean( + activeThreadId && + userInputRequests.some( + (request) => + request.params.thread_id === activeThreadId && + (!activeWorkspaceId || request.workspace_id === activeWorkspaceId), + ), + ); + + const isPlanReadyAwaitingResponse = useMemo(() => { + if (!activeThreadId) { + return false; + } + + let planIndex = -1; + for (let index = activeItems.length - 1; index >= 0; index -= 1) { + const item = activeItems[index]; + if (item.kind === "tool" && item.toolType === "plan") { + planIndex = index; + break; + } + } + + if (planIndex < 0) { + return false; + } + + const planItem = activeItems[planIndex]; + if (planItem.kind !== "tool" || planItem.toolType !== "plan") { + return false; + } + + if (!(planItem.output ?? "").trim()) { + return false; + } + + const planTone = toolStatusTone(planItem, false); + if (planTone === "failed") { + return false; + } + + if (isProcessing && planTone !== "completed") { + return false; + } + + for (let index = planIndex + 1; index < activeItems.length; index += 1) { + const item = activeItems[index]; + if (item.kind === "message" && item.role === "user") { + return false; + } + } + + return true; + }, [activeItems, activeThreadId, isProcessing]); + + const queueFlushPaused = Boolean( + appSettings.pauseQueuedMessagesWhenResponseRequired && + activeThreadId && + (hasUserInputRequestForActiveThread || isPlanReadyAwaitingResponse), + ); + const { activeImages, attachImages, @@ -1205,6 +1267,7 @@ function MainApp() { activeWorkspace, isProcessing, isReviewing, + queueFlushPaused, steerEnabled: appSettings.steerEnabled, appsEnabled: appSettings.experimentalAppsEnabled, connectWorkspace, diff --git a/src/features/app/hooks/useComposerController.ts b/src/features/app/hooks/useComposerController.ts index d91e1bfc5..77b6e76eb 100644 --- a/src/features/app/hooks/useComposerController.ts +++ b/src/features/app/hooks/useComposerController.ts @@ -10,6 +10,7 @@ export function useComposerController({ activeWorkspace, isProcessing, isReviewing, + queueFlushPaused = false, steerEnabled, appsEnabled, connectWorkspace, @@ -30,6 +31,7 @@ export function useComposerController({ activeWorkspace: WorkspaceInfo | null; isProcessing: boolean; isReviewing: boolean; + queueFlushPaused?: boolean; steerEnabled: boolean; appsEnabled: boolean; connectWorkspace: (workspace: WorkspaceInfo) => Promise; @@ -84,6 +86,7 @@ export function useComposerController({ activeTurnId, isProcessing, isReviewing, + queueFlushPaused, steerEnabled, appsEnabled, activeWorkspace, diff --git a/src/features/threads/hooks/useQueuedSend.ts b/src/features/threads/hooks/useQueuedSend.ts index f6208788b..f5b98cbec 100644 --- a/src/features/threads/hooks/useQueuedSend.ts +++ b/src/features/threads/hooks/useQueuedSend.ts @@ -6,6 +6,7 @@ type UseQueuedSendOptions = { activeTurnId: string | null; isProcessing: boolean; isReviewing: boolean; + queueFlushPaused?: boolean; steerEnabled: boolean; appsEnabled: boolean; activeWorkspace: WorkspaceInfo | null; @@ -94,6 +95,7 @@ export function useQueuedSend({ activeTurnId, isProcessing, isReviewing, + queueFlushPaused = false, steerEnabled, appsEnabled, activeWorkspace, @@ -324,7 +326,7 @@ export function useQueuedSend({ ]); useEffect(() => { - if (!activeThreadId || isProcessing || isReviewing) { + if (!activeThreadId || isProcessing || isReviewing || queueFlushPaused) { return; } if (inFlightByThread[activeThreadId]) { @@ -368,6 +370,7 @@ export function useQueuedSend({ inFlightByThread, isProcessing, isReviewing, + queueFlushPaused, prependQueuedMessage, queuedByThread, runSlashCommand, From e00e192cb05914594adfa4640508c5377ad32547 Mon Sep 17 00:00:00 2001 From: amanthanvi Date: Fri, 13 Feb 2026 14:42:32 -0500 Subject: [PATCH 3/7] feat(settings): add pause queued messages toggle --- .../settings/components/SettingsView.test.tsx | 1 + .../sections/SettingsFeaturesSection.tsx | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/src/features/settings/components/SettingsView.test.tsx b/src/features/settings/components/SettingsView.test.tsx index f14792f7a..4df61d50a 100644 --- a/src/features/settings/components/SettingsView.test.tsx +++ b/src/features/settings/components/SettingsView.test.tsx @@ -88,6 +88,7 @@ const baseSettings: AppSettings = { experimentalCollabEnabled: false, collaborationModesEnabled: true, steerEnabled: true, + pauseQueuedMessagesWhenResponseRequired: true, unifiedExecEnabled: true, experimentalAppsEnabled: false, personality: "friendly", diff --git a/src/features/settings/components/sections/SettingsFeaturesSection.tsx b/src/features/settings/components/sections/SettingsFeaturesSection.tsx index 853097aae..ec7e95829 100644 --- a/src/features/settings/components/sections/SettingsFeaturesSection.tsx +++ b/src/features/settings/components/sections/SettingsFeaturesSection.tsx @@ -111,6 +111,31 @@ export function SettingsFeaturesSection({ +
+
+
+ Pause queued messages when response required +
+
+ Keep queued messages paused while Codex is waiting for plan approval/changes + or your answers. +
+
+ +
Background terminal
From 06bc2924241056751058dde13af4b0b14214a623 Mon Sep 17 00:00:00 2001 From: amanthanvi Date: Fri, 13 Feb 2026 14:42:46 -0500 Subject: [PATCH 4/7] feat(composer): show queued pause hint --- src/App.tsx | 8 ++++++++ src/features/composer/components/Composer.tsx | 3 +++ src/features/composer/components/ComposerQueue.tsx | 5 +++++ .../layout/hooks/layoutNodes/buildPrimaryNodes.tsx | 1 + src/features/layout/hooks/layoutNodes/types.ts | 1 + src/styles/composer.css | 6 ++++++ 6 files changed, 24 insertions(+) diff --git a/src/App.tsx b/src/App.tsx index a88ee58b6..b39e2b3dd 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1240,6 +1240,13 @@ function MainApp() { (hasUserInputRequestForActiveThread || isPlanReadyAwaitingResponse), ); + const queuePausedReason = + queueFlushPaused && hasUserInputRequestForActiveThread + ? "Paused — waiting for your answers." + : queueFlushPaused && isPlanReadyAwaitingResponse + ? "Paused — waiting for plan accept/changes." + : null; + const { activeImages, attachImages, @@ -2148,6 +2155,7 @@ function MainApp() { onReviewPromptConfirmCustom: confirmCustom, activeTokenUsage, activeQueue, + queuePausedReason, draftText: activeDraft, onDraftChange: handleDraftChange, activeImages, diff --git a/src/features/composer/components/Composer.tsx b/src/features/composer/components/Composer.tsx index 8ea5889f7..84ce155d5 100644 --- a/src/features/composer/components/Composer.tsx +++ b/src/features/composer/components/Composer.tsx @@ -71,6 +71,7 @@ type ComposerProps = { files: string[]; contextUsage?: ThreadTokenUsage | null; queuedMessages?: QueuedMessage[]; + queuePausedReason?: string | null; onEditQueued?: (item: QueuedMessage) => void; onDeleteQueued?: (id: string) => void; sendLabel?: string; @@ -174,6 +175,7 @@ export const Composer = memo(function Composer({ files, contextUsage = null, queuedMessages = [], + queuePausedReason = null, onEditQueued, onDeleteQueued, sendLabel = "Send", @@ -635,6 +637,7 @@ export const Composer = memo(function Composer({