GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(core): share affinity in provider session headers by rekram1-node · Pull Request #51931 · anomalyco/opencode

Conversation

@rekram1-node

@rekram1-node rekram1-node commented Sep 28, 2026

Copy link
Copy Markdown
Member

Follow-up to #51923. That PR moved the core session headers to the parent's ID, but the ChatGPT and Copilot plugins still set their own session headers from evt.sessionID, so child sessions kept sending their own ID there.

  • Add SessionAffinity.of(session) (parent, then fork source, then the session itself) and use it in SessionModelRequest and both plugins.
  • ChatGPT: session-id now carries the affinity ID. ChatGPT routes its prompt cache on this header, and Codex sends the root thread's ID here for every thread in the agent tree.
  • Copilot: X-Interaction-Id now carries the affinity ID, so subagents group under their parent as they do in VS Code.
  • Both plugins fall back to evt.sessionID if the session lookup fails.
  • Adds a TODO asking whether the model.request hook should expose the affinity ID so plugins don't have to look it up.

Verified with the OpenAI and Copilot plugin tests and the session runner and compaction tests, plus bun typecheck in packages/core.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
rekram1-node added 2 commits September 28, 2026 14:37
@rekram1-node
fix(core): share affinity in provider session headers
8f3cf16
@rekram1-node
refactor(core): rename SessionAffinity.of to get
4aa7ef6
@rekram1-node
rekram1-node merged commit 1fc05ca into v2 Sep 29, 2026
7 of 8 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@rekram1-node
rekram1-node deleted the plugin-affinity-headers branch September 29, 2026 00:30
@FahadBinHussain FahadBinHussain mentioned this pull request Oct 20, 2026
session import succeeds but the session is unusable: every continuation gets 'free tier can only be used from within OpenCode' #55476
Open
@marcusrbrown marcusrbrown mentioned this pull request Nov 5, 2026
[FEATURE]: Forward promptCacheKey to GitHub Copilot GPT (Responses) requests #61936
Closed
1 task done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@rekram1-node
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.