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.
Recursive Subagent Execution & Collapsible Tree Log UI & Codegen Documentation #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
Recursive Subagent Execution & Collapsible Tree Log UI & Codegen Documentation #21
Changes from all commits
c1c22e0File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Use deterministic workflow resolution in both generators.
The current lookup can return an earlier name match instead of an exact ID match. Duplicate names can also select an arbitrary workflow.
frontend/src/flow/codegen.ts#L364-L364: resolve an exact ID first, then accept only a unique name match.frontend/src/flow/codegen.ts#L585-L585: apply the same resolution order and duplicate-name handling.📍 Affects 1 file
frontend/src/flow/codegen.ts#L364-L364(this comment)frontend/src/flow/codegen.ts#L585-L585🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Sanitize workflow names before emitting generated source comments.
Workflow.nameis interpolated directly into Python and JavaScript line comments. A line terminator ends the comment, and the remaining text can become executable code inside the generated node function.frontend/src/flow/codegen.ts#L368-L368: sanitizesubWf.namebefore inserting it into the Python comment.frontend/src/flow/codegen.ts#L589-L589: apply the same sanitization before inserting it into the JavaScript comment.📍 Affects 1 file
frontend/src/flow/codegen.ts#L368-L368(this comment)frontend/src/flow/codegen.ts#L589-L589🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Do not execute
cfg.inputas JavaScript.cfg.inputis workflow configuration. Imported or edited workflow data can execute in the browser global scope throughnew Function. A malicious workflow can access browser storage and send data through network APIs.Use interpolation, JSON input, or a restricted expression parser. Do not evaluate configuration as JavaScript.
🧰 Tools
🪛 OpenGrep (1.26.0)
[ERROR] 328-328: new Function() with dynamic input can execute arbitrary code. Avoid dynamic code evaluation entirely, or use a safe alternative.
(coderabbit.code-injection.new-function-js)
🤖 Prompt for AI Agents
Source: Linters/SAST tools
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift
Reject recursive workflow cycles before starting the nested run.
The nested call passes
allWfsback intorunFlowwithout an ancestry or depth guard. A self-reference, or a cycle such asA → B → A, creates unbounded nested execution. The per-flowmaxStepsguard does not limit recursion across calls.Track selected workflow IDs in the execution context. Throw a descriptive error when a workflow ID repeats. Add a maximum nesting depth as a fallback.
🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Propagate an unhandled nested-flow error to the parent flow.
runFlowrecords failures inRunLog.error. This code ignoreslastLog.errorand returns a normal subagent result. The parent flow then follows its success path even when the nested flow stopped on an error or the max-step guard.If the final nested log has
error, throw it from the subagent node so that the parent can select its error edge.🤖 Prompt for AI Agents
Uh oh!
There was an error while loading. Please reload this page.