{"record":{"id":"401b38f4b79c6e04","repo":"deepseek-ai/deepseek-harness","slug":"hooks-codex-point-hook-emitted-a-systemmessage","errorCode":null,"errorMessage":"hooks-codex: ${point} hook emitted a systemMessage, which is not yet surfaced (ignored)","messagePattern":"hooks-codex: (.+?) hook emitted a systemMessage, which is not yet surfaced \\(ignored\\)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/hooks/hooks-codex/src/index.ts","lineNumber":162,"sourceCode":"          ...workdir !== undefined ? { cwd: workdir } : {},\n          signal: opts.signal,\n          trailingNewline: false, // Codex writes stdin without a trailing newline.\n          // Discard a `hookSpecificOutput` block naming a different event.\n          expectedEventName: point,\n        }, () => performance.now())\n        // Clean plain stdout becomes context only when no structured context\n        // exists; nonzero output and raw JSON never leak as prose.\n        if (opts.plainStdoutAsContext === true && output.exitCode === 0\n          && output.additionalContext === undefined\n          && output.stdout.length > 0 && !output.stdout.startsWith('{')) {\n          output.additionalContext = output.stdout\n        }\n        outputs.push(output)\n        // Execution and decision mapping remain in each bridge so dialect\n        // differences stay explicit at their owning extension point.\n        /* jscpd:ignore-start */\n        if (output.systemMessage !== undefined) {\n          ctx.logger.warn(`hooks-codex: ${point} hook emitted a systemMessage, which is not yet surfaced (ignored)`)\n        }\n        if (session && opts.turn !== undefined) {\n          appendHookResult(session, { turn: opts.turn, point, handlerId, output, stderrSummaryMaxChars, durationMs })\n        }\n      }\n    }\n    return mergeHookOutputs(outputs)\n  }\n\n  // TODO(hook-continue-false): `merged.stop` is logged but needs a run-level halt mechanism.\n\n  function contextFrom(merged: MergedHookOutcome): UserMessage | undefined {\n    if (merged.additionalContext.length === 0) return undefined\n    const content: ContentBlock[] = merged.additionalContext.map(text => ({ type: 'text', text }))\n    return createUserMessage({ content, source: PLUGIN_SOURCE })\n  }\n\n  /** Prepend one context without flattening source fields or other downstream metadata. */","sourceCodeStart":144,"sourceCodeEnd":180,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/hooks/hooks-codex/src/index.ts#L144-L180","documentation":"Error \"hooks-codex: ${point} hook emitted a systemMessage, which is not yet surfaced (ignored)\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/hooks/hooks-codex/src/index.ts:162 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove systemMessage from the Codex hook output; it is not surfaced."],"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"}