feat: add :client-name to session config (upstream PR #510)#21
Merged
Conversation
Add :client-name as an optional field to SessionConfig and ResumeSessionConfig. This allows SDK consumers to identify their application, which is included in the User-Agent header for API requests. The CLI server protocol already supports clientName on both session.create and session.resume requests — this change exposes it through the Clojure SDK API. Changes: - specs.clj: ::client-name spec, added to both config key sets - client.clj: forward :client-name in wire param builders, docstrings - integration_test.clj: 3 wire format tests (create, resume, omission) - API.md: added to session config table - CHANGELOG.md: entry under [Unreleased] Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Ports upstream copilot-sdk PR #510 by adding optional :client-name to session create/resume config so consumers can identify their application (forwarded on the wire as clientName, used for User-Agent attribution upstream).
Changes:
- Add
::client-namespec and allow:client-namein both session config specs. - Forward
:client-namethroughbuild-create-session-params/build-resume-session-paramsand document it in docstrings. - Add integration tests + API docs + changelog entry for the new option.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
test/github/copilot_sdk/integration_test.clj |
Adds wire-format assertions that clientName is forwarded/omitted appropriately. |
src/github/copilot_sdk/specs.clj |
Defines ::client-name and includes it in allowed session/resume config keys. |
src/github/copilot_sdk/client.clj |
Includes :client-name in session.create/session.resume params and updates docstrings. |
doc/reference/API.md |
Documents :client-name in the create-session config table. |
CHANGELOG.md |
Notes the new option under [Unreleased]. |
.gitignore |
Ignores update.sh. |
github-actions bot
pushed a commit
that referenced
this pull request
Feb 20, 2026
Add two missing topics to doc/getting-started.md: - Permission model: explain deny-by-default, show approve-all usage, link to Permission Handling section in API Reference - :client-name option: show how to identify an application in session config Both features were added in merged PRs (#18 and #21) but were not reflected in the getting-started tutorial. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Feb 20, 2026
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.
Summary
Port upstream copilot-sdk PR #510: add
:client-nameas an optional field toSessionConfigandResumeSessionConfig.This allows SDK consumers to identify their application, which is included in the User-Agent header for API requests.
Usage
Changes
::client-namespec, added to bothsession-config-keysandresume-session-config-keys:client-nameinbuild-create-session-paramsandbuild-resume-session-params; updated docstrings[Unreleased]Testing