@openclaw/codex 2026.10.5-beta.2 → 2026.10.5-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist/.setup/{account-usage-runtime-B6S1BQU7.mjs → account-usage-runtime-CBR8imwK.mjs} +1 -1
  2. package/dist/.setup/{apply-Cc1DfWPz.mjs → apply-CfWD3Bk6.mjs} +4 -4
  3. package/dist/.setup/{attempt-client-cleanup-CxX4cTSi.mjs → attempt-client-cleanup-D3YvP0N7.mjs} +4 -4
  4. package/dist/.setup/{auth-cache-key-tENCQOub.mjs → auth-cache-key-BzYrcgwJ.mjs} +1 -1
  5. package/dist/.setup/{bounded-turn-DxtRqV8t.mjs → bounded-turn-BmChqNaK.mjs} +7 -7
  6. package/dist/.setup/{build-state-CMYRQ_We.mjs → build-state-sjOWPg_o.mjs} +1 -1
  7. package/dist/.setup/{client-zrCKOu_E.mjs → client-aPKNc4Ii.mjs} +3 -3
  8. package/dist/.setup/{client-catalog-response-B7oqHQGO.mjs → client-catalog-response-Du2GmrOV.mjs} +1 -1
  9. package/dist/.setup/{command-dispatch-ImiHvcyW.mjs → command-dispatch-CF6mgl3u.mjs} +1 -1
  10. package/dist/.setup/{command-handlers-B8CT4ngS.mjs → command-handlers-DlycReQg.mjs} +10 -10
  11. package/dist/.setup/{command-rpc-HtQjCQBg.mjs → command-rpc-CUy4Bo-0.mjs} +6 -6
  12. package/dist/.setup/{compact-Do9HPeDr.mjs → compact-BCCjM_cb.mjs} +9 -9
  13. package/dist/.setup/{computer-use-CeF5GuCX.mjs → computer-use-C6yYfm6-.mjs} +4 -4
  14. package/dist/.setup/{conversation-binding-D78aEdkE.mjs → conversation-binding-CP_mK17t.mjs} +7 -7
  15. package/dist/.setup/{dynamic-tool-build-BMiiFROa.mjs → dynamic-tool-build-DKko0Jjw.mjs} +1 -1
  16. package/dist/.setup/{dynamic-tools-DPPHrGKB.mjs → dynamic-tools-8hqa1jVc.mjs} +6 -6
  17. package/dist/.setup/{effective-mcp-catalog-x3JVEcJp.mjs → effective-mcp-catalog-uIZ4w7Nh.mjs} +4 -4
  18. package/dist/.setup/{ephemeral-turn-Dk0wWoqi.mjs → ephemeral-turn-DAlEbytF.mjs} +2 -2
  19. package/dist/.setup/{isolated-completion-z0ii1a_V.mjs → isolated-completion-BWEjVHBf.mjs} +3 -3
  20. package/dist/.setup/{mcp-app-session-preparation-GTx-bRGN.mjs → mcp-app-session-preparation-CJR8ib5s.mjs} +3 -3
  21. package/dist/.setup/{model-catalog-VUdFUqnH.mjs → model-catalog-Ben3FsFp.mjs} +5 -5
  22. package/dist/.setup/{models-Dph0RqpR.mjs → models-BB0l-gUb.mjs} +3 -3
  23. package/dist/.setup/{native-hook-relay-CSZpcjwq.mjs → native-hook-relay-DQzvuJ-W.mjs} +3 -3
  24. package/dist/.setup/{native-mcp-app-CDrrBaTE.mjs → native-mcp-app-UkwXOBfS.mjs} +4 -4
  25. package/dist/.setup/{native-skill-isolation-BAatEJZb.mjs → native-skill-isolation-DoRxgQPX.mjs} +2 -2
  26. package/dist/.setup/{native-subagent-monitor-D5O_o07p.mjs → native-subagent-monitor-DC4clzAD.mjs} +6 -6
  27. package/dist/.setup/{plan-QNW5zpFp.mjs → plan-DFVngccH.mjs} +2 -2
  28. package/dist/.setup/{plugin-approval-roundtrip-DOQ3Tibe.mjs → plugin-approval-roundtrip-68FoMlaZ.mjs} +1 -1
  29. package/dist/.setup/{provider-BG5nXBnY.mjs → provider-BCXRBKEb.mjs} +4 -4
  30. package/dist/.setup/{provider-capabilities-DtJKxDf6.mjs → provider-capabilities-DWH29sy3.mjs} +1 -1
  31. package/dist/.setup/{request-6piO0U_P.mjs → request-DInueZ2q.mjs} +1 -1
  32. package/dist/.setup/{run-attempt-DejV9vDW.mjs → run-attempt-BN-0TO0P.mjs} +26 -21
  33. package/dist/.setup/{session-catalog-events-BziNSfLx.mjs → session-catalog-events-DujfzcAY.mjs} +3 -3
  34. package/dist/.setup/{session-catalog-index-BmaZFGEH.mjs → session-catalog-index-DQ9_sj42.mjs} +4 -4
  35. package/dist/.setup/{session-catalog-native-projection-4CsufcT8.mjs → session-catalog-native-projection-BY2zMkMO.mjs} +1 -1
  36. package/dist/.setup/{session-catalog-projection-CcIdJdsd.mjs → session-catalog-projection-BTXOyzl_.mjs} +1 -1
  37. package/dist/.setup/{session-catalog-source-CdPqS9sa.mjs → session-catalog-source-yQpy2Y6b.mjs} +1 -1
  38. package/dist/.setup/{session-retirement-CcWVhLVr.mjs → session-retirement-CIDqLMII.mjs} +5 -5
  39. package/dist/.setup/{settled-turn-finalizer-BezKSo-Y.mjs → settled-turn-finalizer-C6tjH8RJ.mjs} +3 -3
  40. package/dist/.setup/{shared-client-BjiqpbC5.mjs → shared-client-CCz9ldpr.mjs} +11 -6
  41. package/dist/.setup/{side-question-YQ5FObkD.mjs → side-question-COaYBoON.mjs} +9 -9
  42. package/dist/.setup/{source-Ce3XIIsU.mjs → source-DsubBCYm.mjs} +1 -1
  43. package/dist/.setup/{thread-lifecycle-run-BWy0LDLB.mjs → thread-lifecycle-run-CxVfnkG-.mjs} +71 -47
  44. package/dist/.setup/{thread-ownership-5X4197vk.mjs → thread-ownership-_2e1sjfi.mjs} +3 -3
  45. package/dist/.setup/{thread-policy-BEecBTJM.mjs → thread-policy-CLTwg3ZA.mjs} +3 -3
  46. package/dist/.setup/{thread-resume-BXY_6o6Z.mjs → thread-resume-C6qsk8_o.mjs} +4 -4
  47. package/dist/.setup/{turn-router-D8DLkZgH.mjs → turn-router-CSJl3yYQ.mjs} +1 -1
  48. package/dist/.setup/{upstream-session-fork-DQZbaYMK.mjs → upstream-session-fork-BC45E4Pe.mjs} +8 -8
  49. package/dist/.setup/{usage-DVR5mNJK.mjs → usage-1eNaNDM2.mjs} +1 -1
  50. package/dist/.setup/{usage-limit-error-BEONfgt-.mjs → usage-limit-error-CJoJ_F8V.mjs} +1 -1
  51. package/dist/.setup/{web-search-provider.runtime-CffHOpYY.mjs → web-search-provider.runtime-Qq_wUrvv.mjs} +1 -1
  52. package/dist/catalog-page.worker.js +1 -1
  53. package/dist/harness.js +15 -15
  54. package/dist/index.js +24 -24
  55. package/dist/media-understanding-provider.js +2 -2
  56. package/dist/migration-provider-api.js +1 -1
  57. package/package.json +4 -4
@@ -293,7 +293,7 @@ async function withCodexAppServerJsonClient(params, run) {
293
293
  timeoutMessage,
294
294
  promise: (async () => {
295
295
  const { resolveCodexAppServerDirectSandboxBypassBlock } = await import("./sandbox-guard-DIImwCy1.mjs").then((n) => n.r);
296
- const { createIsolatedCodexAppServerClient, getLeasedSharedCodexAppServerClient, isCodexAppServerStartSelectionChangedError, releaseLeasedSharedCodexAppServerClient, retireSharedCodexAppServerClientIfCurrent } = await import("./shared-client-BjiqpbC5.mjs").then((n) => n.v);
296
+ const { createIsolatedCodexAppServerClient, getLeasedSharedCodexAppServerClient, isCodexAppServerStartSelectionChangedError, releaseLeasedSharedCodexAppServerClient, retireSharedCodexAppServerClientIfCurrent } = await import("./shared-client-CCz9ldpr.mjs").then((n) => n.v);
297
297
  for (let attempt = 0; attempt < 2; attempt += 1) {
298
298
  errorPhase = void 0;
299
299
  setPhase("prepare");
@@ -2,13 +2,13 @@ import { n as readCodexRuntimeModelId } from "./model-runtime-BdqzOMkU.mjs";
2
2
  import { g as createCodexNativeSubagentHistoryOwner } from "./native-subagent-pending-assignments-DmVhedNs.mjs";
3
3
  import { i as isJsonObject, r as flattenCodexDynamicToolFunctions } from "./protocol-CANUwXJ3.mjs";
4
4
  import { i as matchesCodexNativeSubagentSubmissionBinding, m as sessionBindingIdentity, n as assertCodexBindingMayBeReplaced } from "./session-binding-record-DU_0biMD.mjs";
5
- import { n as defineCodexBuildState } from "./build-state-CMYRQ_We.mjs";
5
+ import { n as defineCodexBuildState } from "./build-state-sjOWPg_o.mjs";
6
6
  import { c as withMcpElicitationsApprovalPolicy, d as readCodexRequirementsToml, n as hasCodexMcpToolApprovalOverrides, s as shouldAutoApproveCodexAppServerApprovals } from "./config-security-clxAZYWX.mjs";
7
7
  import { c as isCodexPairedNodeRemoteExecPlacementSandbox, d as readCodexPluginConfig, f as resolveCodexPluginsPolicy, l as isCodexRemoteExecPlacementSandbox, u as isCodexSandboxExecServerEnabled } from "./config-parsing-DsWSCPHO.mjs";
8
8
  import { n as isCodexAppServerProxyLaunch } from "./launch-args-DbFCehO7.mjs";
9
9
  import { t as resolveCodexAppServerHomeDir } from "./auth-start-options-BPIPeEX8.mjs";
10
10
  import { i as resolveCodexAppServerHomeScope, l as resolveCodexModelBackedReviewerPolicyContext, o as resolveCodexComputerUseConfig } from "./config-options-DDzeNQ8m.mjs";
11
- import { c as resolveCodexAppServerPreparedApiKeyCacheKey, s as resolveCodexAppServerFallbackApiKeyCacheKey, w as retireSharedCodexAppServerClientIfCurrent } from "./auth-cache-key-tENCQOub.mjs";
11
+ import { c as resolveCodexAppServerPreparedApiKeyCacheKey, s as resolveCodexAppServerFallbackApiKeyCacheKey, w as retireSharedCodexAppServerClientIfCurrent } from "./auth-cache-key-BzYrcgwJ.mjs";
12
12
  import { i as withCodexAppServerGitConfig } from "./transport-stdio-CRWTkKOn.mjs";
13
13
  import { o as formatCodexDisplayText } from "./command-formatters-xW9KpoSZ.mjs";
14
14
  import { a as codexPrewriteRejectionCause, i as CodexAppServerScopedRequestRejectedError, r as CodexAppServerRpcError } from "./rpc-error-C98SHchT.mjs";
@@ -18,49 +18,49 @@ import { i as readCodexProviderRefusal, n as extractRawResponseItemText, o as re
18
18
  import { i as readMirrorIdentity, n as attachCodexMirrorIdentity, t as attachCodexAssistantItemIds } from "./upstream-prompt-provenance-Ccd9MFRJ.mjs";
19
19
  import { n as buildCodexAppServerRuntimeFingerprint, r as buildCodexPluginAppCacheKey } from "./plugin-app-cache-key-Bg9DbDI6.mjs";
20
20
  import { i as resolveCodexBindingAppServerConnection, r as requireCodexSupervisionModelSelection, t as assertCodexSessionRuntimeOwnership } from "./binding-connection-B7HAAZSI.mjs";
21
- import { n as requestCodexAppServerClientJson } from "./request-6piO0U_P.mjs";
21
+ import { n as requestCodexAppServerClientJson } from "./request-DInueZ2q.mjs";
22
22
  import { n as canUseCodexModelBackedApprovalsReviewerForModel, r as resolveOpenClawExecPolicyForCodexAppServer } from "./config-C1YVVLEA.mjs";
23
23
  import { a as isCodexDurableCustomMessage, c as resolveCodexContextEngineProjectionMaxChars, i as fitCodexProjectedContextForTurnStart, l as resolveCodexContinuityProjectionMaxChars, n as CodexContextAttachmentError, o as neutralizeCodexExplicitMentionSigils, r as buildCodexContinuityCalibration, s as projectContextEngineAssemblyForCodex, t as CODEX_TURN_START_TEXT_INPUT_MAX_CHARS, u as resolveProjectionPromptBudgetTokens } from "./context-engine-projection-ps-yn_ci.mjs";
24
24
  import { a as buildCodexMirrorIdempotencyKey, i as buildCodexMirrorDedupeIdentity, s as hasCodexMirrorOrigin, t as applyCodexTranscriptTaint } from "./transcript-mirror-attestation-BzUXnrvv.mjs";
25
25
  import { t as readCodexMirroredSessionHistoryMessages } from "./session-history-BO6i_pfk.mjs";
26
26
  import { i as resolveCodexAppServerAuthProfileIdForAgent, r as resolveCodexAppServerAuthProfileId } from "./auth-profile-CgHQ8Vot.mjs";
27
- import { E as isCodexContextRestartSelectionChangedError, H as prepareCodexWorkspaceReferences, I as ensureCodexAppServerClientRuntime, M as getCodexInferenceThreadQualification, U as protectCodexAppServerLiveThread, X as readRecentCodexRateLimits, Y as readCodexRateLimitsRevision, _ as retainSharedCodexAppServerClientIfCurrent, a as clearSharedCodexAppServerClientIfCurrentAndUnclaimed, c as getLeasedSharedCodexAppServerClient, dt as TURN_TERMINAL_SETTLEMENT_TIMEOUT_MS, et as resolveCodexAppServerAuthAccountCacheKey, f as readCodexAppServerClientDesktopGenerationFingerprint, h as releaseLeasedSharedCodexAppServerClient, ht as withCodexStartupTimeout, i as clearSharedCodexAppServerClientIfCurrent, j as getCodexInferenceThread, l as getSharedCodexAppServerClient, lt as CodexAppServerStartupError, mt as resolveCodexStartupTimeoutMs, s as createIsolatedCodexAppServerClient, tt as resolveCodexAppServerPreparedAuthHandoff, u as isCodexAppServerStartSelectionChangedError, ut as TURN_FINALIZE_DRAIN_ABORT_GRACE_MS, w as CodexThreadClientReplacementError, x as CODEX_APP_SERVER_CONTEXT_RESTART_SELECTION_CHANGED } from "./shared-client-BjiqpbC5.mjs";
27
+ import { E as isCodexContextRestartSelectionChangedError, I as ensureCodexAppServerClientRuntime, M as getCodexInferenceThreadQualification, U as prepareCodexWorkspaceReferences, W as protectCodexAppServerLiveThread, X as readCodexRateLimitsRevision, Z as readRecentCodexRateLimits, _ as retainSharedCodexAppServerClientIfCurrent, a as clearSharedCodexAppServerClientIfCurrentAndUnclaimed, c as getLeasedSharedCodexAppServerClient, dt as TURN_FINALIZE_DRAIN_ABORT_GRACE_MS, f as readCodexAppServerClientDesktopGenerationFingerprint, ft as TURN_TERMINAL_SETTLEMENT_TIMEOUT_MS, gt as withCodexStartupTimeout, h as releaseLeasedSharedCodexAppServerClient, ht as resolveCodexStartupTimeoutMs, i as clearSharedCodexAppServerClientIfCurrent, j as getCodexInferenceThread, l as getSharedCodexAppServerClient, nt as resolveCodexAppServerPreparedAuthHandoff, s as createIsolatedCodexAppServerClient, tt as resolveCodexAppServerAuthAccountCacheKey, u as isCodexAppServerStartSelectionChangedError, ut as CodexAppServerStartupError, w as CodexThreadClientReplacementError, x as CODEX_APP_SERVER_CONTEXT_RESTART_SELECTION_CHANGED } from "./shared-client-CCz9ldpr.mjs";
28
28
  import { a as isCodexResponsesOAuthRun, r as isCodexResponsesOAuth } from "./responses-oauth-twnuTaAa.mjs";
29
- import { D as toCodexDynamicToolProgressResponse, E as resolveDynamicToolCallTimeoutMs, L as resolveCodexAppServerClientInstanceId, M as readCodexAppServerWarningMessage, O as toCodexDynamicToolProtocolResponse, P as CODEX_APP_SERVER_OPT_OUT_NOTIFICATION_METHODS, T as handleDynamicToolCallWithTimeout, _ as assertCodexTurnStartResponse, a as isCodexAppServerIndeterminateRequestCancellationError, i as isCodexAppServerConnectionClosedError, l as CodexServerRequestResolvedError, o as isCodexAppServerIndeterminateTransportError, r as isCodexAppServerApprovalRequest, w as createCodexElicitationResponse, x as readCodexTurnCompletedNotification, y as readCodexDynamicToolCallParams } from "./client-zrCKOu_E.mjs";
29
+ import { D as toCodexDynamicToolProgressResponse, E as resolveDynamicToolCallTimeoutMs, L as resolveCodexAppServerClientInstanceId, M as readCodexAppServerWarningMessage, O as toCodexDynamicToolProtocolResponse, P as CODEX_APP_SERVER_OPT_OUT_NOTIFICATION_METHODS, T as handleDynamicToolCallWithTimeout, _ as assertCodexTurnStartResponse, a as isCodexAppServerIndeterminateRequestCancellationError, i as isCodexAppServerConnectionClosedError, l as CodexServerRequestResolvedError, o as isCodexAppServerIndeterminateTransportError, r as isCodexAppServerApprovalRequest, w as createCodexElicitationResponse, x as readCodexTurnCompletedNotification, y as readCodexDynamicToolCallParams } from "./client-aPKNc4Ii.mjs";
30
30
  import { n as isCodexWebSocketOpenFailure } from "./transport-websocket-DIyPfkHo.mjs";
31
- import { S as shouldClearTerminalPresentationForNativeItem, _ as itemName, a as isCodexNotificationForTurn, b as matchesCodexSnapshotTurn, i as CodexProjectionDiagnostics, n as getCodexAppServerTurnRouter, o as readCodexNotificationScope, s as readCodexNotificationThreadId, t as CODEX_APP_SERVER_NATIVE_TURN_WAIT_TIMEOUT_MS, x as shouldAdvancePersistableAssistantBarrier } from "./turn-router-D8DLkZgH.mjs";
32
- import { d as terminateCodexBackgroundTerminals, f as unsubscribeCodexThreadBestEffort, l as retireUnsafeCodexTurnClientBestEffort, n as CODEX_APP_SERVER_UNSUBSCRIBE_TIMEOUT_MS, o as closeCodexStartupClientBestEffort, r as CodexAppServerUnsafeSubscriptionError, s as interruptCodexTurnAndWaitBestEffort, u as shouldRetireCodexStartupClient } from "./attempt-client-cleanup-CxX4cTSi.mjs";
31
+ import { S as shouldClearTerminalPresentationForNativeItem, _ as itemName, a as isCodexNotificationForTurn, b as matchesCodexSnapshotTurn, i as CodexProjectionDiagnostics, n as getCodexAppServerTurnRouter, o as readCodexNotificationScope, s as readCodexNotificationThreadId, t as CODEX_APP_SERVER_NATIVE_TURN_WAIT_TIMEOUT_MS, x as shouldAdvancePersistableAssistantBarrier } from "./turn-router-CSJl3yYQ.mjs";
32
+ import { d as terminateCodexBackgroundTerminals, f as unsubscribeCodexThreadBestEffort, l as retireUnsafeCodexTurnClientBestEffort, n as CODEX_APP_SERVER_UNSUBSCRIBE_TIMEOUT_MS, o as closeCodexStartupClientBestEffort, r as CodexAppServerUnsafeSubscriptionError, s as interruptCodexTurnAndWaitBestEffort, u as shouldRetireCodexStartupClient } from "./attempt-client-cleanup-D3YvP0N7.mjs";
33
33
  import { r as prepareCodexAppServerAuthBinding } from "./auth-binding-BaxlhaNx.mjs";
34
34
  import { a as isRawFunctionToolOutputCompletionNotification, c as readRawResponseToolCallId, i as isCodexTurnAbortMarkerNotification, l as updateActiveTurnItemIds, o as isTerminalTurnStatus, r as completePendingOpenClawDynamicToolNotification, s as readCodexNotificationItem, t as CodexUsageProjection } from "./event-projector-usage-BpKfdoTm.mjs";
35
- import { n as listAllCodexAppServerModels } from "./models-Dph0RqpR.mjs";
35
+ import { n as listAllCodexAppServerModels } from "./models-BB0l-gUb.mjs";
36
36
  import { d as mergeCodexThreadConfigs } from "./project-doc-thread-config-BVcvnps8.mjs";
37
37
  import { B as resolveCodexDynamicToolsLoadingForRuntime, L as isSystemAgentOnlyCodexDynamicToolAllowlist, P as filterCodexDynamicTools, V as joinPresentSections, _ as buildDeveloperInstructions, b as codexDynamicToolsFingerprint, h as resolveCodexWebSearchPlan, k as stabilizeJsonValue, l as isCodexNativeDelegationDisabledForRun, v as areCodexDynamicToolFingerprintsCompatible, w as fingerprintJsonObject, x as codexLegacyDynamicToolsFingerprint } from "./thread-requests-BgzJwJtS.mjs";
38
38
  import { i as resolveCodexSessionBinding, n as createCodexSessionGenerationSupersededError, t as clearCodexBindingForClient } from "./session-binding-JEHNMPsr.mjs";
39
39
  import { i as resolveCodexAppServerThreadModelSelection } from "./thread-model-selection-DcVebr8N.mjs";
40
- import { a as resolveCodexPromptError, i as refreshCodexUsageLimitPromptError, n as formatCodexTurnStartUsageLimitError, r as markCodexAuthProfileBlockedFromRateLimits, t as CodexUsageLimitPromptError } from "./usage-limit-error-BEONfgt-.mjs";
41
- import { c as withExclusiveCodexAppServerThread, r as retainCodexAppServerBindingSubscription, t as isSameCodexAppServerThreadOwner } from "./thread-ownership-5X4197vk.mjs";
40
+ import { a as resolveCodexPromptError, i as refreshCodexUsageLimitPromptError, n as formatCodexTurnStartUsageLimitError, r as markCodexAuthProfileBlockedFromRateLimits, t as CodexUsageLimitPromptError } from "./usage-limit-error-CJoJ_F8V.mjs";
41
+ import { c as withExclusiveCodexAppServerThread, r as retainCodexAppServerBindingSubscription, t as isSameCodexAppServerThreadOwner } from "./thread-ownership-_2e1sjfi.mjs";
42
42
  import { t as persistCodexContextCompactionActivity } from "./context-compaction-activity-CMla5FPJ.mjs";
43
- import { a as CodexToolTranscriptProjection, c as isCodexCommandBearingToolCall, d as sanitizeCodexToolArguments, i as emitCodexAgentEvent, l as resolveCodexToolProgressDetailMode, o as CodexToolProgressProjection, r as CodexEventProjection, s as shouldEmitTranscriptToolProgress, t as codexNativeSubagentMonitorRuntime, u as sanitizeCodexAgentEventRecord } from "./native-subagent-monitor-D5O_o07p.mjs";
44
- import { a as requestPluginApprovalOutcome } from "./plugin-approval-roundtrip-DOQ3Tibe.mjs";
45
- import { n as CodexThreadPolicyHandoffError, s as restoreCodexThreadInstructionsAfterCompaction } from "./thread-policy-BEecBTJM.mjs";
43
+ import { a as CodexToolTranscriptProjection, c as isCodexCommandBearingToolCall, d as sanitizeCodexToolArguments, i as emitCodexAgentEvent, l as resolveCodexToolProgressDetailMode, o as CodexToolProgressProjection, r as CodexEventProjection, s as shouldEmitTranscriptToolProgress, t as codexNativeSubagentMonitorRuntime, u as sanitizeCodexAgentEventRecord } from "./native-subagent-monitor-DC4clzAD.mjs";
44
+ import { a as requestPluginApprovalOutcome } from "./plugin-approval-roundtrip-68FoMlaZ.mjs";
45
+ import { n as CodexThreadPolicyHandoffError, s as restoreCodexThreadInstructionsAfterCompaction } from "./thread-policy-CLTwg3ZA.mjs";
46
46
  import { t as attemptTerminal } from "./attempt-terminal-jO5IMj9K.mjs";
47
47
  import { a as runCodexAgentEndHook, c as withCodexAppServerFastModeServiceTier, i as reportCodexBackgroundCleanupFailure, n as ensureCodexWorkspaceDirOnce, o as runCodexCleanupStep, r as estimateCodexAppServerProjectedTurnTokens, s as shouldKeepCodexSharedAbortOpen, t as emitCodexAppServerEvent } from "./run-attempt-lifecycle-KN4oh-7O.mjs";
48
48
  import { t as CODEX_INFERENCE_GENERATION_KEY } from "./inference-metadata-DCvcG_N_.mjs";
49
49
  import "./inference-context-DNlGwzwy.mjs";
50
50
  import { i as createAssistantReasoningMessage, n as createAssistantCommentaryMessage, r as createAssistantMessage, t as createAssistantAsyncMessage } from "./event-projector-assistant-message-CLMKN4x-.mjs";
51
- import { a as resolveCodexExternalSandboxPolicyForOpenClawSandbox, c as shouldEnableCodexAppServerNativeToolSurface, i as resolveCodexAppServerHookChannelId, l as shouldRequireCodexSandboxExecServerEnvironment, o as resolveCodexMessageToolProvider, p as mapCodexAppServerRemoteWorkspacePath, r as resolveCodexAppServerExecutionCwd, s as resolveCodexSandboxEnvironmentSelection, t as buildDynamicTools, u as shouldWarnCodexDynamicToolBuildStageSummary } from "./dynamic-tool-build-BMiiFROa.mjs";
52
- import { a as buildCodexNativeHookRelayDisabledConfig, d as scheduleCodexNativeHookRelayUnregister, i as buildCodexNativeHookRelayConfig, l as resolveCodexNativeHookRelayEvents, n as CodexManagedHooksOnlyError, r as assertCodexNativeHookRelayAllowed, s as createCodexNativeHookRelay, t as CODEX_NATIVE_HOOK_RELAY_TTL_GRACE_MS, u as resolveCodexNativeHookRelayTtlMs } from "./native-hook-relay-CSZpcjwq.mjs";
53
- import { a as prepareCodexPluginThreadConfigStartupProvider, c as buildLegacyScheduledCodexAppRecoveryPrompt, d as resolveScheduledCodexAppCreatorCaptureDecision, i as isContextEngineBindingCompatible, l as buildScheduledCodexAppServerConnectionIdentity, n as isCodexAppServerProfilerEnabled, o as resolveCodexPluginThreadConfigStartupPolicy, r as buildContextEngineBinding, s as assertScheduledCodexAppAuthorityRuntime, t as startOrResumeThread, u as captureScheduledCodexAppAuthority } from "./thread-lifecycle-run-BWy0LDLB.mjs";
51
+ import { a as resolveCodexExternalSandboxPolicyForOpenClawSandbox, c as shouldEnableCodexAppServerNativeToolSurface, i as resolveCodexAppServerHookChannelId, l as shouldRequireCodexSandboxExecServerEnvironment, o as resolveCodexMessageToolProvider, p as mapCodexAppServerRemoteWorkspacePath, r as resolveCodexAppServerExecutionCwd, s as resolveCodexSandboxEnvironmentSelection, t as buildDynamicTools, u as shouldWarnCodexDynamicToolBuildStageSummary } from "./dynamic-tool-build-DKko0Jjw.mjs";
52
+ import { a as buildCodexNativeHookRelayDisabledConfig, d as scheduleCodexNativeHookRelayUnregister, i as buildCodexNativeHookRelayConfig, l as resolveCodexNativeHookRelayEvents, n as CodexManagedHooksOnlyError, r as assertCodexNativeHookRelayAllowed, s as createCodexNativeHookRelay, t as CODEX_NATIVE_HOOK_RELAY_TTL_GRACE_MS, u as resolveCodexNativeHookRelayTtlMs } from "./native-hook-relay-DQzvuJ-W.mjs";
53
+ import { a as prepareCodexPluginThreadConfigStartupProvider, c as buildLegacyScheduledCodexAppRecoveryPrompt, d as resolveScheduledCodexAppCreatorCaptureDecision, i as isContextEngineBindingCompatible, l as buildScheduledCodexAppServerConnectionIdentity, n as isCodexAppServerProfilerEnabled, o as resolveCodexPluginThreadConfigStartupPolicy, r as buildContextEngineBinding, s as assertScheduledCodexAppAuthorityRuntime, t as startOrResumeThread, u as captureScheduledCodexAppAuthority } from "./thread-lifecycle-run-CxVfnkG-.mjs";
54
54
  import { i as resolveCodexSessionPermissionCwd, n as applyCodexSessionPermissionPolicy, r as resolveCodexEffectiveSessionPermissionPolicy } from "./session-permission-policy-CD2MAWU8.mjs";
55
- import { o as hasCodexNativeToolCatalog, s as loadCodexNativeToolCatalog } from "./native-skill-isolation-BAatEJZb.mjs";
56
- import { r as prepareCodexNativeMcpFormResourceContext, t as createCodexNativeMcpAppResultDetailsPreparer } from "./native-mcp-app-CDrrBaTE.mjs";
57
- import { _ as invalidateCodexComputerFrame, a as handleCodexAppServerApprovalRequest, c as createCodexNativePreToolUseFailureBuffer, f as buildTurnCollaborationMode, g as buildCodexUserInput, h as readCodexRetainedBackgroundCommands, i as createCodexDynamicToolDiagnostics, l as buildCodexHistoryProvenancePrefix, m as CodexNativeProcessAuthority, n as projectCodexExecutableDynamicTools, o as ensureCodexSandboxExecServerEnvironment, p as buildTurnStartParams, r as routeCodexAppServerElicitationRequest, s as releaseCodexSandboxExecServerEnvironment, t as createCodexDynamicToolBridge, u as buildCodexParentLocalInstructions, v as createCodexRemoteWorkspaceFileReader, y as CodexNativeToolLifecycleProjector } from "./dynamic-tools-DPPHrGKB.mjs";
55
+ import { o as hasCodexNativeToolCatalog, s as loadCodexNativeToolCatalog } from "./native-skill-isolation-DoRxgQPX.mjs";
56
+ import { r as prepareCodexNativeMcpFormResourceContext, t as createCodexNativeMcpAppResultDetailsPreparer } from "./native-mcp-app-UkwXOBfS.mjs";
57
+ import { _ as invalidateCodexComputerFrame, a as handleCodexAppServerApprovalRequest, c as createCodexNativePreToolUseFailureBuffer, f as buildTurnCollaborationMode, g as buildCodexUserInput, h as readCodexRetainedBackgroundCommands, i as createCodexDynamicToolDiagnostics, l as buildCodexHistoryProvenancePrefix, m as CodexNativeProcessAuthority, n as projectCodexExecutableDynamicTools, o as ensureCodexSandboxExecServerEnvironment, p as buildTurnStartParams, r as routeCodexAppServerElicitationRequest, s as releaseCodexSandboxExecServerEnvironment, t as createCodexDynamicToolBridge, u as buildCodexParentLocalInstructions, v as createCodexRemoteWorkspaceFileReader, y as CodexNativeToolLifecycleProjector } from "./dynamic-tools-8hqa1jVc.mjs";
58
58
  import { c as promptSnapshot, i as mirrorPromptAtTurnStartBestEffort, n as createCodexAppServerUserMessagePersistenceNotifier, o as buildCodexUserPromptMessage, s as buildResolvedCodexUserPromptMessage, t as codexTranscriptMirrorRuntime } from "./transcript-mirror-Bee2o6jj.mjs";
59
59
  import { t as resolveCodexAppServerForModelProvider } from "./app-server-policy-D_zv8J7V.mjs";
60
60
  import { a as getCodexContextFileDisplayBasename, i as getCodexContextFileBasename, n as CODEX_NATIVE_PROJECT_DOC_BASENAMES, o as isNonEmptyString, r as buildCodexWorkspaceBootstrapContext, s as normalizeCodexContextFilePath } from "./attempt-workspace-context-CcwP3DA3.mjs";
61
61
  import { n as captureCodexSettledTurnFinalizationContext } from "./settled-turn-context-BPL6D3RO.mjs";
62
- import { t as resolveCodexProviderWebSearchSupport } from "./provider-capabilities-DtJKxDf6.mjs";
63
- import { a as runCodexComputerUseLiveTest, i as createComputerUseRequest, t as ensureCodexComputerUse } from "./computer-use-CeF5GuCX.mjs";
62
+ import { t as resolveCodexProviderWebSearchSupport } from "./provider-capabilities-DWH29sy3.mjs";
63
+ import { a as runCodexComputerUseLiveTest, i as createComputerUseRequest, t as ensureCodexComputerUse } from "./computer-use-C6yYfm6-.mjs";
64
64
  import { asOptionalRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalString, readNonBlankString, readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
65
65
  import { createHash, randomUUID } from "node:crypto";
66
66
  import { isDeepStrictEqual } from "node:util";
@@ -2175,6 +2175,11 @@ var CodexAppServerEventProjector = class extends CodexTurnProjection {
2175
2175
  await this.reasoningProjection.maybeEndReasoning();
2176
2176
  }
2177
2177
  async recordCompletedItemContent(item, notification) {
2178
+ const streamed = item?.type === "agentMessage" ? this.assistantProjection.assistantTextByItem.get(item.id) : void 0;
2179
+ if (streamed && typeof item?.text === "string" && item.text.startsWith(streamed)) await this.assistantProjection.handleAssistantDelta({
2180
+ itemId: item.id,
2181
+ delta: item.text.slice(streamed.length)
2182
+ });
2178
2183
  const asyncMessage = this.assistantProjection.recordItemCompleted(item, notification && {
2179
2184
  ...notification,
2180
2185
  activeItemIds: this.activeItemIds
@@ -1,11 +1,11 @@
1
1
  import { c as MAX_CWD_LENGTH, d as boundedCatalogString } from "./session-catalog-parsing-DkeoVn60.mjs";
2
- import { n as defineCodexBuildState } from "./build-state-CMYRQ_We.mjs";
2
+ import { n as defineCodexBuildState } from "./build-state-sjOWPg_o.mjs";
3
3
  import { r as inferCodexAppServerConnectionClass } from "./config-security-clxAZYWX.mjs";
4
4
  import { n as resolveCodexAppServerLocalHomeDir } from "./auth-start-options-BPIPeEX8.mjs";
5
5
  import { n as codexCatalogHomeIdFromCanonicalPath } from "./session-catalog-home-id-vlih0B_g.mjs";
6
6
  import { t as buildCodexAppServerConnectionFingerprint } from "./plugin-app-cache-key-Bg9DbDI6.mjs";
7
- import { n as codexCatalogSourceForClient, o as observeCodexCatalogEphemeralThreads } from "./session-catalog-source-CdPqS9sa.mjs";
8
- import { r as projectCodexCatalogNativeThread } from "./session-catalog-native-projection-4CsufcT8.mjs";
7
+ import { n as codexCatalogSourceForClient, o as observeCodexCatalogEphemeralThreads } from "./session-catalog-source-yQpy2Y6b.mjs";
8
+ import { r as projectCodexCatalogNativeThread } from "./session-catalog-native-projection-BY2zMkMO.mjs";
9
9
  import { createHash } from "node:crypto";
10
10
  import { embeddedAgentLog } from "openclaw/plugin-sdk/agent-harness-registration";
11
11
  import path from "node:path";
@@ -2,11 +2,11 @@ import { S as readControlCursor, _ as normalizeLimit, c as MAX_CWD_LENGTH, d as
2
2
  import { n as detachCodexCatalogString, t as CODEX_CATALOG_MAX_ROWS } from "./session-catalog-limits-BynIoOYm.mjs";
3
3
  import { i as retainCodexCatalogRow, n as codexCatalogRowRecency, r as compareCodexCatalogRows, t as CodexCatalogOrdering } from "./session-catalog-index-order-CTfoefow.mjs";
4
4
  import { c as CodexCatalogPersistence, i as CodexCatalogAvailability, l as codexCatalogMetadataPage, r as withCodexCatalogListRequest } from "./session-catalog-list-request-D4MYNgDB.mjs";
5
- import { a as hasLiveCodexCatalogSource, c as setCodexCatalogSource, i as getCodexCatalogSource } from "./session-catalog-source-CdPqS9sa.mjs";
6
- import { r as projectCodexCatalogNativeThread } from "./session-catalog-native-projection-4CsufcT8.mjs";
7
- import { i as subscribeCodexCatalogEvents } from "./session-catalog-events-BziNSfLx.mjs";
5
+ import { a as hasLiveCodexCatalogSource, c as setCodexCatalogSource, i as getCodexCatalogSource } from "./session-catalog-source-yQpy2Y6b.mjs";
6
+ import { r as projectCodexCatalogNativeThread } from "./session-catalog-native-projection-BY2zMkMO.mjs";
7
+ import { i as subscribeCodexCatalogEvents } from "./session-catalog-events-DujfzcAY.mjs";
8
8
  import { a as reportCodexCatalogSpawnFailure, n as findCodexAppServerSpawnError } from "./spawn-error-CL3n6MAa.mjs";
9
- import { CodexCatalogProjectionCapacityError, CodexCatalogProjections, mergeCodexCatalogRolloutRow, n as readCodexCatalogRollout, projectCodexCatalogPage, r as resolveCodexCatalogRolloutFingerprint, t as codexCatalogRolloutLogicalPath } from "./session-catalog-projection-CcIdJdsd.mjs";
9
+ import { CodexCatalogProjectionCapacityError, CodexCatalogProjections, mergeCodexCatalogRolloutRow, n as readCodexCatalogRollout, projectCodexCatalogPage, r as resolveCodexCatalogRolloutFingerprint, t as codexCatalogRolloutLogicalPath } from "./session-catalog-projection-BTXOyzl_.mjs";
10
10
  import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
11
11
  import { createHash } from "node:crypto";
12
12
  import { isDeepStrictEqual } from "node:util";
@@ -1,7 +1,7 @@
1
1
  import { D as selectCodexCatalogPreviewInput, c as MAX_CWD_LENGTH, d as boundedCatalogString, k as truncateCodexCatalogPreview } from "./session-catalog-parsing-DkeoVn60.mjs";
2
2
  import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
3
3
  import { n as detachCodexCatalogString } from "./session-catalog-limits-BynIoOYm.mjs";
4
- import { r as copyCodexCatalogSource } from "./session-catalog-source-CdPqS9sa.mjs";
4
+ import { r as copyCodexCatalogSource } from "./session-catalog-source-yQpy2Y6b.mjs";
5
5
  import { t as __exportAll } from "./session-binding-sidecars-DD-enC8w.mjs";
6
6
  import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
7
7
  //#region extensions/codex/src/session-catalog-native-projection.ts
@@ -2,7 +2,7 @@ import { D as selectCodexCatalogPreviewInput, O as toCatalogSession, S as readCo
2
2
  import { n as detachCodexCatalogString } from "./session-catalog-limits-BynIoOYm.mjs";
3
3
  import { n as codexCatalogRowRecency } from "./session-catalog-index-order-CTfoefow.mjs";
4
4
  import { t as isOpenClawManagedCodexThread } from "./session-catalog-provenance-CmsOE5mh.mjs";
5
- import { c as setCodexCatalogSource, i as getCodexCatalogSource, r as copyCodexCatalogSource } from "./session-catalog-source-CdPqS9sa.mjs";
5
+ import { c as setCodexCatalogSource, i as getCodexCatalogSource, r as copyCodexCatalogSource } from "./session-catalog-source-yQpy2Y6b.mjs";
6
6
  import { asFiniteNumber, isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
7
7
  import path from "node:path";
8
8
  import fs from "node:fs/promises";
@@ -1,4 +1,4 @@
1
- import { n as defineCodexBuildState } from "./build-state-CMYRQ_We.mjs";
1
+ import { n as defineCodexBuildState } from "./build-state-sjOWPg_o.mjs";
2
2
  //#region extensions/codex/src/session-catalog-source.ts
3
3
  function hasLiveCodexCatalogSource(sources) {
4
4
  for (const source of sources) if (!source.closed) return true;
@@ -1,9 +1,9 @@
1
- import { S as retainSharedCodexAppServerClientByInstanceId } from "./auth-cache-key-tENCQOub.mjs";
1
+ import { S as retainSharedCodexAppServerClientByInstanceId } from "./auth-cache-key-BzYrcgwJ.mjs";
2
2
  import { t as withCodexAppServerThreadMutation } from "./thread-ownership-queue-CeyYScUC.mjs";
3
- import { G as releaseCodexAppServerLiveThread, R as hasCodexAppServerLiveThread, V as isCodexAppServerLiveThreadClaimed } from "./shared-client-BjiqpbC5.mjs";
4
- import { f as unsubscribeCodexThreadBestEffort, n as CODEX_APP_SERVER_UNSUBSCRIBE_TIMEOUT_MS, o as closeCodexStartupClientBestEffort, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-CxX4cTSi.mjs";
5
- import { t as isSameCodexAppServerThreadOwner } from "./thread-ownership-5X4197vk.mjs";
6
- import { t as codexNativeSubagentMonitorRuntime } from "./native-subagent-monitor-D5O_o07p.mjs";
3
+ import { K as releaseCodexAppServerLiveThread, R as hasCodexAppServerLiveThread, V as isCodexAppServerLiveThreadClaimed } from "./shared-client-CCz9ldpr.mjs";
4
+ import { f as unsubscribeCodexThreadBestEffort, n as CODEX_APP_SERVER_UNSUBSCRIBE_TIMEOUT_MS, o as closeCodexStartupClientBestEffort, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-D3YvP0N7.mjs";
5
+ import { t as isSameCodexAppServerThreadOwner } from "./thread-ownership-_2e1sjfi.mjs";
6
+ import { t as codexNativeSubagentMonitorRuntime } from "./native-subagent-monitor-DC4clzAD.mjs";
7
7
  import { t as getCodexSessionInitializationRollback } from "./session-initialization-Bi_2DKhc.mjs";
8
8
  import { isIncognitoSessionKey } from "openclaw/plugin-sdk/session-key-runtime";
9
9
  import { isNativeSessionDeletionUnresolved, wrapNativeSessionDeletionMutation } from "openclaw/plugin-sdk/agent-harness-session-runtime";
@@ -1,8 +1,8 @@
1
1
  import { i as readMirrorIdentity, n as attachCodexMirrorIdentity } from "./upstream-prompt-provenance-Ccd9MFRJ.mjs";
2
2
  import { l as readCodexMirrorSourceFingerprint, o as fingerprintCodexMirrorSourceMessage } from "./transcript-mirror-attestation-BzUXnrvv.mjs";
3
- import { tt as resolveCodexAppServerPreparedAuthHandoff } from "./shared-client-BjiqpbC5.mjs";
4
- import { f as assertCodexPassiveTurnItems } from "./client-zrCKOu_E.mjs";
5
- import { runBoundedCodexAppServerTurn } from "./bounded-turn-DxtRqV8t.mjs";
3
+ import { nt as resolveCodexAppServerPreparedAuthHandoff } from "./shared-client-CCz9ldpr.mjs";
4
+ import { f as assertCodexPassiveTurnItems } from "./client-aPKNc4Ii.mjs";
5
+ import { runBoundedCodexAppServerTurn } from "./bounded-turn-BmChqNaK.mjs";
6
6
  import { t as resolveCodexLocalRuntimeAttribution } from "./local-runtime-attribution-CZz2DJ4q.mjs";
7
7
  import { t as resolveCodexBoundedTurnIsolation } from "./bounded-turn-isolation-BfDAo-qZ.mjs";
8
8
  import { a as createAttributedCodexAssistantMessage } from "./event-projector-assistant-message-CLMKN4x-.mjs";
@@ -1,21 +1,21 @@
1
1
  import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
2
- import { n as defineCodexBuildState, t as codexBuildSymbol } from "./build-state-CMYRQ_We.mjs";
2
+ import { n as defineCodexBuildState, t as codexBuildSymbol } from "./build-state-sjOWPg_o.mjs";
3
3
  import { t as CODEX_APP_SERVER_AUTH_PROVIDER } from "./auth-profile-selection-hr8ocLtz.mjs";
4
4
  import { n as isCodexAppServerProxyLaunch } from "./launch-args-DbFCehO7.mjs";
5
5
  import { a as withEphemeralCodexAuthStore, i as withClearedEnvironmentVariables, n as resolveCodexAppServerLocalHomeDir, r as resolveCodexAppServerUserHomeDir, t as resolveCodexAppServerHomeDir } from "./auth-start-options-BPIPeEX8.mjs";
6
6
  import { a as resolveCodexAppServerStartOptionsForAgent, d as readCodexEffectiveConfig, o as resolveCodexComputerUseConfig, t as codexAppServerStartOptionsKey, u as CODEX_SESSION_OVERRIDABLE_LAYER_TYPES } from "./config-options-DDzeNQ8m.mjs";
7
7
  import { d as resolveMacOSDesktopCodexBundledMarketplaceCandidates, f as resolveMacOSDesktopCodexComputerUseServiceAppCandidates, i as resolveManagedCodexNativeCommand, l as resolveFirstExistingMacOSDesktopCodexBundledMarketplacePath, r as resolveManagedCodexAppServerStartOptions, t as isManagedCodexDesktopCommand, u as resolveMacOSDesktopCodexAppPathCandidates } from "./managed-binary-BtIjV7yN.mjs";
8
- import { A as waitForCodexDesktopGeneration, C as retirePendingSharedClientEntryIfUnclaimed, D as waitForUnclaimedSharedClientStartup, _ as observeSharedClientAcquire, a as readCodexCliAuthFileApiKey, b as releaseSharedClientEntry, c as resolveCodexAppServerPreparedApiKeyCacheKey, d as getCurrentSharedClientEntry, f as getOrCreateSharedClientEntry, g as observeAcquire, h as notifyDesktopGenerationDrainChecks, i as fingerprintTokenAuthProfileCacheKey, j as readCodexDesktopArtifactTreeFingerprint, k as isCodexDesktopGenerationCurrent, l as closeSharedClientEntryIfUnclaimed, n as CODEX_AUTH_JSON_FILENAME, o as readFirstNonEmptyEnv, p as getSharedCodexAppServerClientState, r as fingerprintApiKeyAuthProfileCacheKey, s as resolveCodexAppServerFallbackApiKeyCacheKey, t as CODEX_APP_SERVER_API_KEY_ENV_VARS, u as createCodexAppServerStartupLifetime, v as ownCodexStartup, w as retireSharedCodexAppServerClientIfCurrent, x as retainSharedClientEntry, y as recordSharedClientAcquireBoundary } from "./auth-cache-key-tENCQOub.mjs";
8
+ import { A as waitForCodexDesktopGeneration, C as retirePendingSharedClientEntryIfUnclaimed, D as waitForUnclaimedSharedClientStartup, _ as observeSharedClientAcquire, a as readCodexCliAuthFileApiKey, b as releaseSharedClientEntry, c as resolveCodexAppServerPreparedApiKeyCacheKey, d as getCurrentSharedClientEntry, f as getOrCreateSharedClientEntry, g as observeAcquire, h as notifyDesktopGenerationDrainChecks, i as fingerprintTokenAuthProfileCacheKey, j as readCodexDesktopArtifactTreeFingerprint, k as isCodexDesktopGenerationCurrent, l as closeSharedClientEntryIfUnclaimed, n as CODEX_AUTH_JSON_FILENAME, o as readFirstNonEmptyEnv, p as getSharedCodexAppServerClientState, r as fingerprintApiKeyAuthProfileCacheKey, s as resolveCodexAppServerFallbackApiKeyCacheKey, t as CODEX_APP_SERVER_API_KEY_ENV_VARS, u as createCodexAppServerStartupLifetime, v as ownCodexStartup, w as retireSharedCodexAppServerClientIfCurrent, x as retainSharedClientEntry, y as recordSharedClientAcquireBoundary } from "./auth-cache-key-BzYrcgwJ.mjs";
9
9
  import { n as resolveCodexAppServerSpawnEnv } from "./transport-stdio-CRWTkKOn.mjs";
10
10
  import { n as CodexAppServerAuthProfileUnavailableError, r as formatCodexAuthProfileUnavailableMessage } from "./auth-profile-recovery-BREezV0L.mjs";
11
11
  import { a as codexPrewriteRejectionCause } from "./rpc-error-C98SHchT.mjs";
12
12
  import { i as withTimeout } from "./timeout-D0mEWSGG.mjs";
13
13
  import { n as readCodexSessionMeta } from "./session-catalog-provenance-CmsOE5mh.mjs";
14
- import { n as observeCodexCatalogClient } from "./session-catalog-events-BziNSfLx.mjs";
14
+ import { n as observeCodexCatalogClient } from "./session-catalog-events-DujfzcAY.mjs";
15
15
  import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-DWzK-k0n.mjs";
16
16
  import { a as resolveCodexAppServerAuthProfileStore, i as resolveCodexAppServerAuthProfileIdForAgent, r as resolveCodexAppServerAuthProfileId, t as isCodexAppServerNativeAuthProfile } from "./auth-profile-CgHQ8Vot.mjs";
17
17
  import { i as isCodexResponsesOAuthCredential, n as createCodexResponsesOAuth, o as resolveCodexResponsesOAuthProfileFingerprint, r as isCodexResponsesOAuth, t as CODEX_RESPONSES_OAUTH_PROVIDER } from "./responses-oauth-twnuTaAa.mjs";
18
- import { N as isUnsupportedCodexAppServerVersionError, t as CodexAppServerClient } from "./client-zrCKOu_E.mjs";
18
+ import { N as isUnsupportedCodexAppServerVersionError, t as CodexAppServerClient } from "./client-aPKNc4Ii.mjs";
19
19
  import { n as isCodexWebSocketOpenFailure } from "./transport-websocket-DIyPfkHo.mjs";
20
20
  import { t as __exportAll } from "./session-binding-sidecars-DD-enC8w.mjs";
21
21
  import { asOptionalRecord, isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
@@ -2137,6 +2137,11 @@ function isCodexAppServerLiveThreadClaimed(client, threadId) {
2137
2137
  const runtime = configuredClients.get(client);
2138
2138
  return runtime !== void 0 && !runtime.closed && runtime.claimedThreads.has(threadId);
2139
2139
  }
2140
+ /** Native commands and children can still need an otherwise-idle subscription. */
2141
+ function isCodexAppServerLiveThreadProtected(client, threadId) {
2142
+ const runtime = configuredClients.get(client);
2143
+ return runtime !== void 0 && !runtime.closed && runtime.protectedThreads.has(threadId);
2144
+ }
2140
2145
  function hasCodexAppServerSiblingThreadWork(client, threadId) {
2141
2146
  return hasSiblingThreadWork(configuredClients.get(client), threadId);
2142
2147
  }
@@ -2481,7 +2486,7 @@ async function prepareCodexInferenceRoute(params) {
2481
2486
  }
2482
2487
  pending = Promise.all([
2483
2488
  import("./inference-proxy-BDWV0djM.mjs"),
2484
- import("./native-subagent-monitor-D5O_o07p.mjs").then((n) => n.n),
2489
+ import("./native-subagent-monitor-DC4clzAD.mjs").then((n) => n.n),
2485
2490
  import("./inference-dispatch-CO6tTs4q.mjs")
2486
2491
  ]).then(([{ createCodexInferenceProxy }, native, { createCodexInferenceModelBinding }]) => {
2487
2492
  assertClient();
@@ -3550,4 +3555,4 @@ function clearSharedCodexAppServerClientIfCurrentAndUnclaimed(client) {
3550
3555
  };
3551
3556
  }
3552
3557
  //#endregion
3553
- export { reconcileCodexComputerUseStartArtifacts as $, bindCodexInferenceThread as A, isCodexAppServerClientRuntimeLive as B, CodexThreadBindingConflictError as C, nativeHookRelayUnregisterQueue as D, isCodexContextRestartSelectionChangedError as E, consumeCodexAppServerLiveThread as F, releaseCodexAppServerLiveThread as G, prepareCodexWorkspaceReferences as H, ensureCodexAppServerClientRuntime as I, unsubscribeCodexAppServerLiveThread as J, retainCodexAppServerLiveThread as K, forgetCodexWorkspaceReferences as L, getCodexInferenceThreadQualification as M, prepareCodexInferenceThreadConfig as N, acquireCodexNativeConfigFence as O, claimCodexAppServerLiveThread as P, createCodexEphemeralThreadPolicy as Q, hasCodexAppServerLiveThread as R, CodexAdoptedThreadActiveError as S, CodexThreadStartRequestError as T, protectCodexAppServerLiveThread as U, isCodexAppServerLiveThreadClaimed as V, readCodexClientSessionMeta as W, readRecentCodexRateLimits as X, readCodexRateLimitsRevision as Y, rememberCodexRateLimitsRead as Z, retainSharedCodexAppServerClientIfCurrent as _, clearSharedCodexAppServerClientIfCurrentAndUnclaimed as a, isLegacyCodexComputerUsePluginDisabled as at, withLeasedCodexAppServerClientStartSelectionRetry as b, getLeasedSharedCodexAppServerClient as c, assertNotSymlink as ct, readCodexAppServerClientDesktopGeneration as d, TURN_TERMINAL_SETTLEMENT_TIMEOUT_MS as dt, resolveCodexAppServerAuthAccountCacheKey as et, readCodexAppServerClientDesktopGenerationFingerprint as f, isCodexAppServerStartupError as ft, resolveCodexNativeConfigFenceKey as g, releaseLeasedSharedCodexAppServerClient as h, withCodexStartupTimeout as ht, clearSharedCodexAppServerClientIfCurrent as i, hasLegacyCodexComputerUseMcpPolicy as it, getCodexInferenceThread as j, assertCodexInferenceRouteConfig as k, getSharedCodexAppServerClient as l, CodexAppServerStartupError as lt, releaseCodexAppServerClientLease as m, resolveCodexStartupTimeoutMs as mt, captureCodexAppServerClientLifetime as n, resolveBundledComputerUseMarketplacePath as nt, clearSharedCodexAppServerClientIfCurrentAndWait as o, resolveManagedCodexComputerUseConfig as ot, readCodexAppServerClientProcessIdentity as p, resolveCodexGatewayTimeoutWithGraceMs as pt, revertCodexAppServerLiveThreadInstructions as q, captureSharedCodexAppServerCatalogLifetime as r, resolveClientManagedBundledMarketplacePath as rt, createIsolatedCodexAppServerClient as s, ensureCodexComputerUseSharedPluginCache as st, assertCodexAppServerClientStartSelectionCurrent as t, resolveCodexAppServerPreparedAuthHandoff as tt, isCodexAppServerStartSelectionChangedError as u, TURN_FINALIZE_DRAIN_ABORT_GRACE_MS as ut, shared_client_exports as v, CodexThreadClientReplacementError as w, CODEX_APP_SERVER_CONTEXT_RESTART_SELECTION_CHANGED as x, waitForCodexAppServerClientDesktopGenerationDrain as y, hasCodexAppServerSiblingThreadWork as z };
3558
+ export { createCodexEphemeralThreadPolicy as $, bindCodexInferenceThread as A, isCodexAppServerClientRuntimeLive as B, CodexThreadBindingConflictError as C, nativeHookRelayUnregisterQueue as D, isCodexContextRestartSelectionChangedError as E, consumeCodexAppServerLiveThread as F, readCodexClientSessionMeta as G, isCodexAppServerLiveThreadProtected as H, ensureCodexAppServerClientRuntime as I, revertCodexAppServerLiveThreadInstructions as J, releaseCodexAppServerLiveThread as K, forgetCodexWorkspaceReferences as L, getCodexInferenceThreadQualification as M, prepareCodexInferenceThreadConfig as N, acquireCodexNativeConfigFence as O, claimCodexAppServerLiveThread as P, rememberCodexRateLimitsRead as Q, hasCodexAppServerLiveThread as R, CodexAdoptedThreadActiveError as S, CodexThreadStartRequestError as T, prepareCodexWorkspaceReferences as U, isCodexAppServerLiveThreadClaimed as V, protectCodexAppServerLiveThread as W, readCodexRateLimitsRevision as X, unsubscribeCodexAppServerLiveThread as Y, readRecentCodexRateLimits as Z, retainSharedCodexAppServerClientIfCurrent as _, clearSharedCodexAppServerClientIfCurrentAndUnclaimed as a, hasLegacyCodexComputerUseMcpPolicy as at, withLeasedCodexAppServerClientStartSelectionRetry as b, getLeasedSharedCodexAppServerClient as c, ensureCodexComputerUseSharedPluginCache as ct, readCodexAppServerClientDesktopGeneration as d, TURN_FINALIZE_DRAIN_ABORT_GRACE_MS as dt, reconcileCodexComputerUseStartArtifacts as et, readCodexAppServerClientDesktopGenerationFingerprint as f, TURN_TERMINAL_SETTLEMENT_TIMEOUT_MS as ft, resolveCodexNativeConfigFenceKey as g, withCodexStartupTimeout as gt, releaseLeasedSharedCodexAppServerClient as h, resolveCodexStartupTimeoutMs as ht, clearSharedCodexAppServerClientIfCurrent as i, resolveClientManagedBundledMarketplacePath as it, getCodexInferenceThread as j, assertCodexInferenceRouteConfig as k, getSharedCodexAppServerClient as l, assertNotSymlink as lt, releaseCodexAppServerClientLease as m, resolveCodexGatewayTimeoutWithGraceMs as mt, captureCodexAppServerClientLifetime as n, resolveCodexAppServerPreparedAuthHandoff as nt, clearSharedCodexAppServerClientIfCurrentAndWait as o, isLegacyCodexComputerUsePluginDisabled as ot, readCodexAppServerClientProcessIdentity as p, isCodexAppServerStartupError as pt, retainCodexAppServerLiveThread as q, captureSharedCodexAppServerCatalogLifetime as r, resolveBundledComputerUseMarketplacePath as rt, createIsolatedCodexAppServerClient as s, resolveManagedCodexComputerUseConfig as st, assertCodexAppServerClientStartSelectionCurrent as t, resolveCodexAppServerAuthAccountCacheKey as tt, isCodexAppServerStartSelectionChangedError as u, CodexAppServerStartupError as ut, shared_client_exports as v, CodexThreadClientReplacementError as w, CODEX_APP_SERVER_CONTEXT_RESTART_SELECTION_CHANGED as x, waitForCodexAppServerClientDesktopGenerationDrain as y, hasCodexAppServerSiblingThreadWork as z };
@@ -6,24 +6,24 @@ import { i as resolveCodexAppServerHomeScope, l as resolveCodexModelBackedReview
6
6
  import { n as formatCodexUsageLimitErrorMessage } from "./rate-limits-CI8pTPqL.mjs";
7
7
  import { i as resolveCodexBindingAppServerConnection, r as requireCodexSupervisionModelSelection } from "./binding-connection-B7HAAZSI.mjs";
8
8
  import { n as canUseCodexModelBackedApprovalsReviewerForModel, r as resolveOpenClawExecPolicyForCodexAppServer } from "./config-C1YVVLEA.mjs";
9
- import { X as readRecentCodexRateLimits, b as withLeasedCodexAppServerClientStartSelectionRetry, c as getLeasedSharedCodexAppServerClient, m as releaseCodexAppServerClientLease, tt as resolveCodexAppServerPreparedAuthHandoff } from "./shared-client-BjiqpbC5.mjs";
10
- import { E as resolveDynamicToolCallTimeoutMs, O as toCodexDynamicToolProtocolResponse, T as handleDynamicToolCallWithTimeout, _ as assertCodexTurnStartResponse, a as isCodexAppServerIndeterminateRequestCancellationError, k as resolveCodexToolAbortTerminalReason, m as assertCodexThreadForkResponse, r as isCodexAppServerApprovalRequest, w as createCodexElicitationResponse, y as readCodexDynamicToolCallParams } from "./client-zrCKOu_E.mjs";
11
- import { d as terminateCodexBackgroundTerminals, f as unsubscribeCodexThreadBestEffort, l as retireUnsafeCodexTurnClientBestEffort, s as interruptCodexTurnAndWaitBestEffort } from "./attempt-client-cleanup-CxX4cTSi.mjs";
12
- import { t as CodexEphemeralTurn } from "./ephemeral-turn-Dk0wWoqi.mjs";
9
+ import { Z as readRecentCodexRateLimits, b as withLeasedCodexAppServerClientStartSelectionRetry, c as getLeasedSharedCodexAppServerClient, m as releaseCodexAppServerClientLease, nt as resolveCodexAppServerPreparedAuthHandoff } from "./shared-client-CCz9ldpr.mjs";
10
+ import { E as resolveDynamicToolCallTimeoutMs, O as toCodexDynamicToolProtocolResponse, T as handleDynamicToolCallWithTimeout, _ as assertCodexTurnStartResponse, a as isCodexAppServerIndeterminateRequestCancellationError, k as resolveCodexToolAbortTerminalReason, m as assertCodexThreadForkResponse, r as isCodexAppServerApprovalRequest, w as createCodexElicitationResponse, y as readCodexDynamicToolCallParams } from "./client-aPKNc4Ii.mjs";
11
+ import { d as terminateCodexBackgroundTerminals, f as unsubscribeCodexThreadBestEffort, l as retireUnsafeCodexTurnClientBestEffort, s as interruptCodexTurnAndWaitBestEffort } from "./attempt-client-cleanup-D3YvP0N7.mjs";
12
+ import { t as CodexEphemeralTurn } from "./ephemeral-turn-DAlEbytF.mjs";
13
13
  import { d as mergeCodexThreadConfigs, f as refreshCodexPluginAppApprovalPolicy } from "./project-doc-thread-config-BVcvnps8.mjs";
14
14
  import { n as resolveCodexAppServerReasoningEffort, t as readCodexSupportedReasoningEfforts } from "./reasoning-effort-CS9kKWB9.mjs";
15
15
  import { h as resolveCodexWebSearchPlan, r as buildCodexRuntimeThreadConfig, z as resolveCodexDynamicToolsLoading } from "./thread-requests-BgzJwJtS.mjs";
16
16
  import { i as resolveCodexSessionBinding } from "./session-binding-JEHNMPsr.mjs";
17
17
  import { i as resolveCodexAppServerThreadModelSelection, t as CODEX_NATIVE_PERSONALITY_NONE } from "./thread-model-selection-DcVebr8N.mjs";
18
18
  import { t as resolveCodexNativeExecutionBlock } from "./sandbox-guard-DIImwCy1.mjs";
19
- import { i as assertCodexSupervisionThreadLineage, n as CodexThreadPolicyHandoffError, o as refreshCodexThreadPolicy } from "./thread-policy-BEecBTJM.mjs";
19
+ import { i as assertCodexSupervisionThreadLineage, n as CodexThreadPolicyHandoffError, o as refreshCodexThreadPolicy } from "./thread-policy-CLTwg3ZA.mjs";
20
20
  import { o as runCodexCleanupStep } from "./run-attempt-lifecycle-KN4oh-7O.mjs";
21
- import { a as resolveCodexExternalSandboxPolicyForOpenClawSandbox, c as shouldEnableCodexAppServerNativeToolSurface, l as shouldRequireCodexSandboxExecServerEnvironment, o as resolveCodexMessageToolProvider, s as resolveCodexSandboxEnvironmentSelection, t as buildDynamicTools } from "./dynamic-tool-build-BMiiFROa.mjs";
22
- import { a as buildCodexNativeHookRelayDisabledConfig, i as buildCodexNativeHookRelayConfig, l as resolveCodexNativeHookRelayEvents, u as resolveCodexNativeHookRelayTtlMs } from "./native-hook-relay-CSZpcjwq.mjs";
21
+ import { a as resolveCodexExternalSandboxPolicyForOpenClawSandbox, c as shouldEnableCodexAppServerNativeToolSurface, l as shouldRequireCodexSandboxExecServerEnvironment, o as resolveCodexMessageToolProvider, s as resolveCodexSandboxEnvironmentSelection, t as buildDynamicTools } from "./dynamic-tool-build-DKko0Jjw.mjs";
22
+ import { a as buildCodexNativeHookRelayDisabledConfig, i as buildCodexNativeHookRelayConfig, l as resolveCodexNativeHookRelayEvents, u as resolveCodexNativeHookRelayTtlMs } from "./native-hook-relay-DQzvuJ-W.mjs";
23
23
  import { i as resolveCodexSessionPermissionCwd, n as applyCodexSessionPermissionPolicy, r as resolveCodexEffectiveSessionPermissionPolicy, t as CODEX_SESSION_PERMISSION_EXEC_MODES } from "./session-permission-policy-CD2MAWU8.mjs";
24
- import { a as handleCodexAppServerApprovalRequest, c as createCodexNativePreToolUseFailureBuffer, d as buildCodexTemporalAdditionalContext, g as buildCodexUserInput, i as createCodexDynamicToolDiagnostics, o as ensureCodexSandboxExecServerEnvironment, r as routeCodexAppServerElicitationRequest, s as releaseCodexSandboxExecServerEnvironment, t as createCodexDynamicToolBridge, y as CodexNativeToolLifecycleProjector } from "./dynamic-tools-DPPHrGKB.mjs";
24
+ import { a as handleCodexAppServerApprovalRequest, c as createCodexNativePreToolUseFailureBuffer, d as buildCodexTemporalAdditionalContext, g as buildCodexUserInput, i as createCodexDynamicToolDiagnostics, o as ensureCodexSandboxExecServerEnvironment, r as routeCodexAppServerElicitationRequest, s as releaseCodexSandboxExecServerEnvironment, t as createCodexDynamicToolBridge, y as CodexNativeToolLifecycleProjector } from "./dynamic-tools-8hqa1jVc.mjs";
25
25
  import { t as resolveCodexAppServerForModelProvider } from "./app-server-policy-D_zv8J7V.mjs";
26
- import { n as resolveCodexProviderWebSearchSupportForClient } from "./provider-capabilities-DtJKxDf6.mjs";
26
+ import { n as resolveCodexProviderWebSearchSupportForClient } from "./provider-capabilities-DWH29sy3.mjs";
27
27
  import { readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
28
28
  import { randomUUID } from "node:crypto";
29
29
  import { isDeepStrictEqual } from "node:util";
@@ -1,5 +1,5 @@
1
1
  import { a as defaultCodexAppInventoryCache, r as buildCodexPluginAppCacheKey } from "./plugin-app-cache-key-Bg9DbDI6.mjs";
2
- import { a as withCodexAppServerJsonClient } from "./request-6piO0U_P.mjs";
2
+ import { a as withCodexAppServerJsonClient } from "./request-DInueZ2q.mjs";
3
3
  import { a as marketplaceRef, o as pluginReadParams, r as isOpenAiCuratedMarketplaceName, u as CODEX_PLUGINS_MARKETPLACE_NAME } from "./plugin-inventory-CYgdo14P.mjs";
4
4
  import "./config-C1YVVLEA.mjs";
5
5
  import { t as __exportAll } from "./session-binding-sidecars-DD-enC8w.mjs";
@@ -5,7 +5,7 @@ import { l as fingerprintCodexPolicy } from "./config-security-clxAZYWX.mjs";
5
5
  import { f as resolveCodexPluginsPolicy } from "./config-parsing-DsWSCPHO.mjs";
6
6
  import { n as resolveCodexAppServerLocalHomeDir, t as resolveCodexAppServerHomeDir } from "./auth-start-options-BPIPeEX8.mjs";
7
7
  import { d as readCodexEffectiveConfig, s as assertCodexModelBackedReviewerEffectiveConfig, u as CODEX_SESSION_OVERRIDABLE_LAYER_TYPES } from "./config-options-DDzeNQ8m.mjs";
8
- import { S as retainSharedCodexAppServerClientByInstanceId, d as getCurrentSharedClientEntry } from "./auth-cache-key-tENCQOub.mjs";
8
+ import { S as retainSharedCodexAppServerClientByInstanceId, d as getCurrentSharedClientEntry } from "./auth-cache-key-BzYrcgwJ.mjs";
9
9
  import { t as withCodexAppServerThreadMutation } from "./thread-ownership-queue-CeyYScUC.mjs";
10
10
  import { o as isCodexAppServerOverloadError, r as CodexAppServerRpcError, s as isCodexThreadReadMissingError } from "./rpc-error-C98SHchT.mjs";
11
11
  import { t as codexCatalogHomeId } from "./session-catalog-home-id-vlih0B_g.mjs";
@@ -18,22 +18,22 @@ import { c as resolveRecoverableCodexPluginConfigKeys } from "./plugin-inventory
18
18
  import "./config-C1YVVLEA.mjs";
19
19
  import { c as resolveCodexContextEngineProjectionMaxChars } from "./context-engine-projection-ps-yn_ci.mjs";
20
20
  import { n as normalizeCodexAppServerBindingModelProvider } from "./auth-profile-CgHQ8Vot.mjs";
21
- import { A as bindCodexInferenceThread, B as isCodexAppServerClientRuntimeLive, C as CodexThreadBindingConflictError, F as consumeCodexAppServerLiveThread, G as releaseCodexAppServerLiveThread, J as unsubscribeCodexAppServerLiveThread, M as getCodexInferenceThreadQualification, N as prepareCodexInferenceThreadConfig, Q as createCodexEphemeralThreadPolicy, S as CodexAdoptedThreadActiveError, T as CodexThreadStartRequestError, V as isCodexAppServerLiveThreadClaimed, j as getCodexInferenceThread, k as assertCodexInferenceRouteConfig, n as captureCodexAppServerClientLifetime, w as CodexThreadClientReplacementError, z as hasCodexAppServerSiblingThreadWork } from "./shared-client-BjiqpbC5.mjs";
22
- import { C as resolveCodexThreadRolloutPath, F as getCodexAppServerClientInstanceId, L as resolveCodexAppServerClientInstanceId, S as readSupervisionResponseThreadId, c as isCodexAppServerRequestTimeoutError, g as assertCodexThreadStartResponse, m as assertCodexThreadForkResponse, p as assertCodexThreadAcceptsDirectInput, v as assertExactSupervisionModelSelection } from "./client-zrCKOu_E.mjs";
23
- import { r as hasCodexAppServerSiblingRouteWork } from "./turn-router-D8DLkZgH.mjs";
24
- import { f as unsubscribeCodexThreadBestEffort, l as retireUnsafeCodexTurnClientBestEffort, n as CODEX_APP_SERVER_UNSUBSCRIBE_TIMEOUT_MS, o as closeCodexStartupClientBestEffort, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-CxX4cTSi.mjs";
21
+ import { $ as createCodexEphemeralThreadPolicy, A as bindCodexInferenceThread, B as isCodexAppServerClientRuntimeLive, C as CodexThreadBindingConflictError, F as consumeCodexAppServerLiveThread, H as isCodexAppServerLiveThreadProtected, K as releaseCodexAppServerLiveThread, M as getCodexInferenceThreadQualification, N as prepareCodexInferenceThreadConfig, S as CodexAdoptedThreadActiveError, T as CodexThreadStartRequestError, V as isCodexAppServerLiveThreadClaimed, Y as unsubscribeCodexAppServerLiveThread, j as getCodexInferenceThread, k as assertCodexInferenceRouteConfig, n as captureCodexAppServerClientLifetime, w as CodexThreadClientReplacementError, z as hasCodexAppServerSiblingThreadWork } from "./shared-client-CCz9ldpr.mjs";
22
+ import { C as resolveCodexThreadRolloutPath, F as getCodexAppServerClientInstanceId, L as resolveCodexAppServerClientInstanceId, S as readSupervisionResponseThreadId, c as isCodexAppServerRequestTimeoutError, g as assertCodexThreadStartResponse, m as assertCodexThreadForkResponse, p as assertCodexThreadAcceptsDirectInput, v as assertExactSupervisionModelSelection } from "./client-aPKNc4Ii.mjs";
23
+ import { r as hasCodexAppServerSiblingRouteWork } from "./turn-router-CSJl3yYQ.mjs";
24
+ import { f as unsubscribeCodexThreadBestEffort, l as retireUnsafeCodexTurnClientBestEffort, n as CODEX_APP_SERVER_UNSUBSCRIBE_TIMEOUT_MS, o as closeCodexStartupClientBestEffort, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-D3YvP0N7.mjs";
25
25
  import { a as buildCodexPluginThreadConfigInputFingerprint, c as buildPluginAppPolicyContext, d as mergeCodexThreadConfigs, i as buildCodexPluginThreadConfig, l as disableUnlistedCodexApps, m as buildCodexAppApprovalOverrides, n as mergeCodexNativeProjectDocThreadConfig, o as buildCodexPluginThreadConfigTimeoutFallback, p as shouldBuildCodexPluginThreadConfig, r as buildCodexPluginAppsConfigPatchFromPolicyContext, u as isCodexPluginThreadBindingStale } from "./project-doc-thread-config-BVcvnps8.mjs";
26
26
  import { A as isTransientWebSearchRestriction, C as fingerprintEnvironmentSelection, D as readActiveCodexTurnIdsFromResume, E as legacyFingerprintUserMcpServersConfigPatch, I as isMessageOnlyCodexSourceReply, L as isSystemAgentOnlyCodexDynamicToolAllowlist, M as shouldRotateCodexAppServerBindingForRuntime, N as shouldRotateCodexGpt56MultiAgentBinding, O as shouldStartTransientNoToolThread, S as fingerprintCodexThreadConfig, T as fingerprintUserMcpServersConfigPatch, _ as buildDeveloperInstructions, b as codexDynamicToolsFingerprint, c as codexThreadSandboxOrPermissions, d as readCodexManagedRequirementsFingerprint, f as resolveCodexThreadApprovalsReviewer, g as mergeCodexNativeShellEnvironment, h as resolveCodexWebSearchPlan, i as buildCodexRuntimeThreadConfigForRun, j as shouldRecheckRecoverablePluginBinding, n as buildCodexRingZeroThreadConfigPatch, o as buildThreadResumeParams, p as attestCodexRestrictedToolSurfaceMcpServersDisabled, s as buildThreadStartParams, t as assertCodexManagedRequirementsDoNotOverrideToolPolicy, u as readCodexInheritedMcpServerNames, v as areCodexDynamicToolFingerprintsCompatible, w as fingerprintJsonObject, x as codexLegacyDynamicToolsFingerprint, y as areUserMcpServersFingerprintsCompatible } from "./thread-requests-BgzJwJtS.mjs";
27
27
  import { i as resolveCodexSessionBinding, o as hashCodexAppServerBindingFingerprint } from "./session-binding-JEHNMPsr.mjs";
28
28
  import { i as resolveCodexAppServerThreadModelSelection, n as resolveCodexAppServerModelProvider } from "./thread-model-selection-DcVebr8N.mjs";
29
- import { c as withExclusiveCodexAppServerThread, r as retainCodexAppServerBindingSubscription, t as isSameCodexAppServerThreadOwner } from "./thread-ownership-5X4197vk.mjs";
30
- import { a as refreshCodexThreadInstructions, i as assertCodexSupervisionThreadLineage, n as CodexThreadPolicyHandoffError, o as refreshCodexThreadPolicy, r as assertAdoptedCodexThreadResumeAllowed, t as CodexIncognitoPolicyChangeError } from "./thread-policy-BEecBTJM.mjs";
31
- import { t as resumeCodexAppServerThread } from "./thread-resume-BXY_6o6Z.mjs";
29
+ import { c as withExclusiveCodexAppServerThread, r as retainCodexAppServerBindingSubscription, t as isSameCodexAppServerThreadOwner } from "./thread-ownership-_2e1sjfi.mjs";
30
+ import { a as refreshCodexThreadInstructions, i as assertCodexSupervisionThreadLineage, n as CodexThreadPolicyHandoffError, o as refreshCodexThreadPolicy, r as assertAdoptedCodexThreadResumeAllowed, t as CodexIncognitoPolicyChangeError } from "./thread-policy-CLTwg3ZA.mjs";
31
+ import { t as resumeCodexAppServerThread } from "./thread-resume-C6qsk8_o.mjs";
32
32
  import { r as readCodexMcpToolConnectorId } from "./mcp-tool-metadata-DW41snf3.mjs";
33
- import { n as disableCodexPluginThreadConfig } from "./dynamic-tool-build-BMiiFROa.mjs";
34
- import { n as CodexManagedHooksOnlyError, r as assertCodexNativeHookRelayAllowed } from "./native-hook-relay-CSZpcjwq.mjs";
33
+ import { n as disableCodexPluginThreadConfig } from "./dynamic-tool-build-DKko0Jjw.mjs";
34
+ import { n as CodexManagedHooksOnlyError, r as assertCodexNativeHookRelayAllowed } from "./native-hook-relay-DQzvuJ-W.mjs";
35
35
  import { t as defaultCodexPluginMetadataCache } from "./plugin-metadata-cache-Bi8TAPwX.mjs";
36
- import { a as discardUnattestedCodexPluginThread, i as checkCodexThreadAppAvailability, n as resolveCodexNativeSkillIsolation, o as hasCodexNativeToolCatalog, r as attestCodexThreadToolSurface, s as loadCodexNativeToolCatalog, t as applyCodexNativeSkillIsolation } from "./native-skill-isolation-BAatEJZb.mjs";
36
+ import { a as discardUnattestedCodexPluginThread, i as checkCodexThreadAppAvailability, n as resolveCodexNativeSkillIsolation, o as hasCodexNativeToolCatalog, r as attestCodexThreadToolSurface, s as loadCodexNativeToolCatalog, t as applyCodexNativeSkillIsolation } from "./native-skill-isolation-DoRxgQPX.mjs";
37
37
  import { asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
38
38
  import crypto from "node:crypto";
39
39
  import { isDeepStrictEqual } from "node:util";
@@ -1220,7 +1220,7 @@ async function releaseCodexBoundLiveThread(options) {
1220
1220
  if (changedClient && !previous) return false;
1221
1221
  const client = previous?.client ?? options.client;
1222
1222
  try {
1223
- if (isCodexAppServerLiveThreadClaimed(client, options.threadId)) throw new Error(`Codex thread ${options.threadId} is claimed by active work; stop it first.`);
1223
+ if (isCodexAppServerLiveThreadClaimed(client, options.threadId) || isCodexAppServerLiveThreadProtected(client, options.threadId)) throw new Error(`Codex thread ${options.threadId} is claimed by active work; stop it first.`);
1224
1224
  return await releaseCodexRetainedLiveThread({
1225
1225
  ...options,
1226
1226
  client,
@@ -1232,7 +1232,7 @@ async function releaseCodexBoundLiveThread(options) {
1232
1232
  } : void 0
1233
1233
  });
1234
1234
  } finally {
1235
- const retiredExit = previous?.release(!isCodexAppServerLiveThreadClaimed(client, options.threadId));
1235
+ const retiredExit = previous?.release(!isCodexAppServerLiveThreadClaimed(client, options.threadId) && !isCodexAppServerLiveThreadProtected(client, options.threadId));
1236
1236
  if (retiredExit) await racePromiseWithAbortSignal(retiredExit, options.signal, codexThreadLifecycleAbortError);
1237
1237
  }
1238
1238
  }
@@ -1276,6 +1276,33 @@ async function tryReuseCodexLiveThread(options) {
1276
1276
  let ownershipTransferred = false;
1277
1277
  let preserveSubscription = false;
1278
1278
  let nativeThread;
1279
+ const cleanup = async (retainSubscription, ownership = retainedThread) => {
1280
+ let failure;
1281
+ try {
1282
+ let pendingRetention;
1283
+ if (retainSubscription) {
1284
+ const retain = () => {
1285
+ assertWarmOwner();
1286
+ if (isSameCodexAppServerThreadOwner(params.bindingStore.read(bindingIdentity), binding)) pendingRetention = retainCodexAppServerBindingSubscription(params.client, binding.threadId, ownership);
1287
+ };
1288
+ try {
1289
+ if (params.authority) await params.authority.withCurrent(retain);
1290
+ else retain();
1291
+ } catch {}
1292
+ }
1293
+ if (pendingRetention) {
1294
+ if (!await pendingRetention) failure = { cause: /* @__PURE__ */ new Error("Codex live thread ownership could not be returned to its session") };
1295
+ } else await retainedThread.release(binding.threadId);
1296
+ } catch (cause) {
1297
+ failure = { cause };
1298
+ }
1299
+ if (failure) await abandonCodexLiveThreadRelease({
1300
+ client: params.client,
1301
+ abandonClient: params.abandonClient,
1302
+ lifecycleTiming,
1303
+ threadId: binding.threadId
1304
+ }, failure.cause);
1305
+ };
1279
1306
  try {
1280
1307
  assertWarmOwner();
1281
1308
  if (binding.preserveNativeModel || binding.connectionScope === "supervision") {
@@ -1294,7 +1321,10 @@ async function tryReuseCodexLiveThread(options) {
1294
1321
  }
1295
1322
  const pluginThreadConfig = await options.buildLoadedPluginThreadConfig(binding);
1296
1323
  assertWarmOwner();
1297
- if (pluginThreadConfig && pluginThreadConfig.fingerprint !== binding.pluginAppsFingerprint) return { kind: "rotate" };
1324
+ if (pluginThreadConfig && pluginThreadConfig.fingerprint !== binding.pluginAppsFingerprint) {
1325
+ preserveSubscription = true;
1326
+ return { kind: "rotate" };
1327
+ }
1298
1328
  const prebuiltFinalConfigPatch = await prepareCodexThreadFinalConfigPatch(params, options.nativeModelInputTools, binding);
1299
1329
  const pluginAppsConfigPatch = pluginThreadConfig?.configPatch ?? (params.pluginThreadConfig?.enabled && binding.pluginAppPolicyContext ? buildCodexPluginAppsConfigPatchFromPolicyContext(binding.pluginAppPolicyContext) : void 0);
1300
1330
  const resumeAuthProfileId = binding.connectionScope === "supervision" ? void 0 : params.params.authProfileId ?? binding.authProfileId;
@@ -1369,50 +1399,30 @@ async function tryReuseCodexLiveThread(options) {
1369
1399
  threadId: binding.threadId,
1370
1400
  action: "resumed"
1371
1401
  });
1402
+ const liveThreadEphemeralPolicy = ephemeralPolicy && {
1403
+ ...ephemeralPolicy,
1404
+ refreshableInstructions: params.refreshableInstructions
1405
+ };
1372
1406
  ownershipTransferred = true;
1373
1407
  return {
1374
1408
  kind: "ready",
1409
+ cleanupOnFailure: () => cleanup(isCodexAppServerLiveThreadProtected(params.client, binding.threadId), {
1410
+ ...retainedThread,
1411
+ configFingerprint: liveThreadConfigFingerprint,
1412
+ ephemeralPolicy: liveThreadEphemeralPolicy
1413
+ }),
1375
1414
  binding: {
1376
1415
  ...binding,
1377
1416
  ...!incognito ? bindingPatch : {},
1378
1417
  liveThreadConfigFingerprint,
1379
- liveThreadEphemeralPolicy: ephemeralPolicy && {
1380
- ...ephemeralPolicy,
1381
- refreshableInstructions: params.refreshableInstructions
1382
- },
1418
+ liveThreadEphemeralPolicy,
1383
1419
  liveThreadOwnership: retainedThread,
1384
1420
  ...!incognito && retainedThread.serviceTier && resumeParams.serviceTier === void 0 ? { clearInheritedServiceTier: true } : {},
1385
1421
  lifecycle: { action: "resumed" }
1386
1422
  }
1387
1423
  };
1388
1424
  } finally {
1389
- if (!ownershipTransferred) {
1390
- let failure;
1391
- try {
1392
- let pendingRetention;
1393
- if (preserveSubscription) {
1394
- const retain = () => {
1395
- assertWarmOwner();
1396
- if (isSameCodexAppServerThreadOwner(params.bindingStore.read(bindingIdentity), binding)) pendingRetention = retainCodexAppServerBindingSubscription(params.client, binding.threadId, retainedThread);
1397
- };
1398
- try {
1399
- if (params.authority) await params.authority.withCurrent(retain);
1400
- else retain();
1401
- } catch {}
1402
- }
1403
- if (pendingRetention) {
1404
- if (!await pendingRetention) failure = { cause: /* @__PURE__ */ new Error("Codex live thread ownership could not be returned to its session") };
1405
- } else await retainedThread.release(binding.threadId);
1406
- } catch (cause) {
1407
- failure = { cause };
1408
- }
1409
- if (failure) await abandonCodexLiveThreadRelease({
1410
- client: params.client,
1411
- abandonClient: params.abandonClient,
1412
- lifecycleTiming,
1413
- threadId: binding.threadId
1414
- }, failure.cause);
1415
- }
1425
+ if (!ownershipTransferred) await cleanup(preserveSubscription);
1416
1426
  }
1417
1427
  }
1418
1428
  //#endregion
@@ -1879,7 +1889,8 @@ async function recoverPendingSupervisionArtifacts(params, pending) {
1879
1889
  async function startOrResumeThread(input) {
1880
1890
  const incognito = isIncognitoSessionKey(input.params.sessionKey);
1881
1891
  const clientId = resolveCodexAppServerClientInstanceId(input.client);
1882
- return await withCodexThreadLifecycleBinding(input, async (bindingIdentity, saved, authority) => {
1892
+ let cleanupWarmBinding;
1893
+ const prep = withCodexThreadLifecycleBinding(input, async (bindingIdentity, saved, authority) => {
1883
1894
  const assert = authority.assertCurrent;
1884
1895
  const params = {
1885
1896
  ...input,
@@ -2143,7 +2154,10 @@ async function startOrResumeThread(input) {
2143
2154
  clientId,
2144
2155
  buildLoadedPluginThreadConfig
2145
2156
  });
2146
- if (warmReuse.kind === "ready") return publishCodexThreadInferenceBinding(params, warmReuse.binding, true);
2157
+ if (warmReuse.kind === "ready") {
2158
+ cleanupWarmBinding = warmReuse.cleanupOnFailure;
2159
+ return publishCodexThreadInferenceBinding(params, warmReuse.binding, true);
2160
+ }
2147
2161
  if (incognito || warmReuse.kind === "rotate") {
2148
2162
  throwIfAborted();
2149
2163
  stageBindingReplacement(incognito ? "rotating an unavailable ephemeral thread binding" : "rotating a stale plugin app binding");
@@ -2178,6 +2192,16 @@ async function startOrResumeThread(input) {
2178
2192
  if (replacementPredecessor && !preserveExistingBinding && configuredMcpOwnershipChanged) await releaseRetainedThread(replacementPredecessor.threadId, replacementPredecessor.clientId);
2179
2193
  return publishCodexThreadInferenceBinding(params, started);
2180
2194
  });
2195
+ try {
2196
+ return await prep;
2197
+ } catch (error) {
2198
+ if (cleanupWarmBinding) try {
2199
+ await cleanupWarmBinding();
2200
+ } catch (releaseError) {
2201
+ throw new AggregateError([error, releaseError], "Codex warm thread preparation and subscription cleanup failed", { cause: releaseError });
2202
+ }
2203
+ throw error;
2204
+ }
2181
2205
  }
2182
2206
  //#endregion
2183
2207
  export { prepareCodexPluginThreadConfigStartupProvider as a, buildLegacyScheduledCodexAppRecoveryPrompt as c, resolveScheduledCodexAppCreatorCaptureDecision as d, isContextEngineBindingCompatible as i, buildScheduledCodexAppServerConnectionIdentity as l, isCodexAppServerProfilerEnabled as n, resolveCodexPluginThreadConfigStartupPolicy as o, buildContextEngineBinding as r, assertScheduledCodexAppAuthorityRuntime as s, startOrResumeThread as t, captureScheduledCodexAppAuthority as u };
@@ -1,7 +1,7 @@
1
- import { S as retainSharedCodexAppServerClientByInstanceId } from "./auth-cache-key-tENCQOub.mjs";
1
+ import { S as retainSharedCodexAppServerClientByInstanceId } from "./auth-cache-key-BzYrcgwJ.mjs";
2
2
  import { t as withCodexAppServerThreadMutation } from "./thread-ownership-queue-CeyYScUC.mjs";
3
- import { G as releaseCodexAppServerLiveThread, K as retainCodexAppServerLiveThread, V as isCodexAppServerLiveThreadClaimed } from "./shared-client-BjiqpbC5.mjs";
4
- import { f as unsubscribeCodexThreadBestEffort, o as closeCodexStartupClientBestEffort, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-CxX4cTSi.mjs";
3
+ import { K as releaseCodexAppServerLiveThread, V as isCodexAppServerLiveThreadClaimed, q as retainCodexAppServerLiveThread } from "./shared-client-CCz9ldpr.mjs";
4
+ import { f as unsubscribeCodexThreadBestEffort, o as closeCodexStartupClientBestEffort, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-D3YvP0N7.mjs";
5
5
  import { t as __exportAll } from "./session-binding-sidecars-DD-enC8w.mjs";
6
6
  import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
7
7
  import { runWithAsyncWorkResources } from "openclaw/plugin-sdk/agent-harness-tool-runtime";
@@ -1,7 +1,7 @@
1
1
  import { i as CodexAppServerScopedRequestRejectedError, o as isCodexAppServerOverloadError } from "./rpc-error-C98SHchT.mjs";
2
- import { n as requestCodexAppServerClientJson } from "./request-6piO0U_P.mjs";
3
- import { S as CodexAdoptedThreadActiveError } from "./shared-client-BjiqpbC5.mjs";
4
- import { p as assertCodexThreadAcceptsDirectInput, s as isCodexAppServerPrewriteRequestCancellationError } from "./client-zrCKOu_E.mjs";
2
+ import { n as requestCodexAppServerClientJson } from "./request-DInueZ2q.mjs";
3
+ import { S as CodexAdoptedThreadActiveError } from "./shared-client-CCz9ldpr.mjs";
4
+ import { p as assertCodexThreadAcceptsDirectInput, s as isCodexAppServerPrewriteRequestCancellationError } from "./client-aPKNc4Ii.mjs";
5
5
  import { AgentHarnessPreflightError, embeddedAgentLog, formatErrorMessage } from "openclaw/plugin-sdk/agent-harness-runtime";
6
6
  //#region extensions/codex/src/app-server/thread-policy.ts
7
7
  /** A refusal, not a failed native write: the ephemeral conversation must stay alive. */