Files
ClaudeDo/src/ClaudeDo.Worker/Runner/RunResult.cs
T
mika kuns 2ebdadff08 fix(worker): surface the real reason a Claude run failed instead of a generic exit-code message
StreamAnalyzer now reads subtype/terminal_reason/errors from the CLI's result
event, and TaskRunner builds a specific ErrorMarkdown from them: max_turns names
the turn budget and points at set_task_config + requeue, api_error passes
through the provider's own message (which carries the reset time), and any
other terminal_reason is appended to the previous generic text instead of
staying invisible. Falls through to the old "exited with code N and no result"
text when there's no terminal_reason at all (a real crash).
2026-08-05 15:55:09 +02:00

20 lines
765 B
C#

namespace ClaudeDo.Worker.Runner;
public sealed record RunResult
{
public required int ExitCode { get; init; }
public string? ResultMarkdown { get; init; }
public string? ErrorMarkdown { get; init; }
public string? StructuredOutputJson { get; init; }
public string? SessionId { get; init; }
public int TurnCount { get; init; }
public int TokensIn { get; init; }
public int TokensOut { get; init; }
public IReadOnlyList<string> Blocks { get; init; } = Array.Empty<string>();
public string? ResultSubtype { get; init; }
public string? TerminalReason { get; init; }
public IReadOnlyList<string> Errors { get; init; } = Array.Empty<string>();
public bool IsSuccess => ExitCode == 0 && ResultMarkdown is not null;
}