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).
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
namespace ClaudeDo.Worker.Runner;
|
||||
|
||||
public sealed class RunResult
|
||||
public sealed record RunResult
|
||||
{
|
||||
public required int ExitCode { get; init; }
|
||||
public string? ResultMarkdown { get; init; }
|
||||
@@ -11,6 +11,9 @@ public sealed class RunResult
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user