Skip to content

Agent sub-process leaks toolCallResults into parent scope #6479

@nikku

Description

@nikku

Describe the Bug

Agentic sub-process "leaks" toolCallResults variable into parent scope:

Image

This is surprising to me as a user, as I expect that the agent works isolated, does not "leak" a variable, beyond the agent variable that I have to explicitly output map. It can also be an issue, when agents run in parallel to each other, or nested inside of each other.

Steps to Reproduce

  1. Run ai-agent-chat-with-tools
  2. Observe global toolCallResults variable, populated with results of last agent run

Expected Behavior

  • Agent is self-contained and does not leak any variable not explicitly specified.

Environment

  • OS: Ubuntu 24
  • Library version: 8.8, 8.9-alpha3
  • Camunda version: 8.8, 8.9

Related to camunda/camunda#46530
Related to this discussion

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions