Skip to content

[fix] Include routed member responses in team history#8579

Open
Fahmid-Arman wants to merge 1 commit into
agno-agi:mainfrom
Fahmid-Arman:fix-route-team-history-summary
Open

[fix] Include routed member responses in team history#8579
Fahmid-Arman wants to merge 1 commit into
agno-agi:mainfrom
Fahmid-Arman:fix-route-team-history-summary

Conversation

@Fahmid-Arman

Copy link
Copy Markdown
Contributor

Summary

Fixes #8573.

This PR fixes route-mode team history and session summary context dropping routed member assistant responses.

In route/respond-directly teams, the delegated member response is returned as the team response, but the stored team-level run may not include that assistant message. The actual assistant answer is stored on the member run. Existing history and summary builders used the default member-message filtering behavior, so routed assistant responses were omitted from replayed history and session summaries.

Changes:

  • Include routed member responses when building history for respond-directly teams
  • Include routed member responses in route-mode session summary context
  • Preserve coordinate-mode behavior
  • Add regression coverage for sync and async route-mode history replay

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Improvement
  • Model update
  • Other:

Checklist

  • Code complies with style guidelines
  • Ran format/validation scripts (./scripts/format.sh and ./scripts/validate.sh)
  • Self-review completed
  • Documentation updated (comments, docstrings)
  • Examples and guides: Relevant cookbook examples have been included or updated (if applicable)
  • Tested in clean environment
  • Tests added/updated (if applicable)

Duplicate and AI-Generated PR Check

  • I have searched existing open pull requests and confirmed that no other PR already addresses this issue
  • If a similar PR exists, I have explained below why this PR is a better approach
  • Check if this PR was entirely AI-generated (by Copilot, Claude Code, Cursor, etc.)

Tests

./scripts/format.sh
pytest -q libs/agno/tests/unit/team/test_get_messages_dedup.py libs/agno/tests/unit/team/test_route_mode_history.py
./scripts/validate.sh

@Fahmid-Arman Fahmid-Arman requested a review from a team as a code owner June 26, 2026 09:09
Signed-off-by: Fahmid Arman <fahmid.brac@gmail.com>
@Fahmid-Arman Fahmid-Arman force-pushed the fix-route-team-history-summary branch from 7cfa23c to 201ee9c Compare June 26, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Route-mode (TeamMode.route) team runs drop the assistant answer from replayed history and session summaries

1 participant