Skip to content

fix(sdk): add explicit session creation flags - #362

Closed
Takaros999 wants to merge 1 commit into
mainfrom
codex/session-creation-flag
Closed

Takaros999 wants to merge 1 commit into
mainfrom
codex/session-creation-flag

Conversation

@Takaros999

Copy link
Copy Markdown
Contributor

Uniqueness requests expose session_id even though the only accepted value is "create". Add create_session: true in JS/React and createSession: true in Swift/Kotlin, translating them to the existing protocol field.

The published string option remains supported as a deprecated alias. Default requests stay unchanged, invalid aliases still fail validation, and Kotlin keeps its existing constructor and copy binary signatures. The preview's Create Session checkbox uses the new flag.

Documentation: developer-docs #215.

Validation:

  • JS build, 374 SDK tests, public export checks, TypeScript, and formatting pass.
  • 368 Rust/JS parity cases and HTTP transcript checks pass.
  • 16 Kotlin tests pass in debug/release; old compiled constructor/copy callers run unchanged.
  • Swift wrapper checked against freshly generated bindings; execution covered by macOS CI.

@vercel

vercel Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
idkit-js-example Ready Ready Preview Oct 21, 2026 8:43pm UTC

Request Review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-21T20:45:40.765495Z 0ee2ddc PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0ee2ddc102

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

self.environment = environment
self.connectUrlMode = connectUrlMode
self.sessionId = sessionId
self.createSession = createSession

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Normalize the legacy Swift alias into createSession

When an existing caller constructs IDKitRequestConfig(..., sessionId: "create"), this property remains at its default false, even though native prioritizes sessionId and sends "create". Any UI, logging, or control flow that reads the newly public config.createSession therefore reports the opposite of the request's actual behavior for the supported legacy alias; normalize the stored value in the initializer or derive it from sessionId, as the Kotlin wrapper does.

Useful? React with 👍 / 👎.

@Takaros999 Takaros999 closed this Oct 21, 2026

This branch was successfully deployed

1 active deployment
Preview — 0ee2ddc1 Deployed Oct 21, 2026 by vercel[bot]
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