Skip to content

buildGraph crashes on workflows with cyclical then references #200

@lornakelly

Description

@lornakelly

I tried this:

Calling buildGraph on workflows from the use cases defined in the specification repo. Both the managing-github-issues and multi-agent-ai-content-generation examples crash.

This happened:

buildGraph crashes with

RangeError: Maximum call stack size exceeded
      at Array.findIndex (<anonymous>)
      at graph-builder.ts:282
      at Array.filter (<anonymous>)
      at buildTransitions (graph-builder.ts:280)
      at buildGenericTaskNode (graph-builder.ts:325)
      at buildCallTaskNode (graph-builder.ts:336)
      at buildTaskNode (graph-builder.ts:297)
      at buildTransition (graph-builder.ts:252)

Both workflows use then directives that loop back to a previous step. For example, in the ai-content workflow, the refine step has then: evaluateQuality, and in the github-issues workflow, awaitDetailsFromQA has then: awaitForDevWork. The cyclical then references seem to be the issue.

I expected this:

buildGraph should successfully return a graph for all use cases

Is there a workaround?

Not that i'm aware, it will require a bug fix

Anything else?

No response

Community Notes

  • Please vote by adding a 👍 reaction to the issue to help us prioritize.
  • If you are interested to work on this issue, please leave a comment.name: Bug Report 🐞

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions