{"record":{"id":"aab9874911f21867","repo":"Yeachan-Heo/oh-my-codex","slug":"structured-questions-are-unavailable-in-the-curren","errorCode":null,"errorMessage":"Structured questions are unavailable in the current OMX workflow context.","messagePattern":"Structured questions are unavailable in the current OMX workflow context\\.","errorType":"exception","errorClass":"OmxQuestionError","httpStatus":null,"severity":"error","filePath":"src/cli/autoresearch-guided.ts","lineNumber":183,"sourceCode":"\t\t\t\theader: input.header,\n\t\t\t\tquestion: input.question,\n\t\t\t\toptions: input.options,\n\t\t\t\tallow_other: input.allow_other,\n\t\t\t\tother_label: input.other_label ?? \"Other\",\n\t\t\t\ttype: input.type,\n\t\t\t\tmulti_select: input.multi_select ?? false,\n\t\t\t\tsource: input.source ?? \"deep-interview\",\n\t\t\t},\n\t\t\t{ cwd: repoRoot },\n\t\t);\n}\n\nasync function ensureStructuredQuestionFallbackAllowed(\n\trepoRoot: string,\n): Promise<void> {\n\tconst policy = await evaluateQuestionPolicy({ cwd: repoRoot });\n\tif (policy.allowed || policy.fallbackAllowed !== false) return;\n\tthrow new OmxQuestionError(\n\t\tpolicy.code ?? \"question_policy_denied\",\n\t\tpolicy.message ?? \"Structured questions are unavailable in the current OMX workflow context.\",\n\t);\n}\n\nfunction shouldFallbackFromStructuredQuestion(error: unknown): boolean {\n\tif (error instanceof OmxQuestionError) {\n\t\tif (\n\t\t\terror.code === \"worker_blocked\"\n\t\t\t|| error.code === \"team_blocked\"\n\t\t\t|| error.code === \"active_execution_mode_blocked\"\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n\n\tconst message = error instanceof Error ? error.message : String(error);","sourceCodeStart":165,"sourceCodeEnd":201,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/cli/autoresearch-guided.ts#L165-L201","documentation":"ensureStructuredQuestionFallbackAllowed() evaluates the question policy for the repo; if structured questions are not allowed AND fallbackAllowed is false, it throws an OmxQuestionError (using policy.code/policy.message when present). This blocks guided autoresearch setup from proceeding without a permitted question mechanism.","triggerScenarios":"evaluateQuestionPolicy({cwd: repoRoot}) returns a policy where allowed is false and fallbackAllowed is false — e.g. the repo or OMX workflow context (agent mode, config, environment) disallows interactive/structured questions entirely.","commonSituations":"Running the guided setup inside a restricted workflow context (CI, non-TTY agent run) where policy explicitly disables both structured questions and fallback, or repo-level configuration denying question mechanisms.","solutions":["Run the guided setup in a context where the question policy permits questions (interactive terminal, allowed agent mode)","Inspect the question policy configuration for the repo and enable structured questions or allow fallback","Skip guided setup and drive autoresearch non-interactively by supplying inputs directly"],"exampleFix":"// policy: { allowed: false, fallbackAllowed: false }\n// after — allow fallback in question policy config\n// policy: { allowed: false, fallbackAllowed: true }","handlingStrategy":"try-catch","validationCode":"const policy = await evaluateQuestionPolicy({ cwd: repoRoot });\nif (!policy.allowed && policy.fallbackAllowed === false) {\n  failFast('Structured questions disabled here; run in an interactive context or adjust policy');\n}","typeGuard":null,"tryCatchPattern":"try { await guidedAutoresearchSetup(...); } catch (e) { if (e instanceof OmxQuestionError && (e.code === 'question_policy_denied' || /Structured questions are unavailable/.test(e.message))) { skipGuidedFlow(); } else throw e; }","preventionTips":["Check question policy before starting guided setup in CI/agent contexts","Keep an explicit non-interactive input path for restricted environments"],"tags":["policy","structured-question","permissions","autoresearch"],"backgroundTag":"feature-disabled-by-policy","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}