Skip to content

Comments

feat: add clientName to SessionConfig and ResumeSessionConfig#9

Merged
kawax merged 2 commits intomainfrom
copilot/update-official-sdk-client-name
Feb 19, 2026
Merged

feat: add clientName to SessionConfig and ResumeSessionConfig#9
kawax merged 2 commits intomainfrom
copilot/update-official-sdk-client-name

Conversation

Copy link
Contributor

Copilot AI commented Feb 19, 2026

Tracks official SDK PR #510. The CLI protocol already supports clientName on session.create and session.resume requests, but the SDK types were not exposing it. clientName identifies the calling application and is forwarded as part of the User-Agent header.

Changes

  • SessionConfig — added optional clientName field (after sessionId, before model) in constructor, fromArray(), and toArray()
  • ResumeSessionConfig — same, as first parameter (matching official SDK ordering)
  • Tests — updated SessionConfigTest and ResumeSessionConfigTest to cover the new field in full-field and toArray scenarios

Usage

Copilot::run(
    prompt: 'Hello',
    config: new SessionConfig(clientName: 'my-laravel-app'),
);

config: new ResumeSessionConfig(clientName: 'my-laravel-app'),

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/copilot_internal/user
    • Triggering command: /home/REDACTED/.local/bin/copilot copilot --headless --stdio --log-level info (http block)
    • Triggering command: /home/REDACTED/.local/bin/copilot copilot --headless --stdio --log-level info stty stty n/stty (http block)
    • Triggering command: /home/REDACTED/.local/bin/copilot copilot --headless --stdio --log-level info pilot-sdk/vendor/bin/stty stty ndor/bin/stty (http block)

If you need me to access, download, or install something from one of these locations, you can either:


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: kawax <1502086+kawax@users.noreply.github.com>
Copilot AI changed the title [WIP] Update official SDK to include clientName feat: add clientName to SessionConfig and ResumeSessionConfig Feb 19, 2026
Copilot AI requested a review from kawax February 19, 2026 13:23
@kawax kawax marked this pull request as ready for review February 19, 2026 13:40
@kawax kawax merged commit fbe8a24 into main Feb 19, 2026
5 checks passed
@kawax kawax deleted the copilot/update-official-sdk-client-name branch February 19, 2026 13:40
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