Skip to content

fix: ensure that github copilot plugin properly sets headers when used in other clients than tui#12316

Merged
rekram1-node merged 1 commit intodevfrom
fix-copilot-tracking
Feb 5, 2026
Merged

fix: ensure that github copilot plugin properly sets headers when used in other clients than tui#12316
rekram1-node merged 1 commit intodevfrom
fix-copilot-tracking

Conversation

@rekram1-node
Copy link
Collaborator

@rekram1-node rekram1-node commented Feb 5, 2026

Without this change, subagent sessions for github copilot on desktop app for example, would count subagent requests against ur quota (due to that header stuff).

Issue: sdk failed to find session since the server does not run in the same working directory as the client when using the desktop app. (setting the directory param ensures that sdk will find the session linked to the session id in all clients)

@rekram1-node rekram1-node merged commit fba5a79 into dev Feb 5, 2026
6 of 7 checks passed
@rekram1-node rekram1-node deleted the fix-copilot-tracking branch February 5, 2026 17:40
@justfortheloveof
Copy link
Contributor

Hi @rekram1-node ,

FWIW - I was investigating this issue and had a similar fix, but instead passed Instance.directory in here:

const client = createOpencodeClient({
baseUrl: "http://localhost:4096",
// @ts-ignore - fetch type incompatibility
fetch: async (...args) => Server.App().fetch(...args),
})

(so that the internal plugins all get initiated with it already set properly)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants