Skip to content

Fix bug in used_queries record#42

Merged
jenny-miromind merged 2 commits intomainfrom
used_queries_fix
Sep 26, 2025
Merged

Fix bug in used_queries record#42
jenny-miromind merged 2 commits intomainfrom
used_queries_fix

Conversation

@jenny-miromind
Copy link
Contributor

@jenny-miromind jenny-miromind commented Sep 26, 2025

This PR fixes a bug in how used_queries were recorded and checked across agents.

Previously, query usage was tracked only at the tool level. As a result, if a query had already been executed in one sub-agent (e.g. Agent A), the same query would be blocked in another sub-agent (e.g. Agent B). This behavior was too restrictive, since different sub-agents should be allowed to perform the same query within their own context.

The update changes the tracking logic to record queries per agent + tool combination instead of globally. Each sub-agent now maintains its own query usage history, ensuring that queries can be reused across agents without conflict. At the same time, repeated queries within the same agent are still correctly detected and handled.

This fix improves correctness and aligns query-tracking behavior with the intended design of independent sub-agent workflows.

@jenny-miromind jenny-miromind merged commit c474f12 into main Sep 26, 2025
1 check passed
@jenny-miromind jenny-miromind deleted the used_queries_fix branch October 2, 2025 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant