Skip to content

[Bug]: Agent Loop can exceed more than 800 steps #21

@danishcontractor

Description

@danishcontractor

Bug Description

I have trajectories in my environment that never exit (balanced mode, GPTOSS-120B) and exceed 800 steps. In agent_loop.py

 return self.graph.astream(
            state if state else Command(resume=resume.model_dump()) if not both_none else None,
            config={
                "recursion_limit": 135,
                "callbacks": callbacks,
                "thread_id": self.thread_id,
            },
            stream_mode="updates",
        )

the value is set to a 135 and its not clear why this happens.

Steps to Reproduce

airline Test Suite_0.json

Sample trajectory

Expected Behavior

Agent should exit without running for so many steps.

Actual Behavior

Agent continues to run -- see trajectory sample.

Environment

Ubuntu, GPT-OSS-120B, Balanced Mode

Error Logs / Screenshots

Attached previously

Configuration

No response

Additional Context

No response

Checklist

  • I have searched existing issues to ensure this is not a duplicate
  • I have provided all the required information above
  • I am using the latest version of CUGA

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions