feat: migrate workflow-agents to Render SDK 1.0.0 - #7
Open
Ho1yShif wants to merge 4 commits into
Open
Conversation
task() now takes a TaskContext as its first parameter and returns a
TaskDefinition instead of a callable, so subtasks run through ctx.run().
The loader matched exported functions and had nothing to call for in-process
dispatch, so it now matches the {name, func} shape and supplies a local
context that runs the graph inline.
Also fixes dev:workflows. The CLI re-runs its start command for every task
run, so pointing it at the gateway made each run try to bind port 3000 and
fail. The start command is now the task-only entry, with the gateway running
alongside it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Migrate workflow-agents to Render SDK 1.0.0
Same content as plain comments. The workshop's teaching notes stay; only the borders and their padding go. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Condense the ASCII-box comment blocks
Ho1yShif
requested review from
R4ph-t and
jacobprall
and removed request for
R4ph-t and
jacobprall
August 21, 2026 22:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bumps
@renderinc/sdkto 1.0.0 and migrates to the new task API.API changes
TaskContextas its first parameter.task()returns a{ name, func }definition instead of a callable. Subtasks now run throughctx.run(definition, ...args).retry: { maxRetries, waitDurationMs, backoffScaling }.loader.tsneeded the most work. Auto-discovery matched exported functions, which finds nothing now, so it checks for the definition shape instead. It also exports alocalTaskContextwhoseruncalls the target'sfuncdirectly, which is how the in-process dev mode and the tests execute a workflow without a Render environment.Also condenses the ASCII-box comment blocks to plain comments.
dev:workflows fix
npm run dev:workflowsfailed withstart command exited before registering tasks.render workflows devre-runs its start command for every task run, and the script pointed it at the gateway, which binds port 3000 on each of those runs. The start command is now the task-only entry (npm run start:workflow) and the gateway runs alongside it viascripts/dev-workflows.sh, reaching the task server overRENDER_LOCAL_DEV_URL.This is independent of the SDK bump. I could not tell whether it broke on a CLI upgrade or was already broken.
Docs mismatch
The workflows-defining preview docs list
retries: { maxAttempts, initialDelaySeconds }andinstanceType. Shipped 1.0.0RegisterTaskOptionsdeclaresretry: { maxRetries, waitDurationMs, backoffScaling }andplan. I used the names that compile.Verification
Typecheck passes. 55 of 56 tests pass, with the Redis-dependent queue test skipped as before.
Ran against the local task server in both gateway dispatch modes. The task-run graph confirms real subtask dispatch:
securityandperformancestart 1ms apart under thecode-reviewparent,judgewaits for both, anduxis correctly absent on a PR with no frontend files. Runninguxdirectly with a CSS patch confirms it works under the new signature.🤖 Generated with Claude Code