Skip to content

Conversation

@zomux
Copy link
Contributor

@zomux zomux commented Dec 12, 2025

…rom being processed as agent prompts, enhancing conversation thread management.

…rom being processed as agent prompts, enhancing conversation thread management.
Copilot AI review requested due to automatic review settings December 12, 2025 05:17
@vercel
Copy link

vercel bot commented Dec 12, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
openagents-studio Building Building Preview Comment Dec 12, 2025 5:17am

@zomux zomux merged commit f15ee26 into develop Dec 12, 2025
5 of 9 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances conversation thread management in the AgentRunner by filtering out system threads (those with IDs starting with "thread:system") before creating the EventContext passed to agent's react method. This prevents internal system events and logs from being included in the conversation context that agents use to generate responses.

Key changes:

  • Added filtering logic to exclude system threads when building the filtered_threads dictionary
  • Added explanatory comments documenting that system threads contain internal events/logs not intended for agent prompts

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +474 to +476
# Skip system threads - they contain internal events and logs, not for agent prompts
if thread_id.startswith("thread:system"):
continue
Copy link

Copilot AI Dec 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new system thread filtering logic lacks test coverage. Consider adding tests to verify that:

  1. Threads with IDs starting with "thread:system" are excluded from filtered_threads
  2. System thread messages are not included in the EventContext passed to the react method
  3. Non-system threads continue to be processed normally

This would ensure the filtering behaves correctly and prevent regressions.

Copilot uses AI. Check for mistakes.
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.

3 participants