Repository navigation
Conversation
Twiink
temporarily deployed
to
github-app-auth
November 22, 2026 06:18 — with
GitHub Actions
Inactive
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Using channel length as an offset into separate thread history can drop completed replies with preloaded history or duplicate previous replies across consecutive streamed turns.
1 open issue
What changed in this PR
This PR enables instruction-driven Python agents to start empty group chats and adds handling to retain completed streamed replies in group history.
Changes:
- Pass
Nonewhen channel history has no latest message. - Recover streamed messages from thread history when channel history is unchanged.
- Add a public-API regression covering empty starts in normal and streaming modes.
| File | Description |
|---|---|
python/tests/unit/agents/chat_completion/test_chat_history_channel.py |
Tests empty group-chat starts and recorded replies in both modes. |
python/semantic_kernel/agents/channels/chat_history_channel.py |
Handles empty input history and adds streamed-reply recovery. |
Review effort: Balanced
|
|
||
| if len(self.messages) == message_count: | ||
| thread_messages = [message async for message in self.thread.get_messages()] | ||
| self.messages.extend(thread_messages[message_count:]) |
Twiink
temporarily deployed
to
github-app-auth
November 22, 2026 11:10 — with
GitHub Actions
Inactive
Open
12 tasks
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Motivation and Context
An instruction-driven
ChatCompletionAgentcan be invoked without an input message, but putting it in an initially emptyAgentGroupChatraisesIndexErrorin both normal and streaming mode. PassNonewhen the channel has no latest message, and collect the completed streamed response from the thread when the agent has not updated channel history, so the first reply is retained for subsequent group turns.The regression uses the public group-chat API in both modes and checks the response and recorded history with an isolated completion-service double.
Description
Keep existing channel-history updates intact and handle the thread-owned streaming history path.
Contribution Checklist
Validation: both regressions fail against unchanged production code; all 88 chat-completion/group-chat unit tests and the applicable Ruff lint/format checks pass. Existing Pydantic deprecation warnings remain. No live model call was made.
Prepared with AI assistance and verified locally.