Skip to content

Add missing options to ResumeSessionConfig for parity with create#376

Open
friggeri wants to merge 3 commits intomainfrom
frg/resume-options
Open

Add missing options to ResumeSessionConfig for parity with create#376
friggeri wants to merge 3 commits intomainfrom
frg/resume-options

Conversation

@friggeri
Copy link
Collaborator

@friggeri friggeri commented Feb 5, 2026

  • Add model, systemMessage, availableTools, excludedTools, configDir,
    and infiniteSessions to resume session config in all SDKs
  • Update client implementations to pass new options to server
  • Add "Resume Options" documentation section
  • Bump @github/copilot dependency to ^0.0.403

- Add model, systemMessage, availableTools, excludedTools, configDir,
  and infiniteSessions to resume session config in all SDKs
- Update client implementations to pass new options to server
- Add "Resume Options" documentation section
- Bump @github/copilot dependency to ^0.0.403
@friggeri friggeri requested a review from a team as a code owner February 5, 2026 00:17
Copilot AI review requested due to automatic review settings February 5, 2026 00:17
@github-actions
Copy link

github-actions bot commented Feb 5, 2026

✅ Cross-SDK Consistency Review: PASSED

This PR demonstrates excellent cross-SDK consistency. All four SDK implementations (Node.js, Python, Go, and .NET) have been updated uniformly to add the same set of resume session options.

Verified Consistency

Added options to ResumeSessionConfig across all SDKs:

  • model - Change model when resuming
  • systemMessage - Override/extend system prompt
  • availableTools - Restrict available tools
  • excludedTools - Disable specific tools
  • configDir - Override config directory
  • infiniteSessions - Configure infinite session behavior

Implementation details:

  • All four languages properly pass these new options to the session.resume RPC call
  • Naming conventions are correctly applied:
    • Node.js/TypeScript: camelCase (e.g., systemMessage, configDir)
    • Python: snake_case (e.g., system_message, config_dir)
    • Go: PascalCase (e.g., SystemMessage, ConfigDir)
    • .NET: PascalCase (e.g., SystemMessage, ConfigDir)
  • Documentation added with clear examples showing TypeScript usage

Additional Notes

The PR also bumps the @github/copilot dependency to ^0.0.403, which likely includes server-side support for these new resume options. This is the correct approach for ensuring feature parity between the SDKs and the underlying CLI.

No consistency issues found. 🎉

AI generated by SDK Consistency Review Agent

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds missing configuration options to ResumeSessionConfig across all SDKs (Node/TS, Python, Go, .NET) to achieve feature parity with CreateSessionConfig. The changes allow developers to modify session settings when resuming, such as changing the model, updating tool configurations, or adjusting system messages. The PR also bumps the @github/copilot dependency to version 0.0.403 and adds comprehensive documentation for the new resume options.

Changes:

  • Added model, systemMessage, availableTools, excludedTools, configDir, and infiniteSessions options to ResumeSessionConfig in all SDKs
  • Updated client implementations to pass new options to the server during session resume
  • Added "Resume Options" documentation section with examples
  • Bumped @github/copilot dependency from ^0.0.402 to ^0.0.403

Reviewed changes

Copilot reviewed 11 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/harness/package.json Bumped @github/copilot dependency to ^0.0.403
test/harness/package-lock.json Updated lock file with new dependency versions
python/copilot/types.py Added new fields to ResumeSessionConfig type definition
python/copilot/client.py Implemented handling for new resume options (contains bug in system_message handling)
nodejs/src/types.ts Extended ResumeSessionConfig to include new options via Pick type
nodejs/src/client.ts Updated resumeSession to pass new options to server
nodejs/package.json Bumped @github/copilot dependency to ^0.0.403
nodejs/package-lock.json Updated lock file with new dependency versions
go/types.go Added new fields with documentation to ResumeSessionConfig struct
go/client.go Implemented handling for new resume options including SystemMessage serialization
dotnet/src/Types.cs Added new properties with XML documentation to ResumeSessionConfig class
dotnet/src/Client.cs Updated ResumeSessionAsync and ResumeSessionRequest to include new options
docs/guides/session-persistence.md Added "Resume Options" section with table and examples
Files not reviewed (2)
  • nodejs/package-lock.json: Language not supported
  • test/harness/package-lock.json: Language not supported

friggeri and others added 2 commits February 4, 2026 17:23
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions
Copy link

github-actions bot commented Feb 5, 2026

✅ Cross-SDK Consistency Review

I've reviewed this PR for consistency across all four SDK implementations (Node.js/TypeScript, Python, Go, and .NET), and I'm pleased to report that this PR maintains excellent cross-language consistency.

Summary of Changes

This PR adds missing options to ResumeSessionConfig to achieve parity with CreateSessionConfig. The following new fields were added to all four SDKs:

Field Purpose
model Change the model when resuming a session
systemMessage Override or extend the system prompt
availableTools Restrict which tools are available (allowlist)
excludedTools Disable specific tools (blocklist)
configDir Override the default configuration directory
infiniteSessions Configure infinite session behavior

✅ Consistency Verification

All four SDKs have been updated consistently:

  • Node.js/TypeScript (nodejs/src/types.ts, nodejs/src/client.ts): ✅ All fields added
  • Python (python/copilot/types.py, python/copilot/client.py): ✅ All fields added with proper snake_case naming
  • Go (go/types.go, go/client.go): ✅ All fields added with proper PascalCase naming
  • .NET (dotnet/src/Types.cs, dotnet/src/Client.cs): ✅ All fields added with proper PascalCase naming

🎯 API Naming Consistency

The implementations properly respect language conventions:

  • TypeScript: model, systemMessage, availableTools, excludedTools, configDir, infiniteSessions (camelCase)
  • Python: model, system_message, available_tools, excluded_tools, config_dir, infinite_sessions (snake_case)
  • Go: Model, SystemMessage, AvailableTools, ExcludedTools, ConfigDir, InfiniteSessions (PascalCase for exported fields)
  • .NET: Model, SystemMessage, AvailableTools, ExcludedTools, ConfigDir, InfiniteSessions (PascalCase properties)

📚 Documentation

The PR also includes comprehensive documentation in docs/guides/session-persistence.md with a table of all resume options and example usage, which benefits all SDK users.

🔍 Implementation Quality

All four implementations correctly:

  1. Add the new fields to their ResumeSessionConfig types
  2. Pass the fields to the JSON-RPC session.resume request with proper wire format conversion
  3. Include appropriate comments/documentation
  4. Maintain the same semantic behavior across languages

No cross-SDK consistency issues found. 🎉

AI generated by SDK Consistency Review Agent

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.

1 participant