{"record":{"id":"fcc247fe5191aeb1","repo":"deepseek-ai/deepseek-harness","slug":"hooks-codex-skipping-s-reason-on-s-event-o","errorCode":null,"errorMessage":"hooks-codex: skipping ${s.reason} on ${s.event} (only sync command hooks run)","messagePattern":"hooks-codex: skipping (.+?) on (.+?) \\(only sync command hooks run\\)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/hooks/hooks-codex/src/index.ts","lineNumber":92,"sourceCode":"/** The summary cap bounds a persisted event field — a positive integer or the slice misbehaves silently. */\nfunction assertPositiveInteger(name: string, value: number): void {\n  if (!Number.isInteger(value) || value < 1) {\n    throw new Error(`hooks-codex: ${name} must be a positive integer`)\n  }\n}\n\nexport function apply(ctx: Context, config: Config): void {\n  // Validate before config parsing so a bad value cannot be hidden by its early return.\n  const stderrSummaryMaxChars = config.stderrSummaryMaxChars ?? DEFAULT_STDERR_SUMMARY_MAX_CHARS\n  assertPositiveInteger('stderrSummaryMaxChars', stderrSummaryMaxChars)\n  const defaultTimeoutMs = config.defaultTimeoutMs ?? DEFAULT_HOOK_TIMEOUT_MS\n  let parsed: CodexHookConfig = {}\n  try {\n    const raw: unknown = JSON.parse(readFileSync(config.configPath, 'utf8'))\n    const result = parseCodexConfig(raw)\n    parsed = result.config\n    for (const s of result.skipped) {\n      ctx.logger.warn(`hooks-codex: skipping ${s.reason} on ${s.event} (only sync command hooks run)`)\n    }\n  } catch (error: unknown) {\n    ctx.logger.warn(`hooks-codex: could not load hook config \"${config.configPath}\": ${String(error)} — no hooks registered`)\n    return\n  }\n\n  const model = config.model ?? ''\n\n  // SessionStart is the one emit-shaped (detached) point Codex has: track its\n  // run chains so disposal aborts a still-running hook process and drains the\n  // continuation (docs/defensive-patterns.md: dispose must reach quiescence).\n  const detached = createDetachedRuns()\n  ctx.effect(() => () => detached.drain(), 'hooks-codex: drain detached hook runs')\n\n  /**\n   * Run and fold one configured Codex hook point.\n   *\n   * A supplied turn records the hook invocation/result pair inside that open turn.","sourceCodeStart":74,"sourceCodeEnd":110,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/hooks/hooks-codex/src/index.ts#L74-L110","documentation":"Error \"hooks-codex: skipping ${s.reason} on ${s.event} (only sync command hooks run)\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/hooks/hooks-codex/src/index.ts:92 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a sync command hook; async and non-command hooks are skipped for the Codex bridge."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}