diff --git a/src/backend/codex-stdio.ts b/src/backend/codex-stdio.ts index 0abd9e7..d25cf2f 100644 --- a/src/backend/codex-stdio.ts +++ b/src/backend/codex-stdio.ts @@ -1510,16 +1510,22 @@ function toolCallSummaryFromNotification(message: JsonRecord): JsonRecord | null const item = asRecordAt(asRecordAt(message, "params"), "item"); const itemType = typeof item.type === "string" ? item.type : "unknown"; if (!isVisibleCodexToolItemType(itemType)) return null; - const command = toolCallCommandSummary(item, itemType, toolCallName(item, itemType)); + const redacted = redactJson(item); + const command = toolCallCommandSummary(redacted, itemType, toolCallName(redacted, itemType)); + const outputSummary = toolCallOutputSummary(redacted); return { method, - itemId: stringAt(item, "id"), + itemId: stringAt(redacted, "id"), itemType, - toolName: toolCallName(item, itemType), + toolName: toolCallName(redacted, itemType), status: toolCallStatus(method, item), - exitCode: typeof item.exitCode === "number" ? item.exitCode : null, - durationMs: typeof item.durationMs === "number" ? item.durationMs : null, + exitCode: typeof redacted.exitCode === "number" ? redacted.exitCode : null, + durationMs: typeof redacted.durationMs === "number" ? redacted.durationMs : null, + cwd: typeof redacted.cwd === "string" ? redacted.cwd : null, + processId: typeof redacted.processId === "string" || typeof redacted.processId === "number" ? String(redacted.processId) : null, + command: command ? String(boundedTextSummary(command, { limitChars: 600 }).text) : null, commandFingerprint: command ? shortHash(command) : null, + outputSummary: outputSummary ? String(boundedTextSummary(outputSummary, { limitChars: 600 }).text) : null, valuesPrinted: false, }; }