Skip to content

feat(cli): move workflow consumers to Relayflows v2 - #2104

Merged
khaliqgant merged 9 commits into
chore/retire-broker-v2from
codex/relayflows-v2-consumers
Nov 8, 2026
Merged

khaliqgant merged 9 commits into
chore/retire-broker-v2from
codex/relayflows-v2-consumers

Conversation

@AgentRelayBot

@AgentRelayBot AgentRelayBot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • remove Relay's final production dependency on the v1 @relayflows/cli / @relayflows/core runner
  • route agent-relay node workflow run and fresh Cloud worker assignments through the existing v2 agent-relay flows run product surface
  • re-enter compiled Bun executables without their virtual /$bunfs script, and use Node for standalone JavaScript workflow/monitor scripts
  • supply explicit empty input for TypeScript through one shared v2 argv builder
  • reject state-bearing worker assignments before any filesystem, download, credential, or child-process side effect

Stack / release boundary

  • stacked on chore/retire-broker-v2; this remains separate from the broker-retirement change
  • @relayflows/sdk stays at the currently published exact pin (2.0.65) while flows#707 is a draft; update the pin to its released version before this PR leaves draft
  • no npm publish, deploy, merge, or feature-flag change is included

Verification

  • repository-pinned npm 10.5.1 npm ci succeeds and installs neither node_modules/@relayflows/cli nor node_modules/@relayflows/core
  • monorepo npm run typecheck passes
  • focused changed-surface CLI suite: 123/123 tests pass
  • npm run build:cli passes
  • CLI npm pack --dry-run passes
  • Prettier and git diff --check pass on changed files

Coordination

  • Khaliq approved dropping v1 and moving both consumers to the v2 SDK surface
  • Cloud owner confirmation is requested before merge for the fail-closed state-selector boundary; current Cloud accepts only v2, rejects startFrom / previousRunId, and keeps resume state in its hosted runner
  • the change is marked SemVer-major with explicit migration guidance
  • the repository's existing 38-day active Trail trajectory belongs to another task, so this work deliberately did not overwrite or complete it

layered-relay-desktop-agent-host and others added 2 commits November 7, 2026 23:25
Remove crates/broker, crates/relay-pty, the root Cargo workspace and
Cross.toml, and the broker-<platform>, harness-driver, harnesses, fleet and
evals packages, along with their workspace, lockfile, CI and publish
references. publish.yml keeps build-node; create-release and summary no
longer wait on broker jobs, and the version step leaves the frozen
harness-driver and broker-<platform> pins at 17.2.1.

The broker-only CLI commands stay registered and print a removal notice
pointing at `relay init` and `relay init --hosted`. relayflows,
cloud-worker and `node workflow run` keep @relayflows/core 1.1.10, which
resolves harness-driver and broker-<platform> 17.2.1 from npm.

Delete fleet-daytona.mjs and the cleanroom qualification consumer
workflow, move install-paths into the CLI, and reword the vendored
orchestrating-agent-relay skill and the durable task provider spec.
crates/relay-node is untouched.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 23865652-eee9-435c-bdf0-720b265a9364

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@khaliqgant
khaliqgant marked this pull request as ready for review November 8, 2026 00:37
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-08T01:04:40.397408Z
We couldn’t complete this review. Comment @codex review to try again.
dbdf41e Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 3 potential issues.

Devin Review

Comment thread CHANGELOG.md Resolved
@greptile-apps

greptile-apps Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The PR changes how local and Cloud worker workflow runs start.

Stop the standalone workflow child before merging; worker shutdown currently leaves it running during cleanup.

Fix All in CodexFindings

  1. P1 Workflow survives worker shutdown ▶
Fix with agent prompt
### Issue 1
packages/cli/src/cli/commands/cloud-worker.ts:253-261
Stopping a standalone Cloud worker now kills the `agent-relay flows run` wrapper, not the workflow. The standalone product loader starts a separate Node child, but neither the loader nor CLI startup forwards `SIGTERM` to it. The worker then removes the run directory and login files while that child can keep running.

Forward cancellation to the actual runner and wait for it to stop before cleanup.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

Moves local workflow aliases and fresh Cloud worker assignments to Relayflows v2.

  • Local workflow runs now use Agent Relay’s v2 command.
  • Fresh Cloud worker assignments now run through the v2 CLI.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  Local[Local workflow alias] --> Args[Shared v2 arguments]
  Worker[Cloud assignment] --> Guard{Needs saved state?}
  Guard -->|Yes| Reject[Reject before side effects]
  Guard -->|No| Files[Prepare files and logins]
  Files --> Args
  Args --> CLI[agent-relay flows run]
  CLI --> Product[Relayflows v2]
  CLI -->|Standalone| Node[Separate Node runner]
  Node --> Product
Loading

Reviews (4) · Last reviewed commit: "Merge remote-tracking branch 'origin/cho..." · Reviewed by Greptile

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed

Tip: Get a Slack DM when cubic finishes reviewing your PRs. Connect Slack

View guided diff | Re-trigger cubic

Comment thread CHANGELOG.md Resolved
Comment thread packages/cli/src/cli/entrypoint.test.ts Resolved
Comment thread CHANGELOG.md Resolved
@agent-relay-code
agent-relay-code Bot force-pushed the chore/retire-broker-v2 branch from e7ec4d1 to 43a614d Compare November 8, 2026 00:43

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed

Note: This PR contains a large number of files. cubic selects up to 200 of the highest-priority eligible files for this review, so some files may not have been reviewed.

View guided diff | Re-trigger cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed

Note: This PR contains a large number of files. cubic selects up to 200 of the highest-priority eligible files for this review, so some files may not have been reviewed.

View guided diff | Re-trigger cubic

@AgentRelayBot
AgentRelayBot marked this pull request as draft November 8, 2026 00:48
@khaliqgant
khaliqgant marked this pull request as ready for review November 8, 2026 01:04
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@khaliqgant
khaliqgant merged commit f96d025 into chore/retire-broker-v2 Nov 8, 2026
7 of 9 checks passed
Comment on lines +253 to +261
const agentRelayCli = resolveAgentRelayCliChildCommand({
execPath: process.execPath,
cliEntrypoint: deps.resolveAgentRelayCliEntrypoint(),
args: buildRelayflowsRunArgs(workflowPath, payload.fileType),
cwd: deps.cwd(),
});
const result = await runChild({
command: process.execPath,
args: relayflowsArgs(relayflowsCli, workflowPath, payload),
command: agentRelayCli.command,
args: agentRelayCli.args,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Workflow survives worker shutdown

Stopping a standalone Cloud worker now kills the agent-relay flows run wrapper, not the workflow. The standalone product loader starts a separate Node child, but neither the loader nor CLI startup forwards SIGTERM to it. The worker then removes the run directory and login files while that child can keep running.

Forward cancellation to the actual runner and wait for it to stop before cleanup.

Knowledge Base Used: CLI command surface and runtime utilities

Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/cli/src/cli/commands/cloud-worker.ts
Line: 253-261

Comment:
**Workflow survives worker shutdown**

Stopping a standalone Cloud worker now kills the `agent-relay flows run` wrapper, not the workflow. The standalone product loader starts a separate Node child, but neither the loader nor CLI startup forwards `SIGTERM` to it. The worker then removes the run directory and login files while that child can keep running.

Forward cancellation to the actual runner and wait for it to stop before cleanup.

**Knowledge Base Used:** [CLI command surface and runtime utilities](https://app.greptile.com/-/switch-tenant?tenant=agent-relay&next=%2Fcustom-context%2Fknowledge-base%2Fagentworkforce%2Frelay%2F-%2Fdocs%2Fcli-command-surface.md)

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Codex Fix in Claude Code

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.

2 participants