{"record":{"id":"4f76c914ab71dc32","repo":"openclaw/openclaw","slug":"codex-btw-completed-without-an-answer","errorCode":null,"errorMessage":"Codex /btw completed without an answer.","messagePattern":"Codex /btw completed without an answer\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"extensions/codex/src/app-server/side-question.ts","lineNumber":748,"sourceCode":"\n    let text: string;\n    try {\n      text = await collector.wait({\n        signal: params.opts?.abortSignal,\n        timeoutMs: Math.max(\n          appServer.turnCompletionIdleTimeoutMs,\n          SIDE_QUESTION_COMPLETION_TIMEOUT_MS,\n        ),\n      });\n    } catch (error) {\n      if (error instanceof CodexSideQuestionTimeoutError && !runAbortController.signal.aborted) {\n        runAbortController.abort(error);\n      }\n      throw error;\n    }\n    const trimmed = text.trim();\n    if (!trimmed) {\n      throw new Error(\"Codex /btw completed without an answer.\");\n    }\n    return { text: trimmed };\n  } finally {\n    try {\n      // Cleanup aborts are ownership teardown, not a terminal run outcome.\n      // Snapshot the real state while late app-server notifications can still drain.\n      const runWasAbortedBeforeCleanup = runAbortController.signal.aborted;\n      nativeToolRunWasAbortedBeforeCleanup = runWasAbortedBeforeCleanup;\n      params.opts?.abortSignal?.removeEventListener(\"abort\", abortFromUpstream);\n      removeRequestHandler?.();\n      // Stop dispatched side tools before cleanup waits on the app server;\n      // otherwise a stuck tool can outlive the side turn that owns it.\n      if (!runAbortController.signal.aborted) {\n        runAbortController.abort(\"codex_side_question_finished\");\n      }\n      // Request handlers can still be finishing after the terminal turn event.\n      // Drain their abort races before unsubscribe so late diagnostics cannot leak\n      // into the next side run.","sourceCodeStart":730,"sourceCodeEnd":766,"githubUrl":"https://github.com/openclaw/openclaw/blob/01804a75319da4b69c9ab98ceaa30477e22b8c0b/extensions/codex/src/app-server/side-question.ts#L730-L766","documentation":"Error \"Codex /btw completed without an answer.\" thrown in openclaw/openclaw.","triggerScenarios":"Thrown at extensions/codex/src/app-server/side-question.ts:748 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01804a75319da4b69c9ab98ceaa30477e22b8c0b","analyzedAt":"2026-08-12T04:37:58.197Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}