diff options
Diffstat (limited to 'internal/executor/claude.go')
| -rw-r--r-- | internal/executor/claude.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/executor/claude.go b/internal/executor/claude.go index 3c87f26..0123754 100644 --- a/internal/executor/claude.go +++ b/internal/executor/claude.go @@ -51,7 +51,7 @@ func (r *ClaudeRunner) binaryPath() string { // project into a temp sandbox, runs the agent there, then merges committed // changes back to project_dir. On failure the sandbox is preserved and its // path is included in the error. -func (r *ClaudeRunner) Run(ctx context.Context, t *task.Task, e *storage.Execution) error { +func (r *ClaudeRunner) Run(ctx context.Context, t *task.Task, e *storage.Execution, ch AgentChannel) error { projectDir := t.Agent.ProjectDir // Validate project_dir exists when set. @@ -164,7 +164,7 @@ func (r *ClaudeRunner) Run(ctx context.Context, t *task.Task, e *storage.Executi // extract the text as the summary and fall through to normal completion. if isCompletionReport(questionJSON) { r.Logger.Info("treating question file as completion report", "taskID", e.TaskID) - e.Summary = extractQuestionText(questionJSON) + _ = ch.ReportSummary(ctx, extractQuestionText(questionJSON)) } else { // Preserve sandbox on BLOCKED — agent may have partial work and its // Claude session files are stored under the sandbox's project slug. @@ -177,7 +177,7 @@ func (r *ClaudeRunner) Run(ctx context.Context, t *task.Task, e *storage.Executi summaryFile := filepath.Join(logDir, "summary.txt") if summaryData, readErr := os.ReadFile(summaryFile); readErr == nil { os.Remove(summaryFile) // consumed - e.Summary = strings.TrimSpace(string(summaryData)) + _ = ch.ReportSummary(ctx, strings.TrimSpace(string(summaryData))) } // Merge sandbox back to project_dir and clean up. |
