Skip to content

fix(hitl): resume workflow output async#4065

Merged
icecrasher321 merged 1 commit intostagingfrom
fix/hitl-resume-output
Apr 9, 2026
Merged

fix(hitl): resume workflow output async#4065
icecrasher321 merged 1 commit intostagingfrom
fix/hitl-resume-output

Conversation

@icecrasher321
Copy link
Copy Markdown
Collaborator

Summary

Resume workflow output object needs to have the output of the workflow.

Type of Change

  • Bug fix

Testing

Tested in staging env.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Apr 9, 2026 2:24am

Request Review

@cursor
Copy link
Copy Markdown

cursor bot commented Apr 9, 2026

PR Summary

Low Risk
Low risk additive change that only extends the async resume job result payload; main risk is unexpected assumptions by downstream consumers about the returned shape.

Overview
Async workflow resume jobs now return the resumed workflow output and an executedAt timestamp from executeResumeJob (in resume-execution.ts), so callers polling job results can access the final output for background resumes.

Reviewed by Cursor Bugbot for commit a0b1eed. Configure here.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 9, 2026

Greptile Summary

This PR is a one-line bug fix that adds output: result.output to the object returned by executeResumeJob in the async (Trigger.dev / BullMQ) HITL resume path, so callers that await the task result actually receive the workflow's output. The output field already existed on ExecutionResult and was simply not being forwarded in the return statement.

Confidence Score: 5/5

Safe to merge — minimal, targeted fix with no side-effects.

Single-line addition forwarding a non-optional field (output) that was already present on the ExecutionResult return type. No logic changes, no new dependencies, and all remaining findings (none) are P2 or lower.

No files require special attention.

Vulnerabilities

No security concerns identified.

Important Files Changed

Filename Overview
apps/sim/background/resume-execution.ts Adds output: result.output to the return value of executeResumeJob; ExecutionResult.output is non-optional (NormalizedBlockOutput) so this is always safe to forward.

Sequence Diagram

sequenceDiagram
    participant Caller as Caller (Trigger.dev / BullMQ)
    participant Job as executeResumeJob
    participant PRM as PauseResumeManager
    participant Exec as Workflow Executor

    Caller->>Job: trigger(payload)
    Job->>PRM: getPausedExecutionById(pausedExecutionId)
    PRM-->>Job: pausedExecution
    Job->>PRM: startResumeExecution(args)
    PRM->>Exec: runResumeExecution(...)
    Exec-->>PRM: ExecutionResult { success, output, status, ... }
    PRM-->>Job: ExecutionResult
    Job-->>Caller: { success, workflowId, executionId, parentExecutionId, status, output, executedAt }
Loading

Reviews (1): Last reviewed commit: "fix(hitl): resume workflow output async" | Re-trigger Greptile

@icecrasher321 icecrasher321 merged commit 9fbe514 into staging Apr 9, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant