fix(agents): reset conversation with new session - #10056
Zhijie Huang (hund030) wants to merge 3 commits into
Conversation
|
Azure Pipelines: Successfully started running 2 pipeline(s). 21 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
📋 Prioritization NoteThanks for the contribution! The linked issue isn't in the current milestone yet. |
There was a problem hiding this comment.
🟡 Changes recommended
The managed Responses path remains unaffected, and the existing Tier 2 scenario asserts the obsolete behavior.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Updates Responses invocations so --new-session also resets conversation state.
Changes:
- Adds a shared conversation-reset predicate.
- Applies it to local and remote hosted invocations.
- Tests all flag combinations.
File summaries
| File | Description |
|---|---|
invoke.go |
Resets conversations when starting new sessions. |
invoke_test.go |
Tests reset-flag combinations. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 2
- Review effort level: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Glenn Harper (glharper)
left a comment
There was a problem hiding this comment.
One flag-conflict case remains in #10056.
There was a problem hiding this comment.
🟡 Changes recommended
The new conflict validation incorrectly rejects invocations and A2A protocol combinations where conversations are unused.
Get a fresh assessment by requesting another Copilot review.
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 1
- Review effort level: Balanced
| return err | ||
| } | ||
|
|
||
| if flags.newSession && flags.conversation != "" { |
azure.ai.agents PR buildNote This is an unsigned development build. Install it only if you trust this PR. Install the extension: azd ext install "https://azuresdkartifacts.z5.web.core.windows.net/azd/extensions/pr/10056/azure-ai-agents.zip"
|
Summary
--new-sessionalso force a new conversation for Responses invocations.--new-sessionand--new-conversationflag combinations.Fixes #7866
Validation
go test ./internal/cmd -count=1conv_09cfa...; session:b8b9308e...--new-session: conversation:conv_01610f...; session:0d210fee...The target agent returned HTTP 500 after assigning the identifiers, but the session/conversation lifecycle covered by this change completed and demonstrated the expected reset behavior.