@openclaw/codex 2026.10.1-beta.2 → 2026.10.2

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 (60) hide show
  1. package/dist/.setup/{account-usage-runtime-DGqFpAud.mjs → account-usage-runtime-DPXsyONK.mjs} +1 -1
  2. package/dist/.setup/{apply-CXTudl9p.mjs → apply-CQ3brq3z.mjs} +4 -4
  3. package/dist/.setup/{attempt-client-cleanup-BH0hW2xU.mjs → attempt-client-cleanup-DPUGAWP2.mjs} +4 -4
  4. package/dist/.setup/{attempt-workspace-context-BY0jprWJ.mjs → attempt-workspace-context-GllQy8mw.mjs} +1 -1
  5. package/dist/.setup/{auth-cache-key-CGm0UJOr.mjs → auth-cache-key-BE1HXsNo.mjs} +1 -1
  6. package/dist/.setup/{bounded-turn-pGsfXcmH.mjs → bounded-turn-9YflG60n.mjs} +9 -9
  7. package/dist/.setup/{build-state-CqQnsg7T.mjs → build-state-LS-A65iX.mjs} +1 -1
  8. package/dist/.setup/{client-C8lgBOoO.mjs → client-ChJtGEdJ.mjs} +2 -2
  9. package/dist/.setup/{client-catalog-response-Bqp7WG51.mjs → client-catalog-response-BprQziLV.mjs} +1 -1
  10. package/dist/.setup/{command-dispatch-DhBbFIQ5.mjs → command-dispatch-BoC9hvFs.mjs} +1 -1
  11. package/dist/.setup/{command-handlers-ztOOzm6O.mjs → command-handlers-BVX2quUD.mjs} +11 -11
  12. package/dist/.setup/{command-rpc-CuC5fPom.mjs → command-rpc-M4gYsRiV.mjs} +6 -6
  13. package/dist/.setup/{compact-tUb9AYfH.mjs → compact-D3JNLG_b.mjs} +9 -9
  14. package/dist/.setup/{computer-use-BBN9y326.mjs → computer-use-CF0jsDi1.mjs} +4 -4
  15. package/dist/.setup/{conversation-binding-B3MNMVzb.mjs → conversation-binding-7kceEUf0.mjs} +10 -10
  16. package/dist/.setup/{conversation-control-CYsMlCuE.mjs → conversation-control-BpJpPo0t.mjs} +2 -2
  17. package/dist/.setup/{dynamic-tool-build-C8xGEXmR.mjs → dynamic-tool-build-BCi00feJ.mjs} +2 -2
  18. package/dist/.setup/{dynamic-tools-DyERJnR6.mjs → dynamic-tools-DUv6Sr6h.mjs} +15 -7
  19. package/dist/.setup/{effective-mcp-catalog-C26Mio5l.mjs → effective-mcp-catalog-CIdbHp1t.mjs} +4 -4
  20. package/dist/.setup/{ephemeral-turn-D8VcDTNo.mjs → ephemeral-turn-U4th15a6.mjs} +2 -2
  21. package/dist/.setup/{event-projector-assistant-message-BN7CNUB5.mjs → event-projector-assistant-message-BwG5TUYW.mjs} +1 -1
  22. package/dist/.setup/{isolated-completion-C0jrcplS.mjs → isolated-completion-C6QKyyDS.mjs} +4 -4
  23. package/dist/.setup/{mcp-app-session-preparation-BxN0_CYe.mjs → mcp-app-session-preparation-JFCtSkRp.mjs} +5 -5
  24. package/dist/.setup/{model-catalog-DZyNeDKG.mjs → model-catalog-DD-evckc.mjs} +26 -19
  25. package/dist/.setup/{models-DSseKSMg.mjs → models-DaW-7tld.mjs} +3 -3
  26. package/dist/.setup/{native-mcp-app-CqcPVmhH.mjs → native-mcp-app-ChpyWmL-.mjs} +4 -4
  27. package/dist/.setup/{native-subagent-monitor-BUYOUp9X.mjs → native-subagent-monitor-wh_-K3Vo.mjs} +6 -6
  28. package/dist/.setup/{plan-BJ37d2Og.mjs → plan-CUHSuL6_.mjs} +2 -2
  29. package/dist/.setup/{plugin-approval-roundtrip-CuahdPLC.mjs → plugin-approval-roundtrip-bPQbG8BI.mjs} +1 -1
  30. package/dist/.setup/{plugin-thread-config-deadline-B8LGaZNW.mjs → plugin-thread-config-deadline-C5i1S6RN.mjs} +3 -3
  31. package/dist/.setup/{provider-BnwHVD_z.mjs → provider-Ct6-1lsF.mjs} +4 -4
  32. package/dist/.setup/{provider-capabilities-D68Whix6.mjs → provider-capabilities-DhkeeHJd.mjs} +1 -1
  33. package/dist/.setup/{request-jSbhc1sg.mjs → request-CZkKkN6c.mjs} +1 -1
  34. package/dist/.setup/{run-attempt-BLDZeYLD.mjs → run-attempt-C6-678kR.mjs} +34 -23
  35. package/dist/.setup/{session-catalog-events-Bdjw9HEn.mjs → session-catalog-events-Cj-b2FpC.mjs} +2 -2
  36. package/dist/.setup/{session-catalog-index-DufISKJ6.mjs → session-catalog-index-BnvC43eZ.mjs} +3 -3
  37. package/dist/.setup/{session-catalog-native-projection-D6IiLtMb.mjs → session-catalog-native-projection-DCtsWKSF.mjs} +1 -1
  38. package/dist/.setup/{session-catalog-projection-8aHNwzWD.mjs → session-catalog-projection-Cn0bLb-d.mjs} +1 -1
  39. package/dist/.setup/{session-retirement-Czbchv_O.mjs → session-retirement-Bo81t4Fb.mjs} +5 -5
  40. package/dist/.setup/{settled-turn-finalizer-DjZsIwbZ.mjs → settled-turn-finalizer-CFARFqNd.mjs} +5 -5
  41. package/dist/.setup/{shared-client-qhyYWbew.mjs → shared-client-5NUq43f3.mjs} +13 -7
  42. package/dist/.setup/{shell-dynamic-tools-D3Brj3g9.mjs → shell-dynamic-tools-Bmedt1QE.mjs} +1 -1
  43. package/dist/.setup/{side-question-D3NJlgbl.mjs → side-question-oTlegAz3.mjs} +10 -10
  44. package/dist/.setup/{source-BYu0T780.mjs → source-1cabQi3x.mjs} +1 -1
  45. package/dist/.setup/{thread-lifecycle-Cbz_7ySv.mjs → thread-lifecycle--EPPTNTe.mjs} +19 -15
  46. package/dist/.setup/{thread-ownership-DwuSrt3s.mjs → thread-ownership-T7T_iffm.mjs} +3 -3
  47. package/dist/.setup/{thread-policy-DoNxbhqt.mjs → thread-policy-VtqLex1l.mjs} +3 -3
  48. package/dist/.setup/{thread-requests-CL1e8Wmx.mjs → thread-requests-Bj_Lixmv.mjs} +4 -4
  49. package/dist/.setup/{thread-resume-BT6NHMkM.mjs → thread-resume-buZujRcC.mjs} +4 -4
  50. package/dist/.setup/{turn-router-sS69wYnI.mjs → turn-router-BOKSJmfw.mjs} +1 -1
  51. package/dist/.setup/{upstream-session-fork-ChSld66u.mjs → upstream-session-fork-C4sbIoZb.mjs} +9 -9
  52. package/dist/.setup/{usage-D8e8Xiqf.mjs → usage-Cq21xTMZ.mjs} +1 -1
  53. package/dist/.setup/{usage-limit-error-GbT-5NcW.mjs → usage-limit-error-CGJUoQu8.mjs} +1 -1
  54. package/dist/.setup/{web-search-provider.runtime-dL2GD1Kl.mjs → web-search-provider.runtime-DrVE7-Br.mjs} +3 -3
  55. package/dist/catalog-page.worker.js +1 -1
  56. package/dist/harness.js +15 -15
  57. package/dist/index.js +24 -24
  58. package/dist/media-understanding-provider.js +2 -2
  59. package/dist/migration-provider-api.js +1 -1
  60. package/package.json +5 -5
@@ -1,14 +1,14 @@
1
1
  import { c as codexNativeSubagentRunId, d as readNativeSubagentThreadIds, f as readThreadParentThreadId, l as normalizeIdentifier, m as assertHistoryOwnerMatchesRegistration, p as readThreadSpawnSource, t as matchesNativeAssignmentLifecycle, u as readCodexNativeSubagentRunId } from "./native-subagent-pending-assignments-BDqhOdJp.mjs";
2
2
  import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
3
- import { n as defineCodexBuildState } from "./build-state-CqQnsg7T.mjs";
3
+ import { n as defineCodexBuildState } from "./build-state-LS-A65iX.mjs";
4
4
  import { a as readHookOutputEntries, o as readItem, s as readNullableString } from "./event-projector-values-DTqZHizf.mjs";
5
5
  import { t as attachCodexMirrorIdentity } from "./upstream-prompt-provenance-fXkKbPVC.mjs";
6
6
  import { t as readCodexMirroredSessionHistoryMessages } from "./session-history-BogBHKLk.mjs";
7
- import { K as retainCodexAppServerLiveThread, P as claimCodexAppServerLiveThread, R as hasCodexAppServerLiveThread } from "./shared-client-qhyYWbew.mjs";
8
- import { L as readCodexAppServerWarningMessage } from "./client-C8lgBOoO.mjs";
9
- import { _ as itemStatus, c as auditNativeToolName, d as isMutatingNativeToolItem, f as isNonSuccessItemStatus, g as itemName, h as itemKind, l as auditNativeToolTerminalStatus, m as isSideEffectingNativeToolItem, p as isProjectedNativeToolItem, v as itemTitle, x as unknownItemStatus, y as matchesCodexSnapshotTurn } from "./turn-router-sS69wYnI.mjs";
10
- import { s as interruptCodexTurnAndWaitBestEffort } from "./attempt-client-cleanup-BH0hW2xU.mjs";
11
- import { n as codexApprovalTimeoutText } from "./plugin-approval-roundtrip-CuahdPLC.mjs";
7
+ import { K as retainCodexAppServerLiveThread, P as claimCodexAppServerLiveThread, R as hasCodexAppServerLiveThread } from "./shared-client-5NUq43f3.mjs";
8
+ import { L as readCodexAppServerWarningMessage } from "./client-ChJtGEdJ.mjs";
9
+ import { _ as itemStatus, c as auditNativeToolName, d as isMutatingNativeToolItem, f as isNonSuccessItemStatus, g as itemName, h as itemKind, l as auditNativeToolTerminalStatus, m as isSideEffectingNativeToolItem, p as isProjectedNativeToolItem, v as itemTitle, x as unknownItemStatus, y as matchesCodexSnapshotTurn } from "./turn-router-BOKSJmfw.mjs";
10
+ import { s as interruptCodexTurnAndWaitBestEffort } from "./attempt-client-cleanup-DPUGAWP2.mjs";
11
+ import { n as codexApprovalTimeoutText } from "./plugin-approval-roundtrip-bPQbG8BI.mjs";
12
12
  import { t as __exportAll } from "./session-binding-sidecars-BrdV95Fg.mjs";
13
13
  import { asFiniteNumber, asNonArrayRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeTrimmedStringList, readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
14
14
  import { randomUUID } from "node:crypto";
@@ -1,7 +1,7 @@
1
1
  import { t as isOnlyMigrationKind } from "./scope-DOC1Xjc8.mjs";
2
2
  import { l as CODEX_PLUGINS_MARKETPLACE_NAME } from "./plugin-inventory-Bf0_piTw.mjs";
3
3
  import "./config-0Gxk3_eq.mjs";
4
- import { i as hasCodexSource, n as defaultCodexHome, o as readJsonObject, r as discoverCodexSource, s as sanitizeName, t as codexPluginMigrationSubscriptionWarning } from "./source-BYu0T780.mjs";
4
+ import { i as hasCodexSource, n as defaultCodexHome, o as readJsonObject, r as discoverCodexSource, s as sanitizeName, t as codexPluginMigrationSubscriptionWarning } from "./source-1cabQi3x.mjs";
5
5
  import { asBoolean, asOptionalRecord, isRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
6
6
  import { createHash } from "node:crypto";
7
7
  import { runCommandBuffered } from "openclaw/plugin-sdk/process-runtime";
@@ -96,7 +96,7 @@ async function readCodexCliCredentialsAsync(options) {
96
96
  options.signal?.throwIfAborted();
97
97
  if (!options.allowKeychainPrompt) return;
98
98
  const home = await fs.realpath(options.codexHome).catch(() => path.resolve(options.codexHome));
99
- const { CodexAppServerClient } = await import("./client-C8lgBOoO.mjs").then((n) => n.n);
99
+ const { CodexAppServerClient } = await import("./client-ChJtGEdJ.mjs").then((n) => n.n);
100
100
  const { resolveManagedCodexPackageEntrypoint, resolveManagedCodexNativeCommand } = await import("./managed-binary-C1VFoVPf.mjs").then((n) => n.n);
101
101
  const launcher = resolveManagedCodexPackageEntrypoint(path.dirname(fileURLToPath(import.meta.url)));
102
102
  const command = launcher ? resolveManagedCodexNativeCommand(launcher) : void 0;
@@ -1,4 +1,4 @@
1
- import { pt as resolveCodexGatewayTimeoutWithGraceMs } from "./shared-client-qhyYWbew.mjs";
1
+ import { pt as resolveCodexGatewayTimeoutWithGraceMs } from "./shared-client-5NUq43f3.mjs";
2
2
  import { isApprovalNotFoundError, toErrorObject } from "openclaw/plugin-sdk/error-runtime";
3
3
  import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
4
4
  import { racePromiseWithAbortSignal } from "openclaw/plugin-sdk/time-runtime";
@@ -3,9 +3,9 @@ import { r as withAbortableTimeout } from "./timeout-CXOfNoaX.mjs";
3
3
  import { a as defaultCodexAppInventoryCache } from "./plugin-app-cache-key-BW8rd98k.mjs";
4
4
  import { s as resolveRecoverableCodexPluginConfigKeys } from "./plugin-inventory-Bf0_piTw.mjs";
5
5
  import "./config-0Gxk3_eq.mjs";
6
- import { Tt as shouldBuildCodexPluginThreadConfig, gt as buildCodexPluginThreadConfig, vt as buildCodexPluginThreadConfigTimeoutFallback } from "./thread-requests-CL1e8Wmx.mjs";
7
- import { m as readCurrentCodexScheduledAppPolicy, p as intersectCodexPluginThreadConfigWithScheduledAuthority } from "./thread-lifecycle-Cbz_7ySv.mjs";
8
- import { n as disableCodexPluginThreadConfig } from "./dynamic-tool-build-C8xGEXmR.mjs";
6
+ import { Tt as shouldBuildCodexPluginThreadConfig, gt as buildCodexPluginThreadConfig, vt as buildCodexPluginThreadConfigTimeoutFallback } from "./thread-requests-Bj_Lixmv.mjs";
7
+ import { m as readCurrentCodexScheduledAppPolicy, p as intersectCodexPluginThreadConfigWithScheduledAuthority } from "./thread-lifecycle--EPPTNTe.mjs";
8
+ import { n as disableCodexPluginThreadConfig } from "./dynamic-tool-build-BCi00feJ.mjs";
9
9
  import { t as defaultCodexPluginMetadataCache } from "./plugin-metadata-cache-DWnB7VMj.mjs";
10
10
  import { AgentHarnessPreflightError } from "openclaw/plugin-sdk/agent-harness-runtime";
11
11
  //#region extensions/codex/src/app-server/plugin-thread-config-deadline.ts
@@ -11,7 +11,7 @@ function buildCodexMigrationProvider(params = {}) {
11
11
  ].join(" "),
12
12
  supportedItemKinds: ["memory", "auth"],
13
13
  async detect(ctx) {
14
- const { discoverCodexSource, hasCodexSource } = await import("./source-BYu0T780.mjs").then((n) => n.a);
14
+ const { discoverCodexSource, hasCodexSource } = await import("./source-1cabQi3x.mjs").then((n) => n.a);
15
15
  const memoryOnly = isOnlyMigrationKind(ctx, "memory");
16
16
  const authOnly = isOnlyMigrationKind(ctx, "auth");
17
17
  const source = await discoverCodexSource({
@@ -29,16 +29,16 @@ function buildCodexMigrationProvider(params = {}) {
29
29
  };
30
30
  },
31
31
  async plan(ctx) {
32
- const { buildCodexMigrationPlan } = await import("./plan-BJ37d2Og.mjs");
32
+ const { buildCodexMigrationPlan } = await import("./plan-CUHSuL6_.mjs");
33
33
  return buildCodexMigrationPlan(ctx);
34
34
  },
35
35
  deferredApply: { retrySafe: true },
36
36
  prepareApply(ctx) {
37
37
  if (isOnlyMigrationKind(ctx, "memory") || isOnlyMigrationKind(ctx, "auth")) return;
38
- return import("./apply-CXTudl9p.mjs").then(({ prepareTargetCodexAppServer }) => prepareTargetCodexAppServer(ctx));
38
+ return import("./apply-CQ3brq3z.mjs").then(({ prepareTargetCodexAppServer }) => prepareTargetCodexAppServer(ctx));
39
39
  },
40
40
  async apply(ctx, plan) {
41
- const { applyCodexMigrationPlan } = await import("./apply-CXTudl9p.mjs");
41
+ const { applyCodexMigrationPlan } = await import("./apply-CQ3brq3z.mjs");
42
42
  return await applyCodexMigrationPlan({
43
43
  ctx,
44
44
  plan,
@@ -1,4 +1,4 @@
1
- import { h as releaseLeasedSharedCodexAppServerClient } from "./shared-client-qhyYWbew.mjs";
1
+ import { h as releaseLeasedSharedCodexAppServerClient } from "./shared-client-5NUq43f3.mjs";
2
2
  //#region extensions/codex/src/app-server/provider-capabilities.ts
3
3
  function resolveOverriddenProviderWebSearchSupport(modelProviderOverride) {
4
4
  const provider = modelProviderOverride?.trim().toLowerCase();
@@ -316,7 +316,7 @@ async function withCodexAppServerJsonClient(params, run) {
316
316
  timeoutMessage,
317
317
  promise: (async () => {
318
318
  const { resolveCodexAppServerDirectSandboxBypassBlock } = await import("./sandbox-guard-WqE8yPge.mjs").then((n) => n.r);
319
- const { createIsolatedCodexAppServerClient, getLeasedSharedCodexAppServerClient, isCodexAppServerStartSelectionChangedError, releaseLeasedSharedCodexAppServerClient, retireSharedCodexAppServerClientIfCurrent } = await import("./shared-client-qhyYWbew.mjs").then((n) => n.v);
319
+ const { createIsolatedCodexAppServerClient, getLeasedSharedCodexAppServerClient, isCodexAppServerStartSelectionChangedError, releaseLeasedSharedCodexAppServerClient, retireSharedCodexAppServerClientIfCurrent } = await import("./shared-client-5NUq43f3.mjs").then((n) => n.v);
320
320
  for (let attempt = 0; attempt < 2; attempt += 1) {
321
321
  errorPhase = void 0;
322
322
  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-BDqhOdJp.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-BZB8RgcF.mjs";
5
- import { n as defineCodexBuildState } from "./build-state-CqQnsg7T.mjs";
5
+ import { n as defineCodexBuildState } from "./build-state-LS-A65iX.mjs";
6
6
  import { c as shouldAutoApproveCodexAppServerApprovals, f as readCodexRequirementsToml, l as withMcpElicitationsApprovalPolicy, n as hasCodexMcpToolApprovalOverrides } from "./config-security-KAPScztc.mjs";
7
7
  import { c as isCodexPairedNodeRemoteExecPlacementSandbox, d as readCodexPluginConfig, f as resolveCodexPluginsPolicy, l as isCodexRemoteExecPlacementSandbox, u as isCodexSandboxExecServerEnabled } from "./config-parsing-BQq-CHTF.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-HG_Rr3W_.mjs";
11
- import { c as resolveCodexAppServerPreparedApiKeyCacheKey, s as resolveCodexAppServerFallbackApiKeyCacheKey, w as retireSharedCodexAppServerClientIfCurrent } from "./auth-cache-key-CGm0UJOr.mjs";
11
+ import { c as resolveCodexAppServerPreparedApiKeyCacheKey, s as resolveCodexAppServerFallbackApiKeyCacheKey, w as retireSharedCodexAppServerClientIfCurrent } from "./auth-cache-key-BE1HXsNo.mjs";
12
12
  import { o as formatCodexDisplayText } from "./command-formatters-DV3DHhdr.mjs";
13
13
  import { a as codexPrewriteRejectionCause, i as CodexAppServerScopedRequestRejectedError, r as CodexAppServerRpcError } from "./rpc-error-hmWM21RB.mjs";
14
14
  import { n as waitForPromiseOrAbort } from "./timeout-CXOfNoaX.mjs";
@@ -17,46 +17,46 @@ import { i as readCodexProviderRefusal, n as extractRawAssistantText, o as readI
17
17
  import { r as readMirrorIdentity, t as attachCodexMirrorIdentity } from "./upstream-prompt-provenance-fXkKbPVC.mjs";
18
18
  import { n as buildCodexAppServerRuntimeFingerprint, r as buildCodexPluginAppCacheKey } from "./plugin-app-cache-key-BW8rd98k.mjs";
19
19
  import { i as resolveCodexBindingAppServerConnection, r as requireCodexSupervisionModelSelection, t as assertCodexSessionRuntimeOwnership } from "./binding-connection-C-08ez1w.mjs";
20
- import { n as requestCodexAppServerClientJson } from "./request-jSbhc1sg.mjs";
20
+ import { n as requestCodexAppServerClientJson } from "./request-CZkKkN6c.mjs";
21
21
  import { n as canUseCodexModelBackedApprovalsReviewerForModel, r as resolveOpenClawExecPolicyForCodexAppServer } from "./config-0Gxk3_eq.mjs";
22
22
  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-CsgYSQhW.mjs";
23
23
  import { o as hasCodexMirrorOrigin, t as applyCodexTranscriptTaint } from "./transcript-mirror-attestation-YSegaktH.mjs";
24
24
  import { t as readCodexMirroredSessionHistoryMessages } from "./session-history-BogBHKLk.mjs";
25
25
  import { i as resolveCodexAppServerAuthProfileIdForAgent, r as resolveCodexAppServerAuthProfileId } from "./auth-profile-CgHQ8Vot.mjs";
26
- 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-qhyYWbew.mjs";
26
+ 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-5NUq43f3.mjs";
27
27
  import { a as isCodexResponsesOAuthRun, r as isCodexResponsesOAuth } from "./responses-oauth-twnuTaAa.mjs";
28
- import { A as resolveTerminalDynamicToolBatchAction, D as isDynamicToolTerminalDiagnosticEvent, E as hasPendingDynamicToolTerminalDiagnostic, H as resolveCodexAppServerClientInstanceId, M as toCodexDynamicToolProgressResponse, N as toCodexDynamicToolProtocolResponse, O as isMatchingDynamicToolTerminalDiagnostic, T as handleDynamicToolCallWithTimeout, _ as assertCodexTurnStartResponse, a as isCodexAppServerIndeterminateRequestCancellationError, i as isCodexAppServerConnectionClosedError, j as shouldReleaseTurnAfterTerminalDynamicTool, k as resolveDynamicToolCallTimeoutMs, l as CodexServerRequestResolvedError, o as isCodexAppServerIndeterminateTransportError, r as isCodexAppServerApprovalRequest, w as createCodexElicitationResponse, x as readCodexTurnCompletedNotification, y as readCodexDynamicToolCallParams, z as CODEX_APP_SERVER_OPT_OUT_NOTIFICATION_METHODS } from "./client-C8lgBOoO.mjs";
28
+ import { A as resolveTerminalDynamicToolBatchAction, D as isDynamicToolTerminalDiagnosticEvent, E as hasPendingDynamicToolTerminalDiagnostic, H as resolveCodexAppServerClientInstanceId, M as toCodexDynamicToolProgressResponse, N as toCodexDynamicToolProtocolResponse, O as isMatchingDynamicToolTerminalDiagnostic, T as handleDynamicToolCallWithTimeout, _ as assertCodexTurnStartResponse, a as isCodexAppServerIndeterminateRequestCancellationError, i as isCodexAppServerConnectionClosedError, j as shouldReleaseTurnAfterTerminalDynamicTool, k as resolveDynamicToolCallTimeoutMs, l as CodexServerRequestResolvedError, o as isCodexAppServerIndeterminateTransportError, r as isCodexAppServerApprovalRequest, w as createCodexElicitationResponse, x as readCodexTurnCompletedNotification, y as readCodexDynamicToolCallParams, z as CODEX_APP_SERVER_OPT_OUT_NOTIFICATION_METHODS } from "./client-ChJtGEdJ.mjs";
29
29
  import { n as isCodexWebSocketOpenFailure } from "./transport-websocket-zqJ0Cmtn.mjs";
30
- import { a as isCodexNotificationForTurn, b as shouldClearTerminalPresentationForNativeItem, g as itemName, i as CodexProjectionDiagnostics, n as getCodexAppServerTurnRouter, o as readCodexNotificationThreadId, t as CODEX_APP_SERVER_NATIVE_TURN_WAIT_TIMEOUT_MS, y as matchesCodexSnapshotTurn } from "./turn-router-sS69wYnI.mjs";
31
- 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-BH0hW2xU.mjs";
30
+ import { a as isCodexNotificationForTurn, b as shouldClearTerminalPresentationForNativeItem, g as itemName, i as CodexProjectionDiagnostics, n as getCodexAppServerTurnRouter, o as readCodexNotificationThreadId, t as CODEX_APP_SERVER_NATIVE_TURN_WAIT_TIMEOUT_MS, y as matchesCodexSnapshotTurn } from "./turn-router-BOKSJmfw.mjs";
31
+ 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-DPUGAWP2.mjs";
32
32
  import { r as prepareCodexAppServerAuthBinding } from "./auth-binding-BoMwpuPN.mjs";
33
33
  import { a as isRawFunctionToolOutputCompletionNotification, c as readNotificationItemId, i as isPendingOpenClawDynamicToolCompletionNotification, l as readRawResponseToolCallId, o as isTerminalTurnStatus, r as isCodexTurnAbortMarkerNotification, s as readCodexNotificationItem, t as CodexUsageProjection, u as updateActiveTurnItemIds } from "./event-projector-usage-03R0I2dM.mjs";
34
- import { n as listAllCodexAppServerModels } from "./models-DSseKSMg.mjs";
35
- import { B as hasCodexNativeToolCatalog, Ct as mergeCodexThreadConfigs, D as assertCodexNativeHookRelayAllowed, E as CodexManagedHooksOnlyError, F as scheduleCodexNativeHookRelayUnregister, G as areCodexDynamicToolFingerprintsCompatible, J as codexLegacyDynamicToolsFingerprint, N as resolveCodexNativeHookRelayEvents, O as buildCodexNativeHookRelayConfig, P as resolveCodexNativeHookRelayTtlMs, S as joinPresentSections, T as CODEX_NATIVE_HOOK_RELAY_TTL_GRACE_MS, V as loadCodexNativeToolCatalog, Z as fingerprintJsonObject, _t as buildCodexPluginThreadConfigInputFingerprint, b as resolveCodexAppServerThreadModelSelection, dt as isSystemAgentOnlyCodexDynamicToolAllowlist, g as buildDeveloperInstructions, j as createCodexNativeHookRelay, k as buildCodexNativeHookRelayDisabledConfig, l as isCodexNativeDelegationDisabledForRun, m as resolveCodexWebSearchPlan, mt as resolveCodexDynamicToolsLoadingForRuntime, nt as stabilizeJsonValue, q as codexDynamicToolsFingerprint, st as filterCodexDynamicTools } from "./thread-requests-CL1e8Wmx.mjs";
36
- import { _ as buildContextEngineBinding, a as buildTurnStartParams, c as assertScheduledCodexAppAuthorityRuntime, d as buildScheduledCodexAppServerConnectionIdentity, f as captureScheduledCodexAppAuthority, g as isCodexAppServerProfilerEnabled, h as resolveScheduledCodexAppCreatorCaptureDecision, i as buildTurnCollaborationMode, l as buildLegacyScheduledCodexAppRecoveryPrompt, n as buildCodexParentLocalInstructions, o as buildCodexUserInput, s as startOrResumeThread, t as buildCodexHistoryProvenancePrefix, u as buildScheduledCodexAppAuthorityInputFingerprint, v as isContextEngineBindingCompatible } from "./thread-lifecycle-Cbz_7ySv.mjs";
34
+ import { n as listAllCodexAppServerModels } from "./models-DaW-7tld.mjs";
35
+ import { B as hasCodexNativeToolCatalog, Ct as mergeCodexThreadConfigs, D as assertCodexNativeHookRelayAllowed, E as CodexManagedHooksOnlyError, F as scheduleCodexNativeHookRelayUnregister, G as areCodexDynamicToolFingerprintsCompatible, J as codexLegacyDynamicToolsFingerprint, N as resolveCodexNativeHookRelayEvents, O as buildCodexNativeHookRelayConfig, P as resolveCodexNativeHookRelayTtlMs, S as joinPresentSections, T as CODEX_NATIVE_HOOK_RELAY_TTL_GRACE_MS, V as loadCodexNativeToolCatalog, Z as fingerprintJsonObject, _t as buildCodexPluginThreadConfigInputFingerprint, b as resolveCodexAppServerThreadModelSelection, dt as isSystemAgentOnlyCodexDynamicToolAllowlist, g as buildDeveloperInstructions, j as createCodexNativeHookRelay, k as buildCodexNativeHookRelayDisabledConfig, l as isCodexNativeDelegationDisabledForRun, m as resolveCodexWebSearchPlan, mt as resolveCodexDynamicToolsLoadingForRuntime, nt as stabilizeJsonValue, q as codexDynamicToolsFingerprint, st as filterCodexDynamicTools } from "./thread-requests-Bj_Lixmv.mjs";
36
+ import { _ as buildContextEngineBinding, a as buildTurnStartParams, c as assertScheduledCodexAppAuthorityRuntime, d as buildScheduledCodexAppServerConnectionIdentity, f as captureScheduledCodexAppAuthority, g as isCodexAppServerProfilerEnabled, h as resolveScheduledCodexAppCreatorCaptureDecision, i as buildTurnCollaborationMode, l as buildLegacyScheduledCodexAppRecoveryPrompt, n as buildCodexParentLocalInstructions, o as buildCodexUserInput, s as startOrResumeThread, t as buildCodexHistoryProvenancePrefix, u as buildScheduledCodexAppAuthorityInputFingerprint, v as isContextEngineBindingCompatible } from "./thread-lifecycle--EPPTNTe.mjs";
37
37
  import { o as createCodexSessionGenerationSupersededError, r as resolveCodexSessionBinding, s as resolveCodexRunSessionBindingAuthority, t as clearCodexBindingForClient } from "./session-binding-Ce7BqiPN.mjs";
38
- import { a as CodexToolTranscriptProjection, c as shouldEmitTranscriptToolProgress, d as resolveCodexToolProgressDetailMode, f as sanitizeCodexAgentEventRecord, i as emitCodexAgentEvent, p as sanitizeCodexToolArguments, r as CodexEventProjection, s as CodexToolProgressProjection, t as codexNativeSubagentMonitorRuntime, u as isCodexCommandBearingToolCall } from "./native-subagent-monitor-BUYOUp9X.mjs";
39
- import { a as requestPluginApprovalOutcome } from "./plugin-approval-roundtrip-CuahdPLC.mjs";
40
- import { n as CodexThreadPolicyHandoffError, s as restoreCodexThreadInstructionsAfterCompaction } from "./thread-policy-DoNxbhqt.mjs";
41
- import { c as withExclusiveCodexAppServerThread, r as retainCodexAppServerBindingSubscription, t as isSameCodexAppServerThreadOwner } from "./thread-ownership-DwuSrt3s.mjs";
42
- import { a as resolveCodexPromptError, i as refreshCodexUsageLimitPromptError, n as formatCodexTurnStartUsageLimitError, r as markCodexAuthProfileBlockedFromRateLimits, t as CodexUsageLimitPromptError } from "./usage-limit-error-GbT-5NcW.mjs";
38
+ import { a as CodexToolTranscriptProjection, c as shouldEmitTranscriptToolProgress, d as resolveCodexToolProgressDetailMode, f as sanitizeCodexAgentEventRecord, i as emitCodexAgentEvent, p as sanitizeCodexToolArguments, r as CodexEventProjection, s as CodexToolProgressProjection, t as codexNativeSubagentMonitorRuntime, u as isCodexCommandBearingToolCall } from "./native-subagent-monitor-wh_-K3Vo.mjs";
39
+ import { a as requestPluginApprovalOutcome } from "./plugin-approval-roundtrip-bPQbG8BI.mjs";
40
+ import { n as CodexThreadPolicyHandoffError, s as restoreCodexThreadInstructionsAfterCompaction } from "./thread-policy-VtqLex1l.mjs";
41
+ import { c as withExclusiveCodexAppServerThread, r as retainCodexAppServerBindingSubscription, t as isSameCodexAppServerThreadOwner } from "./thread-ownership-T7T_iffm.mjs";
42
+ import { a as resolveCodexPromptError, i as refreshCodexUsageLimitPromptError, n as formatCodexTurnStartUsageLimitError, r as markCodexAuthProfileBlockedFromRateLimits, t as CodexUsageLimitPromptError } from "./usage-limit-error-CGJUoQu8.mjs";
43
43
  import { t as persistCodexContextCompactionActivity } from "./context-compaction-activity-CMla5FPJ.mjs";
44
44
  import { t as attemptTerminal } from "./attempt-terminal-gZrxQ35N.mjs";
45
45
  import { a as runCodexAgentEndHook, i as reportCodexBackgroundCleanupFailure, n as ensureCodexWorkspaceDirOnce, o as shouldKeepCodexSharedAbortOpen, r as estimateCodexAppServerProjectedTurnTokens, s as withCodexAppServerFastModeServiceTier, t as emitCodexAppServerEvent } from "./run-attempt-lifecycle-BuZgVbDA.mjs";
46
46
  import { t as CODEX_INFERENCE_GENERATION_KEY } from "./inference-metadata-CgIf7sOx.mjs";
47
47
  import "./inference-context-D-9gWlTR.mjs";
48
- import { i as createAssistantReasoningMessage, n as createAssistantCommentaryMessage, r as createAssistantMessage, t as createAssistantAsyncMessage } from "./event-projector-assistant-message-BN7CNUB5.mjs";
49
- 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-C8xGEXmR.mjs";
50
- import { n as resolveCodexPluginThreadConfigStartupPolicy, t as createCodexPluginThreadConfigStartupProvider } from "./plugin-thread-config-deadline-B8LGaZNW.mjs";
48
+ import { i as createAssistantReasoningMessage, n as createAssistantCommentaryMessage, r as createAssistantMessage, t as createAssistantAsyncMessage } from "./event-projector-assistant-message-BwG5TUYW.mjs";
49
+ 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-BCi00feJ.mjs";
50
+ import { n as resolveCodexPluginThreadConfigStartupPolicy, t as createCodexPluginThreadConfigStartupProvider } from "./plugin-thread-config-deadline-C5i1S6RN.mjs";
51
51
  import { i as resolveCodexSessionPermissionCwd, n as applyCodexSessionPermissionPolicy, r as resolveCodexEffectiveSessionPermissionPolicy } from "./session-permission-policy-BxIUJ0Zd.mjs";
52
- import { r as prepareCodexNativeMcpFormResourceContext, t as createCodexNativeMcpAppResultDetailsPreparer } from "./native-mcp-app-CqcPVmhH.mjs";
53
- import { a as emitDynamicToolStartedDiagnostic, c as ensureCodexSandboxExecServerEnvironment, d as CodexNativeProcessAuthority, f as readCodexRetainedBackgroundCommands, i as emitDynamicToolErrorDiagnostic, l as releaseCodexSandboxExecServerEnvironment, m as CodexNativeToolLifecycleProjector, n as projectCodexExecutableDynamicTools, o as emitDynamicToolTerminalDiagnostic, p as createCodexRemoteWorkspaceFileReader, r as routeCodexAppServerElicitationRequest, s as handleCodexAppServerApprovalRequest, t as createCodexDynamicToolBridge, u as createCodexNativePreToolUseFailureBuffer } from "./dynamic-tools-DyERJnR6.mjs";
52
+ import { r as prepareCodexNativeMcpFormResourceContext, t as createCodexNativeMcpAppResultDetailsPreparer } from "./native-mcp-app-ChpyWmL-.mjs";
53
+ import { a as emitDynamicToolStartedDiagnostic, c as ensureCodexSandboxExecServerEnvironment, d as CodexNativeProcessAuthority, f as readCodexRetainedBackgroundCommands, i as emitDynamicToolErrorDiagnostic, l as releaseCodexSandboxExecServerEnvironment, m as CodexNativeToolLifecycleProjector, n as projectCodexExecutableDynamicTools, o as emitDynamicToolTerminalDiagnostic, p as createCodexRemoteWorkspaceFileReader, r as routeCodexAppServerElicitationRequest, s as handleCodexAppServerApprovalRequest, t as createCodexDynamicToolBridge, u as createCodexNativePreToolUseFailureBuffer } from "./dynamic-tools-DUv6Sr6h.mjs";
54
54
  import { c as promptSnapshot, i as mirrorPromptAtTurnStartBestEffort, n as createCodexAppServerUserMessagePersistenceNotifier, o as buildCodexUserPromptMessage, s as buildResolvedCodexUserPromptMessage, t as codexTranscriptMirrorRuntime } from "./transcript-mirror-BfLRARNL.mjs";
55
55
  import { t as resolveCodexAppServerForModelProvider } from "./app-server-policy-Bg4FZw1f.mjs";
56
- 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-BY0jprWJ.mjs";
56
+ 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-GllQy8mw.mjs";
57
57
  import { n as captureCodexSettledTurnFinalizationContext } from "./settled-turn-context-BZsMjkIO.mjs";
58
- import { t as resolveCodexProviderWebSearchSupport } from "./provider-capabilities-D68Whix6.mjs";
59
- import { a as runCodexComputerUseLiveTest, i as createComputerUseRequest, t as ensureCodexComputerUse } from "./computer-use-BBN9y326.mjs";
58
+ import { t as resolveCodexProviderWebSearchSupport } from "./provider-capabilities-DhkeeHJd.mjs";
59
+ import { a as runCodexComputerUseLiveTest, i as createComputerUseRequest, t as ensureCodexComputerUse } from "./computer-use-CF0jsDi1.mjs";
60
60
  import { asOptionalRecord, normalizeLowercaseStringOrEmpty, readNonBlankString, readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
61
61
  import { createHash } from "node:crypto";
62
62
  import { isDeepStrictEqual } from "node:util";
@@ -443,6 +443,14 @@ var CodexAssistantProjection = class {
443
443
  delta: item.text
444
444
  });
445
445
  }
446
+ /** Codex deltas are best-effort; completed item text is authoritative (codex-rs TUI agrees). */
447
+ async streamCompletedItemTail(item) {
448
+ const streamed = item?.type === "agentMessage" ? this.assistantTextByItem.get(item.id) : "";
449
+ if (streamed && typeof item?.text === "string" && item.text.startsWith(streamed)) await this.handleAssistantDelta({
450
+ itemId: item.id,
451
+ delta: item.text.slice(streamed.length)
452
+ });
453
+ }
446
454
  recordItemCompleted(item, itemId, activeItemIds) {
447
455
  if (itemId && item?.type === "agentMessage") this.completedAssistantItemIds.add(itemId);
448
456
  this.noteNativeWorkBarrier(item);
@@ -1900,6 +1908,7 @@ var CodexAppServerEventProjector = class extends CodexTurnProjection {
1900
1908
  this.completedCompactionCount += 1;
1901
1909
  }
1902
1910
  if (!this.asyncDeliveryProjection.allows(item, true)) return;
1911
+ await this.assistantProjection.streamCompletedItemTail(item);
1903
1912
  const asyncMessage = this.assistantProjection.recordItemCompleted(item, itemId, this.activeItemIds);
1904
1913
  if (asyncMessage) await this.asyncDeliveryProjection.deliver(asyncMessage);
1905
1914
  if (this.projectionClosed) return;
@@ -1988,6 +1997,7 @@ var CodexAppServerEventProjector = class extends CodexTurnProjection {
1988
1997
  for (const item of turnItems) {
1989
1998
  if (!this.asyncDeliveryProjection.allows(item)) continue;
1990
1999
  this.diagnostics.warnUnknownItemStatus(item);
2000
+ await this.assistantProjection.streamCompletedItemTail(item);
1991
2001
  const asyncMessage = this.assistantProjection.recordSnapshotItem(item);
1992
2002
  if (asyncMessage) await this.asyncDeliveryProjection.deliver(asyncMessage);
1993
2003
  if (this.projectionClosed) return;
@@ -5832,6 +5842,7 @@ function prepareCodexAttemptResources(prompt) {
5832
5842
  };
5833
5843
  const startupTimeoutMs = resolveCodexStartupTimeoutMs({
5834
5844
  timeoutMs: params.timeoutMs,
5845
+ requestTimeoutMs: appServer.requestTimeoutMs,
5835
5846
  timeoutFloorMs: options.startupTimeoutFloorMs
5836
5847
  });
5837
5848
  const requesterChannel = params.messageChannel ?? params.messageProvider;
@@ -1,10 +1,10 @@
1
1
  import { c as MAX_CWD_LENGTH, d as boundedCatalogString } from "./session-catalog-parsing-B-qWJh2x.mjs";
2
- import { n as defineCodexBuildState } from "./build-state-CqQnsg7T.mjs";
2
+ import { n as defineCodexBuildState } from "./build-state-LS-A65iX.mjs";
3
3
  import { r as inferCodexAppServerConnectionClass } from "./config-security-KAPScztc.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-BW8rd98k.mjs";
7
- import { d as observeCodexCatalogEphemeralThreads, r as projectCodexCatalogNativeThread, s as codexCatalogSourceForClient } from "./session-catalog-native-projection-D6IiLtMb.mjs";
7
+ import { d as observeCodexCatalogEphemeralThreads, r as projectCodexCatalogNativeThread, s as codexCatalogSourceForClient } from "./session-catalog-native-projection-DCtsWKSF.mjs";
8
8
  import { createHash } from "node:crypto";
9
9
  import { embeddedAgentLog } from "openclaw/plugin-sdk/agent-harness-registration";
10
10
  import path from "node:path";
@@ -2,10 +2,10 @@ 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-DEU36Qlo.mjs";
3
3
  import { i as retainCodexCatalogRow, n as codexCatalogRowRecency, r as compareCodexCatalogRows, t as CodexCatalogOrdering } from "./session-catalog-index-order-nhyO0wdW.mjs";
4
4
  import { c as codexCatalogMetadataPage, i as CodexCatalogAvailability, r as withCodexCatalogListRequest, s as CodexCatalogPersistence } from "./session-catalog-list-request-tXephOB4.mjs";
5
- import { l as getCodexCatalogSource, p as setCodexCatalogSource, r as projectCodexCatalogNativeThread, u as hasLiveCodexCatalogSource } from "./session-catalog-native-projection-D6IiLtMb.mjs";
6
- import { i as subscribeCodexCatalogEvents } from "./session-catalog-events-Bdjw9HEn.mjs";
5
+ import { l as getCodexCatalogSource, p as setCodexCatalogSource, r as projectCodexCatalogNativeThread, u as hasLiveCodexCatalogSource } from "./session-catalog-native-projection-DCtsWKSF.mjs";
6
+ import { i as subscribeCodexCatalogEvents } from "./session-catalog-events-Cj-b2FpC.mjs";
7
7
  import { a as reportCodexCatalogSpawnFailure, n as findCodexAppServerSpawnError } from "./spawn-error-CL3n6MAa.mjs";
8
- import { CodexCatalogProjectionCapacityError, CodexCatalogProjections, mergeCodexCatalogRolloutRow, n as readCodexCatalogRollout, projectCodexCatalogThread, r as resolveCodexCatalogRolloutFingerprint, t as codexCatalogRolloutLogicalPath } from "./session-catalog-projection-8aHNwzWD.mjs";
8
+ import { CodexCatalogProjectionCapacityError, CodexCatalogProjections, mergeCodexCatalogRolloutRow, n as readCodexCatalogRollout, projectCodexCatalogThread, r as resolveCodexCatalogRolloutFingerprint, t as codexCatalogRolloutLogicalPath } from "./session-catalog-projection-Cn0bLb-d.mjs";
9
9
  import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
10
10
  import { createHash } from "node:crypto";
11
11
  import { isDeepStrictEqual } from "node:util";
@@ -1,6 +1,6 @@
1
1
  import { D as selectCodexCatalogPreviewInput, c as MAX_CWD_LENGTH, d as boundedCatalogString, k as truncateCodexCatalogPreview } from "./session-catalog-parsing-B-qWJh2x.mjs";
2
2
  import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
3
- import { n as defineCodexBuildState } from "./build-state-CqQnsg7T.mjs";
3
+ import { n as defineCodexBuildState } from "./build-state-LS-A65iX.mjs";
4
4
  import { n as detachCodexCatalogString } from "./session-catalog-limits-DEU36Qlo.mjs";
5
5
  import { t as __exportAll } from "./session-binding-sidecars-BrdV95Fg.mjs";
6
6
  import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
@@ -2,7 +2,7 @@ import { D as selectCodexCatalogPreviewInput, O as toCatalogSession, S as readCo
2
2
  import { n as detachCodexCatalogString } from "./session-catalog-limits-DEU36Qlo.mjs";
3
3
  import { n as codexCatalogRowRecency } from "./session-catalog-index-order-nhyO0wdW.mjs";
4
4
  import { t as isOpenClawManagedCodexThread } from "./session-catalog-provenance-CmsOE5mh.mjs";
5
- import { c as copyCodexCatalogSource, l as getCodexCatalogSource, p as setCodexCatalogSource, r as projectCodexCatalogNativeThread } from "./session-catalog-native-projection-D6IiLtMb.mjs";
5
+ import { c as copyCodexCatalogSource, l as getCodexCatalogSource, p as setCodexCatalogSource, r as projectCodexCatalogNativeThread } from "./session-catalog-native-projection-DCtsWKSF.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,9 +1,9 @@
1
- import { S as retainSharedCodexAppServerClientByInstanceId } from "./auth-cache-key-CGm0UJOr.mjs";
1
+ import { S as retainSharedCodexAppServerClientByInstanceId } from "./auth-cache-key-BE1HXsNo.mjs";
2
2
  import { t as withCodexAppServerThreadMutation } from "./thread-ownership-queue-Dp24d7-F.mjs";
3
- import { G as releaseCodexAppServerLiveThread, R as hasCodexAppServerLiveThread, V as isCodexAppServerLiveThreadClaimed } from "./shared-client-qhyYWbew.mjs";
4
- import { f as unsubscribeCodexThreadBestEffort, n as CODEX_APP_SERVER_UNSUBSCRIBE_TIMEOUT_MS, o as closeCodexStartupClientBestEffort, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-BH0hW2xU.mjs";
5
- import { t as codexNativeSubagentMonitorRuntime } from "./native-subagent-monitor-BUYOUp9X.mjs";
6
- import { t as isSameCodexAppServerThreadOwner } from "./thread-ownership-DwuSrt3s.mjs";
3
+ import { G as releaseCodexAppServerLiveThread, R as hasCodexAppServerLiveThread, V as isCodexAppServerLiveThreadClaimed } from "./shared-client-5NUq43f3.mjs";
4
+ import { f as unsubscribeCodexThreadBestEffort, n as CODEX_APP_SERVER_UNSUBSCRIBE_TIMEOUT_MS, o as closeCodexStartupClientBestEffort, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-DPUGAWP2.mjs";
5
+ import { t as codexNativeSubagentMonitorRuntime } from "./native-subagent-monitor-wh_-K3Vo.mjs";
6
+ import { t as isSameCodexAppServerThreadOwner } from "./thread-ownership-T7T_iffm.mjs";
7
7
  import { t as getCodexSessionInitializationRollback } from "./session-initialization-D6dtFQkE.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,11 +1,11 @@
1
1
  import { r as readMirrorIdentity, t as attachCodexMirrorIdentity } from "./upstream-prompt-provenance-fXkKbPVC.mjs";
2
2
  import { a as fingerprintCodexMirrorSourceMessage, c as readCodexMirrorSourceFingerprint } from "./transcript-mirror-attestation-YSegaktH.mjs";
3
- import { tt as resolveCodexAppServerPreparedAuthHandoff } from "./shared-client-qhyYWbew.mjs";
4
- import { f as assertCodexPassiveTurnItems } from "./client-C8lgBOoO.mjs";
5
- import { o as resolveCodexLocalRuntimeAttribution } from "./native-subagent-monitor-BUYOUp9X.mjs";
6
- import { runBoundedCodexAppServerTurn } from "./bounded-turn-pGsfXcmH.mjs";
3
+ import { tt as resolveCodexAppServerPreparedAuthHandoff } from "./shared-client-5NUq43f3.mjs";
4
+ import { f as assertCodexPassiveTurnItems } from "./client-ChJtGEdJ.mjs";
5
+ import { o as resolveCodexLocalRuntimeAttribution } from "./native-subagent-monitor-wh_-K3Vo.mjs";
6
+ import { runBoundedCodexAppServerTurn } from "./bounded-turn-9YflG60n.mjs";
7
7
  import { t as resolveCodexBoundedTurnIsolation } from "./bounded-turn-isolation-DklXNk3k.mjs";
8
- import { a as createAttributedCodexAssistantMessage } from "./event-projector-assistant-message-BN7CNUB5.mjs";
8
+ import { a as createAttributedCodexAssistantMessage } from "./event-projector-assistant-message-BwG5TUYW.mjs";
9
9
  import { t as codexTranscriptMirrorRuntime } from "./transcript-mirror-BfLRARNL.mjs";
10
10
  import { t as CodexSettledTurnContext } from "./settled-turn-context-BZsMjkIO.mjs";
11
11
  import { isSilentReplyText } from "openclaw/plugin-sdk/reply-runtime";
@@ -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-CqQnsg7T.mjs";
2
+ import { n as defineCodexBuildState, t as codexBuildSymbol } from "./build-state-LS-A65iX.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-HG_Rr3W_.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-C1VFoVPf.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-CGm0UJOr.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-BE1HXsNo.mjs";
9
9
  import { n as resolveCodexAppServerSpawnEnv } from "./transport-stdio-a0HDa2Mj.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-hmWM21RB.mjs";
12
12
  import { i as withTimeout } from "./timeout-CXOfNoaX.mjs";
13
13
  import { n as readCodexSessionMeta } from "./session-catalog-provenance-CmsOE5mh.mjs";
14
- import { n as observeCodexCatalogClient } from "./session-catalog-events-Bdjw9HEn.mjs";
14
+ import { n as observeCodexCatalogClient } from "./session-catalog-events-Cj-b2FpC.mjs";
15
15
  import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-cUYrqu_a.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 { R as isUnsupportedCodexAppServerVersionError, t as CodexAppServerClient } from "./client-C8lgBOoO.mjs";
18
+ import { R as isUnsupportedCodexAppServerVersionError, t as CodexAppServerClient } from "./client-ChJtGEdJ.mjs";
19
19
  import { n as isCodexWebSocketOpenFailure } from "./transport-websocket-zqJ0Cmtn.mjs";
20
20
  import { t as __exportAll } from "./session-binding-sidecars-BrdV95Fg.mjs";
21
21
  import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
@@ -39,6 +39,7 @@ import { pruneMapToMaxSize } from "openclaw/plugin-sdk/collection-runtime";
39
39
  import { sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
40
40
  //#region extensions/codex/src/app-server/attempt-timeouts.ts
41
41
  const CODEX_APP_SERVER_STARTUP_TIMEOUT_FLOOR_MS = 100;
42
+ const CODEX_APP_SERVER_STARTUP_REQUEST_TIMEOUT_MULTIPLE = 10;
42
43
  const TURN_TERMINAL_SETTLEMENT_TIMEOUT_MS = 12e4;
43
44
  const TURN_FINALIZE_DRAIN_ABORT_GRACE_MS = 5e3;
44
45
  var CodexAppServerStartupError = class extends Error {
@@ -90,10 +91,15 @@ async function withCodexStartupTimeout(params) {
90
91
  abortCleanup?.();
91
92
  }
92
93
  }
94
+ /**
95
+ * Bounds app-server startup by the turn budget and, when known, by a multiple of
96
+ * the per-request timeout, so a turn with a long budget cannot hang silently in startup.
97
+ */
93
98
  function resolveCodexStartupTimeoutMs(params) {
94
99
  const timeoutFloorMs = resolveTimerTimeoutMs(params.timeoutFloorMs, CODEX_APP_SERVER_STARTUP_TIMEOUT_FLOOR_MS);
95
- const timeoutMs = resolveTimerTimeoutMs(params.timeoutMs, timeoutFloorMs);
96
- return Math.max(timeoutFloorMs, timeoutMs);
100
+ const turnTimeoutMs = resolveTimerTimeoutMs(params.timeoutMs, timeoutFloorMs);
101
+ const requestBudgetMs = params.requestTimeoutMs === void 0 ? turnTimeoutMs : resolveTimerTimeoutMs(params.requestTimeoutMs * CODEX_APP_SERVER_STARTUP_REQUEST_TIMEOUT_MULTIPLE, turnTimeoutMs);
102
+ return Math.max(timeoutFloorMs, Math.min(turnTimeoutMs, requestBudgetMs));
97
103
  }
98
104
  function resolveCodexGatewayTimeoutWithGraceMs(timeoutMs, graceMs = 1e4) {
99
105
  const timeout = resolveTimerTimeoutMs(timeoutMs, 1);
@@ -2529,7 +2535,7 @@ async function prepareCodexInferenceRoute(params) {
2529
2535
  }
2530
2536
  pending = Promise.all([
2531
2537
  import("./inference-proxy-DUO5E2QQ.mjs"),
2532
- import("./native-subagent-monitor-BUYOUp9X.mjs").then((n) => n.n),
2538
+ import("./native-subagent-monitor-wh_-K3Vo.mjs").then((n) => n.n),
2533
2539
  import("./inference-dispatch-B5UKEUyC.mjs")
2534
2540
  ]).then(([{ createCodexInferenceProxy }, native, { createCodexInferenceModelBinding }]) => {
2535
2541
  assertClient();
@@ -1,4 +1,4 @@
1
- import { ft as normalizeCodexDynamicToolName } from "./thread-requests-CL1e8Wmx.mjs";
1
+ import { ft as normalizeCodexDynamicToolName } from "./thread-requests-Bj_Lixmv.mjs";
2
2
  import { pinExecToolTarget } from "openclaw/plugin-sdk/codex-mcp-projection";
3
3
  import { loadNodeExecAvailability } from "openclaw/plugin-sdk/node-selection-runtime";
4
4
  //#region extensions/codex/src/app-server/shell-dynamic-tools.ts
@@ -6,20 +6,20 @@ import { i as resolveCodexAppServerHomeScope, l as resolveCodexModelBackedReview
6
6
  import { n as formatCodexUsageLimitErrorMessage } from "./rate-limits-CMPy24F5.mjs";
7
7
  import { i as resolveCodexBindingAppServerConnection, r as requireCodexSupervisionModelSelection } from "./binding-connection-C-08ez1w.mjs";
8
8
  import { n as canUseCodexModelBackedApprovalsReviewerForModel, r as resolveOpenClawExecPolicyForCodexAppServer } from "./config-0Gxk3_eq.mjs";
9
- import { X as readRecentCodexRateLimits, b as withLeasedCodexAppServerClientStartSelectionRetry, c as getLeasedSharedCodexAppServerClient, m as releaseCodexAppServerClientLease, tt as resolveCodexAppServerPreparedAuthHandoff } from "./shared-client-qhyYWbew.mjs";
10
- import { N as toCodexDynamicToolProtocolResponse, P as resolveCodexToolAbortTerminalReason, T as handleDynamicToolCallWithTimeout, _ as assertCodexTurnStartResponse, a as isCodexAppServerIndeterminateRequestCancellationError, k as resolveDynamicToolCallTimeoutMs, m as assertCodexThreadForkResponse, r as isCodexAppServerApprovalRequest, w as createCodexElicitationResponse, y as readCodexDynamicToolCallParams } from "./client-C8lgBOoO.mjs";
11
- import { d as terminateCodexBackgroundTerminals, f as unsubscribeCodexThreadBestEffort, l as retireUnsafeCodexTurnClientBestEffort, s as interruptCodexTurnAndWaitBestEffort } from "./attempt-client-cleanup-BH0hW2xU.mjs";
12
- import { t as CodexEphemeralTurn } from "./ephemeral-turn-D8VcDTNo.mjs";
13
- import { Ct as mergeCodexThreadConfigs, N as resolveCodexNativeHookRelayEvents, O as buildCodexNativeHookRelayConfig, P as resolveCodexNativeHookRelayTtlMs, _ as CODEX_NATIVE_PERSONALITY_NONE, b as resolveCodexAppServerThreadModelSelection, k as buildCodexNativeHookRelayDisabledConfig, m as resolveCodexWebSearchPlan, pt as resolveCodexDynamicToolsLoading, r as buildCodexRuntimeThreadConfig, wt as refreshCodexPluginAppApprovalPolicy } from "./thread-requests-CL1e8Wmx.mjs";
14
- import { b as resolveCodexAppServerReasoningEffort, o as buildCodexUserInput, r as buildCodexTemporalAdditionalContext, y as readCodexSupportedReasoningEfforts } from "./thread-lifecycle-Cbz_7ySv.mjs";
9
+ import { X as readRecentCodexRateLimits, b as withLeasedCodexAppServerClientStartSelectionRetry, c as getLeasedSharedCodexAppServerClient, m as releaseCodexAppServerClientLease, tt as resolveCodexAppServerPreparedAuthHandoff } from "./shared-client-5NUq43f3.mjs";
10
+ import { N as toCodexDynamicToolProtocolResponse, P as resolveCodexToolAbortTerminalReason, T as handleDynamicToolCallWithTimeout, _ as assertCodexTurnStartResponse, a as isCodexAppServerIndeterminateRequestCancellationError, k as resolveDynamicToolCallTimeoutMs, m as assertCodexThreadForkResponse, r as isCodexAppServerApprovalRequest, w as createCodexElicitationResponse, y as readCodexDynamicToolCallParams } from "./client-ChJtGEdJ.mjs";
11
+ import { d as terminateCodexBackgroundTerminals, f as unsubscribeCodexThreadBestEffort, l as retireUnsafeCodexTurnClientBestEffort, s as interruptCodexTurnAndWaitBestEffort } from "./attempt-client-cleanup-DPUGAWP2.mjs";
12
+ import { t as CodexEphemeralTurn } from "./ephemeral-turn-U4th15a6.mjs";
13
+ import { Ct as mergeCodexThreadConfigs, N as resolveCodexNativeHookRelayEvents, O as buildCodexNativeHookRelayConfig, P as resolveCodexNativeHookRelayTtlMs, _ as CODEX_NATIVE_PERSONALITY_NONE, b as resolveCodexAppServerThreadModelSelection, k as buildCodexNativeHookRelayDisabledConfig, m as resolveCodexWebSearchPlan, pt as resolveCodexDynamicToolsLoading, r as buildCodexRuntimeThreadConfig, wt as refreshCodexPluginAppApprovalPolicy } from "./thread-requests-Bj_Lixmv.mjs";
14
+ import { b as resolveCodexAppServerReasoningEffort, o as buildCodexUserInput, r as buildCodexTemporalAdditionalContext, y as readCodexSupportedReasoningEfforts } from "./thread-lifecycle--EPPTNTe.mjs";
15
15
  import { r as resolveCodexSessionBinding } from "./session-binding-Ce7BqiPN.mjs";
16
- import { i as assertCodexSupervisionThreadLineage, n as CodexThreadPolicyHandoffError, o as refreshCodexThreadPolicy } from "./thread-policy-DoNxbhqt.mjs";
16
+ import { i as assertCodexSupervisionThreadLineage, n as CodexThreadPolicyHandoffError, o as refreshCodexThreadPolicy } from "./thread-policy-VtqLex1l.mjs";
17
17
  import { t as resolveCodexNativeExecutionBlock } from "./sandbox-guard-WqE8yPge.mjs";
18
- import { a as resolveCodexExternalSandboxPolicyForOpenClawSandbox, c as shouldEnableCodexAppServerNativeToolSurface, l as shouldRequireCodexSandboxExecServerEnvironment, o as resolveCodexMessageToolProvider, s as resolveCodexSandboxEnvironmentSelection, t as buildDynamicTools } from "./dynamic-tool-build-C8xGEXmR.mjs";
18
+ import { a as resolveCodexExternalSandboxPolicyForOpenClawSandbox, c as shouldEnableCodexAppServerNativeToolSurface, l as shouldRequireCodexSandboxExecServerEnvironment, o as resolveCodexMessageToolProvider, s as resolveCodexSandboxEnvironmentSelection, t as buildDynamicTools } from "./dynamic-tool-build-BCi00feJ.mjs";
19
19
  import { i as resolveCodexSessionPermissionCwd, n as applyCodexSessionPermissionPolicy, r as resolveCodexEffectiveSessionPermissionPolicy, t as CODEX_SESSION_PERMISSION_EXEC_MODES } from "./session-permission-policy-BxIUJ0Zd.mjs";
20
- import { a as emitDynamicToolStartedDiagnostic, c as ensureCodexSandboxExecServerEnvironment, i as emitDynamicToolErrorDiagnostic, l as releaseCodexSandboxExecServerEnvironment, m as CodexNativeToolLifecycleProjector, o as emitDynamicToolTerminalDiagnostic, r as routeCodexAppServerElicitationRequest, s as handleCodexAppServerApprovalRequest, t as createCodexDynamicToolBridge, u as createCodexNativePreToolUseFailureBuffer } from "./dynamic-tools-DyERJnR6.mjs";
20
+ import { a as emitDynamicToolStartedDiagnostic, c as ensureCodexSandboxExecServerEnvironment, i as emitDynamicToolErrorDiagnostic, l as releaseCodexSandboxExecServerEnvironment, m as CodexNativeToolLifecycleProjector, o as emitDynamicToolTerminalDiagnostic, r as routeCodexAppServerElicitationRequest, s as handleCodexAppServerApprovalRequest, t as createCodexDynamicToolBridge, u as createCodexNativePreToolUseFailureBuffer } from "./dynamic-tools-DUv6Sr6h.mjs";
21
21
  import { t as resolveCodexAppServerForModelProvider } from "./app-server-policy-Bg4FZw1f.mjs";
22
- import { n as resolveCodexProviderWebSearchSupportForClient } from "./provider-capabilities-D68Whix6.mjs";
22
+ import { n as resolveCodexProviderWebSearchSupportForClient } from "./provider-capabilities-DhkeeHJd.mjs";
23
23
  import { readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
24
24
  import { randomUUID } from "node:crypto";
25
25
  import { isDeepStrictEqual } from "node:util";
@@ -1,5 +1,5 @@
1
1
  import { a as defaultCodexAppInventoryCache, r as buildCodexPluginAppCacheKey } from "./plugin-app-cache-key-BW8rd98k.mjs";
2
- import { a as withCodexAppServerJsonClient } from "./request-jSbhc1sg.mjs";
2
+ import { a as withCodexAppServerJsonClient } from "./request-CZkKkN6c.mjs";
3
3
  import { a as pluginReadParams, i as marketplaceRef, l as CODEX_PLUGINS_MARKETPLACE_NAME, n as isOpenAiCuratedMarketplaceName } from "./plugin-inventory-Bf0_piTw.mjs";
4
4
  import "./config-0Gxk3_eq.mjs";
5
5
  import { t as __exportAll } from "./session-binding-sidecars-BrdV95Fg.mjs";
@@ -4,7 +4,7 @@ import { m as sessionBindingIdentity, n as assertCodexBindingMayBeReplaced } fro
4
4
  import { u as fingerprintCodexPolicy } from "./config-security-KAPScztc.mjs";
5
5
  import { n as resolveCodexAppServerLocalHomeDir, t as resolveCodexAppServerHomeDir } from "./auth-start-options-BPIPeEX8.mjs";
6
6
  import { d as readCodexEffectiveConfig, n as codexSandboxPolicyForTurn, s as assertCodexModelBackedReviewerEffectiveConfig, u as CODEX_SESSION_OVERRIDABLE_LAYER_TYPES } from "./config-options-HG_Rr3W_.mjs";
7
- import { S as retainSharedCodexAppServerClientByInstanceId, d as getCurrentSharedClientEntry } from "./auth-cache-key-CGm0UJOr.mjs";
7
+ import { S as retainSharedCodexAppServerClientByInstanceId, d as getCurrentSharedClientEntry } from "./auth-cache-key-BE1HXsNo.mjs";
8
8
  import { t as withCodexAppServerThreadMutation } from "./thread-ownership-queue-Dp24d7-F.mjs";
9
9
  import { o as isCodexAppServerOverloadError, r as CodexAppServerRpcError, s as isCodexThreadReadMissingError } from "./rpc-error-hmWM21RB.mjs";
10
10
  import { t as codexCatalogHomeId } from "./session-catalog-home-id-vlih0B_g.mjs";
@@ -17,16 +17,16 @@ import "./config-0Gxk3_eq.mjs";
17
17
  import { r as invalidInlineImageText } from "./session-history-read-CNN8zwbD.mjs";
18
18
  import { c as resolveCodexContextEngineProjectionMaxChars, o as neutralizeCodexExplicitMentionSigils } from "./context-engine-projection-CsgYSQhW.mjs";
19
19
  import { n as normalizeCodexAppServerBindingModelProvider } from "./auth-profile-CgHQ8Vot.mjs";
20
- 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-qhyYWbew.mjs";
21
- import { B as getCodexAppServerClientInstanceId, C as resolveCodexThreadRolloutPath, H as resolveCodexAppServerClientInstanceId, S as readSupervisionResponseThreadId, c as isCodexAppServerRequestTimeoutError, g as assertCodexThreadStartResponse, m as assertCodexThreadForkResponse, p as assertCodexThreadAcceptsDirectInput, v as assertExactSupervisionModelSelection } from "./client-C8lgBOoO.mjs";
22
- import { r as hasCodexAppServerSiblingRouteWork } from "./turn-router-sS69wYnI.mjs";
23
- 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-BH0hW2xU.mjs";
24
- import { $ as legacyFingerprintUserMcpServersConfigPatch, B as hasCodexNativeToolCatalog, Ct as mergeCodexThreadConfigs, D as assertCodexNativeHookRelayAllowed, E as CodexManagedHooksOnlyError, Et as buildCodexAppApprovalOverrides, G as areCodexDynamicToolFingerprintsCompatible, I as attestCodexThreadToolSurface, J as codexLegacyDynamicToolsFingerprint, K as areUserMcpServersFingerprintsCompatible, L as checkCodexThreadAppAvailability, Q as fingerprintUserMcpServersConfigPatch, R as discardUnattestedCodexPluginThread, S as joinPresentSections, St as isCodexPluginThreadBindingStale, U as applyCodexNativeSkillIsolation, V as loadCodexNativeToolCatalog, W as resolveCodexNativeSkillIsolation, X as fingerprintEnvironmentSelection, Y as fingerprintCodexThreadConfig, Z as fingerprintJsonObject, _ as CODEX_NATIVE_PERSONALITY_NONE, at as shouldRotateCodexAppServerBindingForRuntime, b as resolveCodexAppServerThreadModelSelection, bt as buildPluginAppPolicyContext, c as codexThreadSandboxOrPermissions, d as readCodexManagedRequirementsFingerprint, dt as isSystemAgentOnlyCodexDynamicToolAllowlist, et as readActiveCodexTurnIdsFromResume, f as resolveCodexThreadApprovalsReviewer, g as buildDeveloperInstructions, h as mergeCodexNativeShellEnvironment, ht as buildCodexPluginAppsConfigPatchFromPolicyContext, i as buildCodexRuntimeThreadConfigForRun, it as shouldRecheckRecoverablePluginBinding, m as resolveCodexWebSearchPlan, n as buildCodexRingZeroThreadConfigPatch, o as buildThreadResumeParams, ot as shouldRotateCodexGpt56MultiAgentBinding, q as codexDynamicToolsFingerprint, rt as isTransientWebSearchRestriction, s as buildThreadStartParams, t as assertCodexManagedRequirementsDoNotOverrideToolPolicy, tt as shouldStartTransientNoToolThread, u as readCodexInheritedMcpServerNames, ut as isMessageOnlyCodexSourceReply, v as resolveCodexAppServerModelProvider, w as mergeCodexNativeProjectDocThreadConfig, xt as disableUnlistedCodexApps, y as resolveCodexAppServerRequestModelSelection, z as attestCodexRestrictedToolSurfaceMcpServersDisabled } from "./thread-requests-CL1e8Wmx.mjs";
20
+ 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-5NUq43f3.mjs";
21
+ import { B as getCodexAppServerClientInstanceId, C as resolveCodexThreadRolloutPath, H as resolveCodexAppServerClientInstanceId, S as readSupervisionResponseThreadId, c as isCodexAppServerRequestTimeoutError, g as assertCodexThreadStartResponse, m as assertCodexThreadForkResponse, p as assertCodexThreadAcceptsDirectInput, v as assertExactSupervisionModelSelection } from "./client-ChJtGEdJ.mjs";
22
+ import { r as hasCodexAppServerSiblingRouteWork } from "./turn-router-BOKSJmfw.mjs";
23
+ 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-DPUGAWP2.mjs";
24
+ import { $ as legacyFingerprintUserMcpServersConfigPatch, B as hasCodexNativeToolCatalog, Ct as mergeCodexThreadConfigs, D as assertCodexNativeHookRelayAllowed, E as CodexManagedHooksOnlyError, Et as buildCodexAppApprovalOverrides, G as areCodexDynamicToolFingerprintsCompatible, I as attestCodexThreadToolSurface, J as codexLegacyDynamicToolsFingerprint, K as areUserMcpServersFingerprintsCompatible, L as checkCodexThreadAppAvailability, Q as fingerprintUserMcpServersConfigPatch, R as discardUnattestedCodexPluginThread, S as joinPresentSections, St as isCodexPluginThreadBindingStale, U as applyCodexNativeSkillIsolation, V as loadCodexNativeToolCatalog, W as resolveCodexNativeSkillIsolation, X as fingerprintEnvironmentSelection, Y as fingerprintCodexThreadConfig, Z as fingerprintJsonObject, _ as CODEX_NATIVE_PERSONALITY_NONE, at as shouldRotateCodexAppServerBindingForRuntime, b as resolveCodexAppServerThreadModelSelection, bt as buildPluginAppPolicyContext, c as codexThreadSandboxOrPermissions, d as readCodexManagedRequirementsFingerprint, dt as isSystemAgentOnlyCodexDynamicToolAllowlist, et as readActiveCodexTurnIdsFromResume, f as resolveCodexThreadApprovalsReviewer, g as buildDeveloperInstructions, h as mergeCodexNativeShellEnvironment, ht as buildCodexPluginAppsConfigPatchFromPolicyContext, i as buildCodexRuntimeThreadConfigForRun, it as shouldRecheckRecoverablePluginBinding, m as resolveCodexWebSearchPlan, n as buildCodexRingZeroThreadConfigPatch, o as buildThreadResumeParams, ot as shouldRotateCodexGpt56MultiAgentBinding, q as codexDynamicToolsFingerprint, rt as isTransientWebSearchRestriction, s as buildThreadStartParams, t as assertCodexManagedRequirementsDoNotOverrideToolPolicy, tt as shouldStartTransientNoToolThread, u as readCodexInheritedMcpServerNames, ut as isMessageOnlyCodexSourceReply, v as resolveCodexAppServerModelProvider, w as mergeCodexNativeProjectDocThreadConfig, xt as disableUnlistedCodexApps, y as resolveCodexAppServerRequestModelSelection, z as attestCodexRestrictedToolSurfaceMcpServersDisabled } from "./thread-requests-Bj_Lixmv.mjs";
25
25
  import { a as hashCodexAppServerBindingFingerprint, r as resolveCodexSessionBinding } from "./session-binding-Ce7BqiPN.mjs";
26
26
  import { r as readCodexMcpToolConnectorId } from "./mcp-tool-metadata-j10HhfTC.mjs";
27
- import { a as refreshCodexThreadInstructions, i as assertCodexSupervisionThreadLineage, n as CodexThreadPolicyHandoffError, o as refreshCodexThreadPolicy, r as assertAdoptedCodexThreadResumeAllowed, t as CodexIncognitoPolicyChangeError } from "./thread-policy-DoNxbhqt.mjs";
28
- import { t as resumeCodexAppServerThread } from "./thread-resume-BT6NHMkM.mjs";
29
- import { c as withExclusiveCodexAppServerThread, r as retainCodexAppServerBindingSubscription, t as isSameCodexAppServerThreadOwner } from "./thread-ownership-DwuSrt3s.mjs";
27
+ import { a as refreshCodexThreadInstructions, i as assertCodexSupervisionThreadLineage, n as CodexThreadPolicyHandoffError, o as refreshCodexThreadPolicy, r as assertAdoptedCodexThreadResumeAllowed, t as CodexIncognitoPolicyChangeError } from "./thread-policy-VtqLex1l.mjs";
28
+ import { t as resumeCodexAppServerThread } from "./thread-resume-buZujRcC.mjs";
29
+ import { c as withExclusiveCodexAppServerThread, r as retainCodexAppServerBindingSubscription, t as isSameCodexAppServerThreadOwner } from "./thread-ownership-T7T_iffm.mjs";
30
30
  import { asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
31
31
  import crypto from "node:crypto";
32
32
  import { isDeepStrictEqual } from "node:util";
@@ -34,7 +34,7 @@ import { resolveSessionAgentIdsStrict } from "openclaw/plugin-sdk/agent-scope-ru
34
34
  import path from "node:path";
35
35
  import { isIncognitoSessionKey } from "openclaw/plugin-sdk/session-key-runtime";
36
36
  import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
37
- import { createStageTimingTracker, formatStageTimings } from "openclaw/plugin-sdk/time-runtime";
37
+ import { createStageTimingTracker, formatStageTimings, racePromiseWithAbortSignal } from "openclaw/plugin-sdk/time-runtime";
38
38
  import { AgentHarnessPreflightError, buildHarnessVisibleReplyGuidance, buildTemporalContextText, embeddedAgentLog, formatErrorMessage, isActiveHarnessContextEngine, isHostScopedAgentToolActive } from "openclaw/plugin-sdk/agent-harness-runtime";
39
39
  import { resolveAgentDir as resolveAgentDir$2 } from "openclaw/plugin-sdk/agent-runtime";
40
40
  import { sanitizeInlineImageDataUrl } from "openclaw/plugin-sdk/inline-image-data-url-runtime";
@@ -1094,12 +1094,14 @@ async function startFreshCodexThread(params, context) {
1094
1094
  //#region extensions/codex/src/app-server/thread-lifecycle-warm.ts
1095
1095
  /** Preserves the caller's abort reason across thread ownership transitions. */
1096
1096
  function throwIfCodexThreadLifecycleAborted(signal) {
1097
- if (!signal?.aborted) return;
1097
+ if (signal?.aborted) throw codexThreadLifecycleAbortError(signal);
1098
+ }
1099
+ function codexThreadLifecycleAbortError(signal) {
1098
1100
  const reason = signal.reason;
1099
- if (reason instanceof Error) throw reason;
1101
+ if (reason instanceof Error) return reason;
1100
1102
  const error = new Error(typeof reason === "string" && reason.length > 0 ? reason : "codex app-server thread lifecycle aborted");
1101
1103
  error.name = "AbortError";
1102
- throw error;
1104
+ return error;
1103
1105
  }
1104
1106
  /** Releases consumed subscription ownership or retires an unsafe client. */
1105
1107
  async function releaseCodexConsumedLiveThread(options) {
@@ -1144,7 +1146,8 @@ async function releaseCodexBoundLiveThread(options) {
1144
1146
  } : void 0
1145
1147
  });
1146
1148
  } finally {
1147
- await previous?.release(!isCodexAppServerLiveThreadClaimed(client, options.threadId));
1149
+ const retiredExit = previous?.release(!isCodexAppServerLiveThreadClaimed(client, options.threadId));
1150
+ if (retiredExit) await racePromiseWithAbortSignal(retiredExit, options.signal, codexThreadLifecycleAbortError);
1148
1151
  }
1149
1152
  }
1150
1153
  /** Reuses one safely owned, fully matching subscription on its original client. */
@@ -1887,7 +1890,8 @@ async function startOrResumeThread(input) {
1887
1890
  lifecycleTiming,
1888
1891
  threadId,
1889
1892
  assertCurrent,
1890
- withCurrent: authority.withCurrent
1893
+ withCurrent: authority.withCurrent,
1894
+ signal: params.signal
1891
1895
  });
1892
1896
  if (binding?.pendingSupervisionBranch) {
1893
1897
  const requestContext = await prepareRequestContext();
@@ -1,7 +1,7 @@
1
- import { S as retainSharedCodexAppServerClientByInstanceId } from "./auth-cache-key-CGm0UJOr.mjs";
1
+ import { S as retainSharedCodexAppServerClientByInstanceId } from "./auth-cache-key-BE1HXsNo.mjs";
2
2
  import { t as withCodexAppServerThreadMutation } from "./thread-ownership-queue-Dp24d7-F.mjs";
3
- import { G as releaseCodexAppServerLiveThread, K as retainCodexAppServerLiveThread, V as isCodexAppServerLiveThreadClaimed } from "./shared-client-qhyYWbew.mjs";
4
- import { f as unsubscribeCodexThreadBestEffort, o as closeCodexStartupClientBestEffort, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-BH0hW2xU.mjs";
3
+ import { G as releaseCodexAppServerLiveThread, K as retainCodexAppServerLiveThread, V as isCodexAppServerLiveThreadClaimed } from "./shared-client-5NUq43f3.mjs";
4
+ import { f as unsubscribeCodexThreadBestEffort, o as closeCodexStartupClientBestEffort, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-DPUGAWP2.mjs";
5
5
  import { t as __exportAll } from "./session-binding-sidecars-BrdV95Fg.mjs";
6
6
  import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
7
7
  import { runWithAsyncWorkResources } from "openclaw/plugin-sdk/agent-harness-tool-runtime";