Python: Fix FHA session ID traslation - #7601
Closed
Tao Chen (TaoChenOSU) wants to merge 1 commit into
Closed
Conversation
Tao Chen (TaoChenOSU)
deployed
to
github-app-auth
August 10, 2026 17:20 — with
GitHub Actions
Active
Tao Chen (TaoChenOSU)
deployed
to
github-app-auth
August 10, 2026 17:20 — with
GitHub Actions
Active
Tao Chen (TaoChenOSU)
deployed
to
github-app-auth
August 10, 2026 17:20 — with
GitHub Actions
Active
Contributor
There was a problem hiding this comment.
Pull request overview
Separates Foundry hosted compute-session IDs from conversation continuation IDs.
Changes:
- Stores
agent_session_idin session state. - Preserves conversation IDs independently.
- Updates documentation and unit tests.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
_agent.py |
Separates compute and conversation session handling. |
test_foundry_agent.py |
Updates session behavior tests. |
README.md |
Documents the separate session identifiers. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+814
to
+818
| if agent_session_id is None and effective_options.get("isolation_key") is not None: | ||
| agent_session_id = await self._create_agent_session_id( | ||
| isolation_key=cast(str | None, effective_options.get("isolation_key")), | ||
| ) | ||
| session.state[_FOUNDRY_AGENT_SESSION_ID_STATE_KEY] = agent_session_id |
| conversation_id is None and not options.get("model") | ||
| ) | ||
| if should_strip_model: | ||
| if not options.get("model"): |
Contributor
There was a problem hiding this comment.
Agent Framework Review — Iteration 1
Completed passes: 5 | Result: No high-severity findings
Scope: full PR (1 commit(s)): bb48154777be
Review passes
- Correctness (
gpt-5.6-sol) — No issues found in this pass. - Security Reliability (
claude-opus-4.8) — No issues found in this pass. - Test Coverage (
gpt-5.6-sol) — No issues found in this pass. - Failure Modes (
claude-opus-4.8) — No issues found in this pass. - Design Approach (
claude-opus-4.8) — No issues found in this pass.
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 & Context
Addresses #7503
Description & Review Guide
Related Issue
Fixes #
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.