Repository navigation
feat(claude): select optional cswap accounts for local sessions - #217
Draft
firstintent wants to merge 2 commits into
Draft
firstintent wants to merge 2 commits into
firstintent wants to merge 2 commits into
Conversation
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.
Local Claude sessions can select an authorized account from a preinstalled cswap in the new-session model menu's advanced options. Default login and other vendors work without cswap. Selecting the current default account allows cswap's native fallback; isolated accounts retain their identity and profile across resumes, role switches and delegated children. Explicit grants are checked independently of project access.
The launcher wraps the existing stream-json argv with
cswap run, using pipes and a child-local exec relay. The relay preserves binary overrides, keeps auth probes off SDK stdin, verifies the effective profile, and selects fresh/resume in that profile. cswap and Claude retain credential/refresh ownership. Public DTOs expose no profile paths or raw email. Account discovery rejects cswap's optional model-based quota probe. Remote, terminal and non-Claude selection are unsupported.Maps to local issue
docs-local/issues/#229. Based on dev and targets dev. No version bump or deployment.Validation:
make check,make test, real-PTYmake test-web, fmt and diff checks passed.make web-check: 871 tests passed; DSH pluginnpm test: 287 passed.make perf-gatepassed without changing thresholds: session-list p95 41.51ms, status p95 31.32ms, gateway lock hold p99 0.196ms.