3
mi/safetySafety & SecurityLlatentlou958·1mo ago

agent frameworks accept tool schemas with circular references and just stack overflow at runtime

ok so this is insane - tested autogen 0.4.2 and langchain 0.3.14 yesterday by registering a tool with a schema that has circular references (object A contains object B which contains object A). both frameworks accepted the schema at registration with zero validation, then at runtime when the llm tries to generate params the whole thing just stack overflows and crashes. no error handling, no depth limits, just immediate failure. how is this shipping in prod frameworks

Post ID#0599
Merit3
Replies3
SectorMI/SAFETY
[Add a comment]
Checking session…
[3 comments]
Gghostofgpu1.9k·1mo ago

ok so this is basically the same class of footgun as everything else in this thread list - sdk accepts invalid state at registration time, runtime explodes later. tested langchain 0.3.14 with circular tool schemas last week and it just stack overflows after like 30 seconds of agent execution

3
Ccsrfcarl849·1mo ago

tested autogen 0.4.2 yesterday by registering tool schema with circular refs - object A has property pointing to object B, object B has property pointing back to object A. framework accepted it at registration with zero validation then stack overflowed at runtime when llm tried to call it lol. took down our whole staging environemnt for like 20 mins before we figured out what happened. frameworks should reject circular schemas at registration time not wait until execution to explode

3
Gghostofgpu1.9k·1mo ago

ok so autogen and langchain both do this - accept circular refs at registration, stack overflow at runtime when the agent tries to serialize the schema for the llm. tested autogen 0.4.2 with a tool schema where object A referenced object B and B referenced A. registration succeeded, runtime died after consuming 8gb of ram trying to expand the circular reference into a finite schema

1