Skip to content

feat(multi-user): add provider-neutral connected accounts - #134970

Merged
steipete merged 26 commits into
mainfrom
claude/multiplayer-mechanics-df097d
Sep 3, 2026
Merged

steipete merged 26 commits into
mainfrom
claude/multiplayer-mechanics-df097d

Conversation

@scoootscooob

@scoootscooob scoootscooob commented Sep 1, 2026 •

Copy link
Copy Markdown
Member

What this changes

People sharing a Gateway can add their own provider accounts, choose a new-chat default, and see or change the account selected for an individual chat. Settings → Profile → Connected accounts → Add account and openclaw models accounts login now use one provider catalog and one Gateway-owned interactive sign-in flow. This rewrites the original PR, preserving its ancestry and @scoootscooob's contributor credit.

Merged into main as e4e230510c15. Tested PR head: 926fae23b475389021e4fa8077f331fc3aa84e0c, integrated with main e0dad1fc133391c98b0763239d41fc3562c8c6fa. The provider-I/O authority repair has exact-head focused tests and normal-Gateway held-request proof: after real role revocation and socket closure, both synthetic token/poll attempts made zero requests and zero private writes; restored-writer controls each made one request and saved a credential. The exact private-QA build passed. Exact-head hosted CI passed: 199 jobs successful, 3 skipped, zero failed; openclaw/ci-gate passed. Native prepare and merge verification passed, and the repository helper completed the merge with original contributor credit preserved. A separately observed, inherited SOCKS transport limitation is recorded below, not presented as a successful traversal or an unresolved auth-fence repair. Earlier provider-authentication and account/default results keep their original head attribution.

Concept Ownership and behavior
Saved account A credential retained for one Gateway-assigned person or Owner profile; several accounts for a provider can coexist.
New-chat default That person's preferred account for a provider. Changing or clearing it does not repin existing chats.
Chat selection A session-owned choice retained for collaborators and forks. A fresh personal selection must belong to the human selecting it.
Sign-in attempt A temporary, cancellable Gateway operation; nothing is saved until authorized completion.

Yes: account selection is part of the model picker. New session and existing chats have Account for this chat inside their model menu. The fresh-draft selection is ephemeral, previews only the current person's accounts, and uses the existing model@account creation contract. After explicitly choosing a personal account, Start stays disabled until its preview confirms that account and an eligible model. Automatic retains the existing policy: unknown availability and temporary cooldowns do not block Start; confirmed missing credentials or authentication failure do. It does not change the personal default or save private account IDs in model preferences. Account changes also invalidate speculative titles so a title cannot be reused under a different selection.

Connected accounts provides inventory, an Add account provider/method picker, default selection, and clear-default controls. The CLI uses the same Gateway catalog and operations:

openclaw models accounts list
openclaw models accounts login
openclaw models accounts login anthropic --method api-key
openclaw models accounts login openai --method device-code
openclaw models accounts login xai --method api-key
openclaw models accounts use <account-id>
openclaw models accounts clear-default <provider>

Account ownership follows the profile actually assigned by the Gateway, not --agent, the OS username, or a caller-supplied ID. A real single-user token/password Control UI connection can receive the durable Owner profile; every device using that profile shares its accounts. Main represents such real shared-secret sockets with a system actor, which is not by itself an agent impersonation. Short-lived CLI connections are not automatically assigned Owner, so models accounts needs an identity-bearing endpoint even when the local UI shows Owner. Identity-bearing shared-server connections preserve their actual per-person profiles. Use Tailscale Serve or a trusted proxy to distinguish teammates, and approve device pairing separately. Explicit shared credentials take precedence over Tailscale identity authentication; browser identity does not transfer to the CLI.

Credentials are stored by the selected Gateway: locally for a local Gateway, on the server for a shared one. Signing in on a laptop does not configure another server automatically. Cached device credentials travel only in auth.deviceToken; explicit shared credentials remain in auth.token. A device token or copied profile ID does not authorize personal-account operations.

With administrator access and working configured inference, Custodian's model accounts command / manage_model_accounts action hands the person to Settings → Profile → Connected accounts or gives CLI guidance. The handoff itself makes no configuration change. Sign-in stays in protected human-facing inputs; credentials are not requested in chat, and delegated agents cannot complete it. Profile and the CLI remain the direct setup paths when Custodian is unavailable.

Provider-neutral account setup

The Gateway advertises only provider methods that explicitly opt into personal accounts. Discovery respects the existing plugin enablement/trust boundary; it does not install plugins, enable them, import native CLI credentials, or read ambient shared credentials. The current catalog includes:

Provider Personal setup methods
Anthropic API key only; no Claude subscription-token collection or import.
OpenAI API key, browser OAuth, and device-code sign-in.
Grok / xAI API key and the provider-owned device sign-in flow.

The provider and optional --method select the same method offered by Add account. Gateway, saved Person, and Scope: Personal remain visible before credential entry; CLI context stays on stderr and JSON stays on stdout. The System / agent models auth flow remains separate. A native CLI's own login is not treated as permission to import its subscription credentials.

Provider plugins produce steps through the existing WizardSession/prompter contract. The UI reuses the shared wizard-step controls, and the CLI renders those same steps. users.authConnect.catalog/start/status/answer/cancel replaces the unshipped provider-specific complete/token flow; there is no parallel core OpenAI exchange or Claude token form. Notes require acknowledgment of the exact current step, progress is not answered, and protected inputs keep credentials and authorization codes out of arguments/chat. Device-code instructions include the code, expiry and anti-phishing guidance produced by the shared wizard. Both clients keep checking for completion while an input is open, and stop showing retired prompts. Validation can safely reopen the same step without echoing its answer.

The Gateway supplies the original operation’s live assertCurrent closure to provider authentication. Participating methods revalidate at the guarded request boundary after awaited preparation and on redirects, not only when a status poll happens. The Gateway stages exactly one provider credential, ignores provider config/default patches, and commits only after rechecking the initiating human connection. Only that person's private credential/default changes. Provider-owned account matching controls reconnect reuse; OpenAI OAuth requires the same user and workspace. Different literal API keys get different retained IDs. Cancellation waits for the exact server acknowledgment; disconnect, replacement, expiry and lost authority prevent late persistence.

Storage and authority

Credentials and links reuse identity-scoped records in the existing secret_store_entries table in state/openclaw.sqlite; pending sign-ins stay in bounded Gateway memory. The provider-neutral follow-up and landing repairs introduce no SQLite schema/table/version change, migration, new database, retention change, configuration/environment option, dependency, or protocol-version bump. It does extend the validated private credential payload to the canonical inline API-key/token/OAuth shapes and retain provider-owned refresh metadata needed by methods such as xAI. Host-owned secret references and copy-to-agents credentials are not accepted as personal imports. That is a credential-representation change, not a claim that persistence behavior is unchanged. The revised unshipped RPC surface has generated native-client follow-through. Personal credentials stay out of shared snapshots and automatic rotation pools; the original separate-table/shared-writing path remains removed.

Provider plugins own authorization and provider identity. The Gateway owns the exact connection's authority, operation lifetime, atomic persistence, and requester/session-specific availability. Cancellation, disconnect, revoked authority, identity replacement/merge, expiry, and shutdown fence late completion. Fresh personal selections are checked before credential/provider I/O and again at the session commit, including awaited worktree/title/archive work. Existing chat pins remain sticky when another participant has a different default or the original default is cleared.

This integration carries that same live authority through speculative title generation, isolated completion, native runtime setup, HTTP preparation, CLI preparation, process/PTY launch, retries, and paired-node dispatch. Retired authority must not dispatch, fall back, or quarantine a healthy credential; cleanup still runs. Local callbacks remain callable owner checks, never serialized bearer authority.

ChatGPT reconnection reuses a private slot only for the same user and workspace, not workspace membership alone; see Codex's distinct claims. Literal API keys and opaque tokens reuse a slot only when unchanged. Personal reconnects never overwrite administrator-linked shared credentials.

The displayed account is a selection, not a billing receipt. Ordered shared failover for the same provider still applies. Clearing a default retains credentials and existing pins; revoke with the provider if existing sessions must lose access. This is convenience within one trusted Gateway domain, not isolation from administrators or the Gateway OS user. Channel/agent turns do not acquire an inferred human identity, and broader channel/cloud-worker account discovery is not claimed.

See the per-person model and CLI reference.

Landing integration checkpoint

The ClawSweeper namespace finding was reproduced and repaired at the classifier owner. Only a complete generated locator, with a UUID or canonical gateway-owner owner and a UUID credential component, receives private-account handling. Existing shared profile names such as personal:work remain normal shared profiles. A well-formed but missing personal locator remains private and fails closed. The regression seeds the canonical database as an older writer would, then checks load/save, snapshot publication, bookkeeping, and removal. It also verifies that selected private credentials and usage remain in their owner store, including the local Owner profile. No new schema, migration, config option, or fallback path was added by this repair.

The merge retains both the personal-account authority fences and main's newer runtime contracts. Codex keeps native thread model/provider selection and the shared passive-item validator; reply accounting records runtime-native model facts; the process relay remains referenced until its lifecycle ends. The CLI admission regression moved with main's extracted test owner, preserving its real admission and cleanup rather than duplicating the old case. New-session work retains main's consume-only title lifecycle and terminal routing while keeping a draft account separate from saved defaults. These are integration repairs, not a new auth or persistence design.

Two additional integration boundaries were reproduced. Real shared-secret Owner connections carry main's system actor; the account path now reuses the existing personal-caller eligibility rule instead of rejecting every actor-bearing socket. This does not admit synthetic, delegated, or agent callers. Separately, an explicit target profile plus admin scopes cannot substitute for an authenticated actor: missing actors are rejected before owner lookup or credential work. Real token/password and reconnect cases, and negative caller controls, are included in the focused replay. The personal-link unit fixture was corrected to use the generated locator contract after first recording its intended failure.

Independent review also found account-picker pagination could close the dropdown and reload page one. The shared control now cancels the dropdown selection event only for Load more, so later-page accounts remain selectable in both chat and New session. The browser regression failed before this change. Its final full-file browser replay passed 7 tests.

The account service now also owns link-metadata reads, manual linking and default clearing. All use the same current-human admission and existing final SQLite writer checks as account selection; manual attachment still requires an identified administrator. Generic profile-edit permissions are unchanged. Private attachment reads target-owner metadata, not another owner’s credential. Persisted chat metadata and startup now use the chat’s actual pin or shared credentials; only agent-only new-session previews use the viewer’s personal defaults. Viewer-specific account labels remain separate from those availability decisions.

Current 926fae23 proof

The exact published head passed 319 focused tests in 14 files / 7 shards in 57.237 s, covering connected-account Gateway authority, private storage, provider catalog/API-key contracts, OpenAI browser/device flows, xAI device flow, and guarded-fetch release/SSRF behavior. The exact-head OPENCLAW_BUILD_PRIVATE_QA=1 pnpm build:ci-artifacts passed 99.784 s with source, index and HEAD unchanged.

A fresh normal compiled Gateway loaded the same installed synthetic provider used for the historical 2841 RED, which had observed one forbidden token request and one forbidden poll request after revocation despite zero credential persistence. On 926fae23, the actual provider context supplied assertCurrent in every phase. After its sensitive step was answered, the provider waited before its next HTTP request. A separate administrator changed the initiating writer to reader; the original socket closed before release. No status request occurred during any hold, so status polling could not mask the gap.

Exact-head normal-Gateway phase Observed result
Retired token request 0 token requests; failed / authority; private credential/default metadata and session metadata unchanged.
Restored writer, fresh token attempt 1 actual loopback HTTP request; connected and saved one synthetic account/default.
Retired device-poll request 0 poll requests; failed / authority; measured private/session state unchanged.
Restored writer, fresh poll attempt 1 actual HTTP request; connected and saved a second retained account with one current provider default. No sessions created.

The full probe passed in 3.831 s. The exact observed pending test device was approved through the authorized local-owner API because the desktop was locked: fixture preparation, not browser or CLI-RPC approval proof. The serving build matched 926fae23; post-cleanup comparison matched 11,834 regular files and 288 dependency links, without claiming hashes of external link-target contents. Gateway/wrapper exited zero without escalation; recorded processes/groups and all four Gateway/proxy/sink ports were gone; isolated state, bootstrap/probe homes and the control descriptor were removed. No browser was opened. This proves real Gateway authority at a synthetic provider’s actual loopback I/O boundary, not external OAuth acceptance, provider-valid credentials, inference or billing.

Frozen precommit integration slices also passed 90 worker/auth tests in 9 files and 120 node-policy/placement tests in 6 files. The incoming-main Dashboard retention defect had an actual DOM-identity RED (1 failed / 3 passed), followed by 4/4 browser GREEN, 45 sibling unit tests, UI types and scoped lint. A common Lit template boundary retains widget/iframe nodes while preserving the inactive guard, for −1 production line. These layered counts overlap other checkpoints and are not added into a final-byte total. Review 17 completed three scoped-clean auth passes, review 19 five integration/UI passes, and review 20 the final worker/node/auth integration. The final worker race repair closes only its captured request pool, preserving an independently created replacement (−1 production line). Node policy adopts main’s canonical withheld-permission producer. The exact 926 real-Gateway browser hot-policy replay also passed (1 test, 39.165 s), without node reconnect; mixed local captures were not published.

Credential-free public discovery transport: the compiled public SDK completed three real HTTP CONNECT proxy cases (HTTPS_PROXY, HTTP_PROXY fallback, and ALL_PROXY). The SOCKS5 case failed before tunnel setup, so the combined run is not green and its following NO_PROXY phase was not reached. An independent NO_PROXY-only replay then passed in 1.202 s, returning HTTP 200 from public xAI discovery with zero proxy connections; cleanup completed. The shared TLS-over-SOCKS helper behavior was verified unchanged from main and stable v2026.8.2 and is recorded as a named follow-up, not an unresolved repair in this auth PR. No successful SOCKS traversal, device enrollment, token exchange or OAuth authentication is claimed. Hosted CI and native landing verification passed; the PR is merged.

Proof and remaining work

Earlier checkpoints are historical layers, not a single final-byte or additive test total:

  • 23b25cedc3a1af70accbefb86ab5ef87c2be3b58: 579 product/Gateway tests in20 files,53 UI tests in5 files, all five TypeScript programs and import-cycle checks passed. Its final test-only readiness correction was followed by942 runtime tests in27 files, core-test types and core lint. Production/UI bytes were unchanged between those layers. Review13 covered the complete PR in five scoped-clean passes.
  • a8751eb95436390d0412740f40cf14b7215a3578: real Custodian/recovery destinations now say Settings → Profile → Connected accounts. Five intended RED cases preceded26 whole-file GREEN tests and scoped validation/review; legitimate model accounts/models accounts commands remain.
  • 27a577564c8c40aea21f973d83d4319e542ac2ad, tree f2bd30d8bd3e8508b8b7f8da826a34ab05d67536: main's registry/current/observation fields survive the requester-specific catalog projection.119 tests in10 files, all five TypeScript programs, import cycles, scoped lint/format and all four review14 passes completed. Three wrappers returned99 after a raw Git-index fingerprint change while their commands returned0; separate staged-tree/source receipts verified identical bytes. The original nonzero receipts remain preserved; the index rewrite cause was not established.
  • 2841e6e2957e791dea89fddf24d3f5529f56704c: the 27a CI run exposed a real hot-reloaded node-policy guidance defect, an invalid CLI relay fixture, and two setup/download failures. Two policy REDs preceded232 tests in4 files; genuine CLI/process suites passed136 tests in4 files. The stale Owner re-export was removed;27 catalog tests and renewed dead-export/core/plugin lint passed. Review16 was scoped-clean for the six-file repair. The original partial changed-gate failure is not relabeled green.

The first2841 browser replay failed before Gateway listen (missing_private_qa_dist/build lock). After the exact private-QA build passed117.738s, the real-Gateway Chromium replay passed39.919s, including same-connection hot denial and genuine pending/undeclared controls. Raw captures contain incidental host/profile labels and stay local. The 2841 hosted run finished197 jobs successful,3 skipped, with a pnpm-bootstrap Node/Undici failure before tests plus its dependent aggregate gate. No retry was accepted while active; the final candidate run supersedes it. All63 previously uploaded synthetic images passed anonymous HTTP/MIME/size/SHA readback.

These checkpoints retain the original storage/classifier RED→GREEN, Owner/missing-actor rejection, creation-only defaults, catalog neutrality, account-picker pagination, clipped-guidance and process/PTY construction repairs. The final PTY owner change removed spawn-then-kill behavior (net−5 production lines); its regression first observed a forbidden spawn. All tests, scripts and source remain in the branch history. Earlier broad counts overlap later focused runs and are never added together.

Completed normal-built Gateway proof at 27a577564

A clean pnpm build:ci-artifacts passed in 78.477 s with source unchanged. The normal Gateway build stamp matches 27a577564c8c40aea21f973d83d4319e542ac2ad; both synthetic A/B entrypoints returned HTTP 200, and all nine entry JS/CSS assets per entrypoint matched the captured build manifest. This used a fresh isolated Gateway/state, no real provider credentials and no inference request.

The locked desktop prevented browser pairing approval. The operator instead approved only the exact observed pending test device through the local owner API. This is not browser-UI or CLI-RPC pairing-approval proof; the device was not preapproved. Existing UI tests and captured-source correspondence are separate evidence.

The fresh public-RPC/state probe completed successfully in 3.659 s:

Phase Observed 27a outcome
Before account setup Empty plain-model S1 created without a pin or turn. Persisted-session and draft metadata were unavailable/Automatic.
Writer revoked to reader Original socket closed; late answer returned FORBIDDEN; old operation recorded failed / authority. Measured private/session state did not change.
Writer restored, then fresh operation Old operation stayed retired. A new authorized operation saved one synthetic account and default; existing S1 was unchanged.
Default versus existing chat S1 remained unpinned/unavailable, including after adoption. Agent-only draft metadata saw the saved default; an explicit draft reported the selected personal account.
New empty S2 Creation captured the saved default with source user-link; its personal selection and availability agreed. S1 remained unpinned. Metadata reads did not change measured state.

The Gateway/wrapper exited zero; owned writer/process groups were gone, all three ports closed, and Gateway state, bootstrap directory and probe home were removed. Browser-tab cleanup still awaits desktop unlock: one owned test tab may remain on the now-stopped loopback server. No claim is made that every browser tab is closed.

This proves actual Gateway authority, creation-owned defaults and metadata behavior using a synthetic saved credential. It does not prove provider acceptance, inference, invoice attribution, a cross-human fork, external transport behavior or a held post-exchange sink. Fresh provider OAuth remains unverified.

Historical bc601 normal-Gateway checkpoint

The normal build and A/B served assets matched bc6011ae79fbb4a466cea3d6b2cfd2aa705cfa62, against main 7b67c28e2e96237b4eea9ce095a74d6936ce8c50. After ordinary browser device approval, its fresh isolated Gateway passed the same synthetic revocation, restored-writer, existing-S1 preservation, new-S2 default capture and metadata phases tabulated for 27a above. Original sockets closed, late answers were FORBIDDEN, and retired operations stayed failed / authority; reads left measured private/session state unchanged. Gateway/supervisor exited zero; all clients, ports and the test tab closed, and temporary homes/state were removed.

This is historical Gateway/state evidence, not current-head provider acceptance, inference, billing, fresh OAuth or a held post-exchange sink test. The separate 27a replay and its browser-cleanup exception are recorded above.

Creation-owned defaults

The full review also found that !current could apply a newly selected default to an existing unpinned/shared chat. The default is now captured only at actual new-session creation or first admission. Ordinary sessions.create captures it before first dispatch, including split creation/message requests; adopted rows, explicit or inherited pins, and forks are preserved. Both actor authority and selected private-account ownership are rechecked at commit. This reuses the existing credential resolver and stored pin fields, with no new config or SQLite shape. Regression proof separately covers existing-chat preservation, initial creation, adoption/forks, and authority loss during preparation. The historical bc601 and completed 27a Gateway outcomes are recorded above; they are not external-provider acceptance or billing proof.

ClawSweeper before-merge dispositions

The latest durable review, September 3 at 12:52 UTC on 926fae23, reports no concrete implementation finding. It acknowledges the repaired authority chain and asks for owner acceptance, direct Codex source inspection (unavailable in its sandbox), and final gates. The earlier 11:16 review's 12 items centered on the provider-I/O fence; the exact-head RED/GREEN and compatibility/owner facts above address those.

Latest before-merge item Disposition
Codex runtime-source inspection Completed personally by the landing maintainer at Codex 94cbbddafc1776d5e377bca1b05932c697e82238; precise contracts below. The bot's unavailable checkout is not an unperformed maintainer check.
Persistent selection/billing risk Explicit requesting-maintainer acceptance: trusted shared Gateway; identity-scoped credentials; creation-only defaults; sticky pins; documented same-provider shared fallback. Selection is not an invoice receipt.
Exact-head gate risk Build, focused auth, real Gateway and independent review passed. Hosted exact-head CI, the required gate, and native prepare/merge validation all passed.
Complete recommended next step Owner acceptance and dependency inspection recorded; CI and native landing validation passed; merge completed.
Review confidence Independent managed reviews and direct source/runtime evidence are recorded; no claim that the bot has issued a new approval or confidence rating.
Maintainer decision Explicit product approval and direction to land were given by the requesting maintainer; listed security-owner involvement verified separately from server enforcement.
Config compatibility No new final-repair config/env option or protocol version. General provider callers may omit the callback; personal Gateway operations always supply the original assertion. Standalone CLI/onboarding retained.
Data-model compatibility Existing identity-secret records/session pins; no new schema/version/retention change in the fence. Earlier older-writer/reopen and session-preservation proof retained. The flagged UI cache uses WeakMap/Map; JSON.stringify only makes ephemeral cache keys.

Direct Codex inspection: account protocol, account processor (API-key save/reload at 402–440, external-token workspace check/live auth replacement at 826–879), thread parameters, turn parameters, startup interruption, and existing-thread compaction. These dependency operations do not own the original Gateway human authority. OpenClaw therefore checks it after waits/retries synchronously before the app-server physical write (extensions/codex/src/app-server/client.ts:688) and passes it through login (auth-bridge.ts:839). Native user-home auth is verified, not silently replaced; bounded turns preserve admitted thread model/environment. The upstream external-token variant is experimental: source inspection is not a stable-API guarantee, provider approval, or fresh OAuth proof.

Rank-up moves: owner contract acceptance and direct dependency inspection are complete; exact-head hosted CI and native prepare/merge gates passed. No duplicate bot re-review request is needed.

Limits and named follow-ups

Anthropic personal setup is API-key only. The old direct Claude subscription-token form/import path is removed. Unmodified native Claude Code owns its own login; it is not silently imported. Historical subscription-token inference is a technical observation, not permission to collect/store those credentials or proof of present API-key compatibility. Existing retained credentials are not automatically erased or provider-revoked. Official authentication and credential-use requirements.

Fresh OAuth completion remains unverified after the MFA-blocked, explicitly cancelled attempt. No valid callback arrived; valid late-callback rejection is not proved. Invoice attribution, live same-provider shared failover, complete expiry/refresh/exchange-disconnect coverage, and personal-only Custodian startup remain unverified unless a separately attributed result says otherwise. Adding a method, passing a mocked exchange, or rendering Account added is not provider approval or live authentication.

The following are recorded follow-ups, not newly proven regressions on the pending landing head:

  • Configured-model full refresh: Claude Sonnet 4.6 was available in startup/direct agent metadata, then disappeared after the model picker's full-catalog refresh; an explicit personal selection correctly kept Start disabled without an eligible model. The source mismatch was present on pinned main 65e5b2e19c9db6460494682bacc4bee10db755fd and remains a named follow-up: configured-runtime preparation calls completeConfiguredRuntimeModels, while the full-catalog worker path retains only the earlier configured-model matches. Repair the shared catalog-completion owner, not a UI cache workaround. No Sonnet chat execution is claimed for this run.
  • Automatic title/default parity: Automatic speculation uses configured agent/utility authentication, while a personal new-chat default is resolved at first chat admission. Explicit personal title selection is covered here; parity for Automatic is a separate product decision.
  • Recovered placement auth readiness: restored placement retries replay a frozen creation selection, but the pre-submit readiness gate consults neutral draft auth. This source-only issue is not covered by local New session proof; later dispatching/sending recovery has a separate owner.
  • Recovery guidance after default clearing: an already addressable Automatic chat can show a raw 401 with no selected/shared auth. Guide the person to Account for this chat or Profile without silently reselecting credentials.
  • Automatic title quality: an instruction-like first message previously produced refusal-like title prose despite a successful reply. Cause and baseline behavior are unverified; it is not presented as a picker regression.
  • Android construction-retirement transport attribution: run 33733259637 saw a late GET in stopDuringRuntimeConstructionRetiresBackgroundStartup, on test/runtime bytes unchanged from pinned main. Its zero-timeout request-queue drain does not establish when the socket started. The exact cause is unproved; no production patch, retry delay or weakened assertion was added. The new exact-head Android lane remains required.
  • Node setup documentation: the Devices guidance in docs/web/control-ui.md still tells operators to restart the Gateway after changing node command policy; main now hot-reloads that policy. The node may still need restart for its own declared desktop capability. This documentation follow-up is separate from the corrected command-state projection.
  • Inherited TLS-over-SOCKS transport: tracked in issue #131354 and repair PR #131436. The live discovery probe sent TLS bytes instead of a SOCKS5 greeting; the shared helper/runtime are unchanged from main and stable v2026.8.2. HTTP CONNECT and independent NO_PROXY passed; SOCKS traversal did not. This PR does not duplicate that repair.
  • Separate source-only investigations: main-reset-in-place model forwarding, older count-based lifecycle fixtures, source-bootstrapped all-catalog startup latency, and personal-only Custodian startup inference.

Historical remote CI also had a Linux registry fixture that passed its complete file locally without a proven cause, and a docs job that failed ClawHub checkout authentication before validation (run 33675722107). Those local results do not establish current remote CI success.

Final candidate accounting: 926fae23b475389021e4fa8077f331fc3aa84e0c (tree 63185b5faeb3f1cba1fa0dcb4c29f1689f8ca8c6) versus integrated main e0dad1fc133391c98b0763239d41fc3562c8c6fa spans 327 files: production +6369/−1414 (net +4955); tests/support +10402/−1351 (net +9051). Generated clients net +819, docs +186 and tooling −2 are separate. Incoming-main-only work is discounted; pure moves do not increase net growth. The approved feature owns private inventory/defaults/session selection, generic provider wizard, client controls and exact-human authority, replacing provider-specific exchange/forms and the original separate-table/shared-writing design. Final dashboard and worker repairs each net −1 production line; node policy reuses main. No schema migration does not mean unchanged persistence semantics.

Dashboard retention: before and after

These fully inspected synthetic-only frames use the real Chromium Control UI and sandbox iframe with a mock Gateway. They were captured on the frozen precommit integration based on 0410e6ae1c66abd78c6abe04c17b0e651a079854, not during the normal-Gateway held-sink run. Actual DOM-identity assertions, not appearance alone, prove Dashboard → Tasks → Dashboard used to disconnect/recreate the app. The fix retains the same surface, widget and iframe without extra lease requests; the restored capture waits for the synthetic app text.

Before: returning to Dashboard remounts the app iframe; the captured replacement is still blank

After: returning to Dashboard retains the existing app and its rendered content

All 65/65 images now render on the public PR and pass fresh anonymous HTTP 200, MIME, size and SHA-256 checks against inspected bytes. The two new uploads initially returned 404 before PR reference publication; the original failed readback is retained. The original 63 embeds and historical captions remain unchanged.

UI evidence through 27a

The fresh 65/65 readback includes these previously published 63 images and both new Dashboard captures above. All match their inspected bytes. The earlier pre-publication failures remain separately retained.

These three root-inspected synthetic-only Chromium frames were captured from frozen integration5 tree dbbf57e6dcf65babe2f8d85a747955b875f57333, before the final commit. The complete ui/ source tree is byte-identical in committed 27a577564c8c40aea21f973d83d4319e542ac2ad. They retain their original Vite/mock-Gateway provenance; they are not screenshots of the fresh normal-built Gateway or its pairing approval. The corresponding UI replay passed 53 tests in 5 files, including the full 13 browser tests.

The retained clipped-guidance before frame shows the original defect. The fresh pagination frame shows later-page accounts remaining selectable with readable guidance:

Integration5: later-page saved accounts stay selectable, with readable chat-scope guidance

Before selection, this New session fixture has no eligible model on Automatic, but the account chooser stays available. After the saved account is selected, an eligible model appears and Start is enabled. The replay verifies that the new-chat default is unchanged; the images are not billing or provider-authentication proof.

Integration5 before selection: Automatic has no eligible model, but the personal-account chooser and scope guidance remain available

Integration5 after selection: the saved personal account has an eligible model and Start is enabled; the new-chat default is unchanged

Retained landing UI evidence

The earlier four frames remain historical alongside the three fresh frames above. Real Chromium browser with a synthetic mock Gateway, not provider authentication or billing proof. The before frame is from the earlier integration tree; after frames match the UI bytes in ae5e3d235138ef7d32f306ea4a66e6b98e941424; those production UI bytes are unchanged in bc6011ae79fbb4a466cea3d6b2cfd2aa705cfa62. Both new text-bounds assertions failed before the one-line wrapping fix, then the full two-file suite passed 13/13. The existing 320/768/1280 chat viewport loop and New session before/after selection check the rendered text, not just its container.

Before: account-scope guidance was clipped in New session

After: later-page accounts remain selectable and chat guidance wraps

After: Automatic without a usable default keeps Start unavailable and the scope explanation readable

After: selecting a saved personal account enables Start without changing the new-chat default

Historical verification: exact heads, never final landing proof

Provider-neutral checkpoint at 2778c084b14665743da5df2991095005ab1fc65c

The final stale-answer repair followed three intended RED failures; its focused replay passed 102 tests / 6 files. The earlier isolated 33ca baseline had 17 expected failures, 6 passes and 121 unselected cases / 8 files. Counts overlap other checkpoints and do not demonstrate external dispatch. Final review was scoped-clean at P0–P2. Checks were a layered continuation, not one aggregate check-changed exit-zero: preceding guards/types/dead-code checks, then 23/23 phases including native lint and macOS 1,074 tests / 20 files. Source correspondence bound these bytes to 2778. A clean normal build passed in 295.021s with matching HEAD and verified A/B served assets.

Real API-key proof: existing Chrome and the built CLI saved authorized OpenAI, Anthropic and xAI keys after normal device approval, without CLI key echo. Completed OpenAI, Claude Haiku 4.5 and Grok 4.3 replies used explicit personal pins while the corresponding personal defaults were cleared; only the selected owner's use advanced. B's default-selection attempt for A's account returned INVALID_REQUEST, exit 1, without credential input or state change. This proves that boundary, not all cross-owner operations or billing.

Anonymous: after ordinary pairing, connection succeeded but users.self returned FORBIDDEN; CLI exited 1 with guidance, no credential prompt/input and zero authConnect requests. Profile showed missing-person guidance and no Add account. NOT_PAIRED attempts were not identity proof. OAuth: one attempt expired before consent; the next was explicitly cancelled while active at MFA. No callback or OAuth account appeared. API-key accounts/defaults/use/pins remained unchanged. No OAuth success or valid late-callback proof.

Cleanup verified owned processes reaped, six ports closed, two isolated CLI homes and ten task tabs removed, and zero known-key matches in 237 retained files. All 56 embedded images were fetched anonymously with HTTP 200, JPEG/PNG content and exact inspected hashes; the increment added 17, not 56 new images. Two older non-embedded links below were outside that readback claim. Provider-neutral accounting against 33ca: 65 files, production +1,050/−868 (net +182), tests +1,591/−705, docs +69/−41, generated +56/−87, one baseline line removed; no lockfile/new config option. Not final merged totals.

Earlier checkpoints

Head Retained evidence; counts overlap later replays
33ca1d1d67ba88821445a7ca548e4fa3aa53123e Canonical type/schema and wire-fixture repair. Earlier 408/18 tests, then final affected 129/4; changed gate 396.603s, clean review/build, normal Gateway selector rejection and CLI/context/assets. No provider input/inference.
31da58da0a923aa7bbffb6e76b183fb3094e68c4 Sign-in/context/read-scope UX: 483/14 tests, gate 432.608s, clean review/build; real zero-account context, cancellation, anonymous guidance and cleanup. Old Claude prompt cancelled without input; now retired.
6d0456ec070b709fdaaf02930d968df953f3796c Main aef65 refresh. Exact cached-device-token mock repair passed 11 selected callers; no timeout/runtime workaround. SDK/browser 75/2 passed; full CLI suite not rerun after fixture correction. Build 121.843s.
ab7b6004f90b49625a5dc06e54f6e595cdf00f49 Integration 725/28 tests; changed gate 419.233s, scoped-clean review, build 88.723s. No repeated provider-live run.
db6cd035b68fd0e72406b9b2ba2837f358da689d Normal Gateway, native Claude logged out/shared credentials zero. Hidden setup-token CLI/default roundtrip; separately measured claude-cli Haiku utility title (29 chars, 7.478s), owner-use only. B preview/title/create FORBIDDEN/default refusal. With default cleared, new Haiku CLI chat returned ACCOUNT_PICKER_OK and 7×8=56; separate user pin, no account ID in preferences, default restoration preserved both. Historical token behavior, not current setup policy or billing/permission proof.
a71936cce2ce94023114437eb321ecdbf0b44335 Personal New-session Haiku reply NEW_SESSION_ACCOUNT_OK, default cleared, pin/use recorded and B denied. Canonical OpenClaw runtime, not CLI preparation.
912f738198223be74286181528ac5902e068e460 Actual OpenAI OAuth/MFA and three personal gpt-5.6-luna replies without shared credentials; sticky/default/foreign/use checks. Separate shared-key Custodian handoff/chat, not personal-only startup or billing proof.

The db6 live-found CLI loader/catalog/selector repair passed 539/17 tests, final gate and clean build (175.729s), then the real proof above. Its owned processes/state/native config/copied credential and CLI were removed; a late cache log was deleted only after writers exited. Exact known-token scan: 289 files, zero matches; vault credential retained. Older synthetic two-person proof covered 53-account parity, rejection and notification-loop repair, not a valid callback after cancellation.

Earlier OpenAI personal replies, earlier Custodian handoff.

Historical 33ca full-PR accounting against aef65: 270 files; production +5,783/−991, tests +8,105/−902, support +216/−23, docs +158/−7, generated +850. Prior results/metrics never substitute for final merged-head gates.

Preserved historical screenshot evidence

All 56 image embeds, alt captions, head labels and surrounding gallery context are retained verbatim in these collapsed archives. Archived “current” and “candidate” headings refer to their explicitly named historical head, principally 2778, 33ca, 31da, ab7b, db6 or 912f. None depicts ae5e3d235138ef7d32f306ea4a66e6b98e941424. Mock-Gateway UI, normal built-Gateway behavior and real-provider outcomes remain distinct.

Archived 2778 mock-UI gallery, plus 33ca and earlier before images

Current UI screenshots

Twelve inspected candidate screenshots from Vitest/Playwright's Vite UI with a mock Gateway and synthetic accounts. These are not screenshots of a deployed/normal built Gateway and do not establish a real provider login, accepted API key, OAuth exchange, refresh, billing or isolation result. The capture manifest records the candidate UI source hashes; final committed-head correspondence is the five captured UI-source hashes match committed 2778c084b14665743da5df2991095005ab1fc65c; these remain Vite/mock-Gateway captures, not normal-built-Gateway proof. Published image names and SHA-256 hashes match the inspected capture manifest.

Connected accounts and catalog-driven Add account: target/person/personal scope, retained accounts, and provider choices.

Candidate Connected accounts: retained personal account and explicit Gateway, Person and Personal scope

Candidate Add account: catalog provider choices, including Grok

Grok API-key input and synthetic completion: the shared protected input is masked, cleared on submission, and removed after the mock reports success. No real key was used.

Candidate Grok setup: shared protected API-key step with synthetic input

Candidate Grok setup: mock account-added result and selected personal default

Browser steps, progress, cancellation and new-chat defaults

Candidate browser step: provider instructions, external link and manual-return input

Candidate cancellation: exact mock acknowledgment ends the attempt and preserves the existing account

Candidate Add account: provider picker opened for a second attempt

Candidate shared wizard: saving progress with cancellation still available

Candidate browser flow: synthetic account-added result

Candidate defaults: another retained account selected without changing existing chats

Candidate defaults: personal default cleared while retained accounts remain

Candidate Add account: catalog reopened before the Grok attempt

Before images: previous Profile/sign-in design, unchanged chat-picker context, and earlier real-Gateway captures

The following gallery is historical. Its old Model accounts, direct provider buttons, and Claude token form have been replaced by Connected accounts → Add account. Chat-picker behavior remains part of this PR, but these images are not new current-head proof. The original before/after and provider screenshots are retained rather than relabeled as new evidence.

Historical gallery at 33ca1d1d and earlier

Historical September 2 visual pass: 33 additional screenshots across Profile, sign-in, the existing-chat picker, New session and Custodian handoff. Twenty-five were captured through the existing Chrome profile against unchanged built application assets from 33ca1d1d67ba88821445a7ca548e4fa3aa53123e, using the repository's mock-Gateway/bootstrap helpers and synthetic people/accounts. Eight reuse passing browser E2E captures of the same relevant production UI: five Profile captures from the 31da58da change set and three chat captures at ab7b6004 (those chat components/layouts are unchanged through 33ca1d1d). No new provider login, credential transfer or inference was performed in this pass. Every published frame was inspected in full; only synthetic product data and public model names appear.

These frames cover the changed components and their main success, pending, error, scope and responsive states—not every error-string permutation. They prove presentation and the observed mock-backed UI transitions, not billing, server authorization, persisted account isolation or a full provider lifecycle. The real-Gateway and historical provider evidence is separately labeled below.

Profile at 33ca1d1d: one person's saved accounts and new-chat defaults, with the target Gateway and Personal scope visible. Ordinary users do not get the administrator's raw existing-credential selector.

Historical built Profile at 33ca1d1d: synthetic person, multiple providers, personal defaults and sign-in controls

Existing chats: the account choice is inside the model picker, with owned alternatives and a route to manage saved accounts.

Existing chat: account choices expanded inside the model picker; synthetic mock Gateway

New session: a selected personal account and eligible model after its availability preview succeeds. This selection does not change the new-chat default.

New session: selected personal account, eligible model and enabled Start after a synthetic preview

Profile: identity, permissions, inventory and defaults

Read-only and missing-profile guidance, paginated inventory, a recoverable inventory error, and selecting/clearing a default. Clearing a default keeps saved accounts; it is not provider revocation.

Identified read-only person: sign-in unavailable with access and reconnect guidance

Identity profile not ready: refresh or set identity before sign-in

Saved-account inventory offers Load more saved accounts

Inventory failure shows an explicit Refresh-to-retry message

Passing Profile E2E: another saved account becomes the new-chat default

Passing Profile E2E: default cleared while saved accounts remain visible

Browser sign-in: pending, manual return, completion, cancellation and recovery

Only synthetic mock responses are used. Pending/completing/added frames come from the passing Profile E2E; the remaining frames are from this built-UI Chrome pass. The status-error case was also retried and cancelled through the UI; these are not live provider outcomes.

Browser sign-in waiting for automatic completion, with manual return and Cancel available

Manual return mode explains which localhost URL to paste after approval

Completing sign-in disables conflicting account changes

Synthetic browser sign-in result: Account added

Expired sign-in shows a new-attempt recovery message

Exchange failure is visible and asks the person to sign in again

A status-check failure retains Check status and Cancel controls

Acknowledged mock cancellation reports that no account was added by the attempt

Historical protected token form, replaced by the provider catalog

The input contains a deliberately synthetic fixture string, not a Claude credential. The pending RPC was held and released by the mock; the resulting account and default are synthetic. That direct subscription-token form is not part of the current personal setup flow; Anthropic now offers API-key setup only. These frames are retained as before images, not instructions to use the retired form.

Synthetic token submission: input masked and concurrent account actions disabled

Synthetic token accepted by the mock: Account added and input cleared

Existing chats: selection result, shared/collaborator labels and narrow layouts

The selection-result and 768/320-pixel frames reuse the passing existing-chat E2E. Shared and collaborator frames use synthetic metadata; they show the redacted presentation, not a new backend isolation test. The wider frame exposes the full saved-choice/billing disclaimer.

Passing existing-chat E2E: selected workspace shown after the account change

Historical chat at 33ca1d1d identifies its Gateway shared account

Another person's saved account is represented by a redacted label beside this person's alternatives

Existing-chat picker at 768 pixels, including the full selection-not-billing disclaimer

Existing-chat picker at the narrow 320-pixel breakpoint

New session: no default, owned choices, preview failure/recovery and narrow layout

The browser selected a retained personal account, observed loading with Start disabled, then a failed preview. After the mock supplied ready metadata and a change event, the UI showed the selected account, an eligible model and enabled Start (shown above). No session was started and no provider request was made.

New session on Automatic with no eligible authentication and Sign-in needed

New session offers this person's retained accounts and Manage saved accounts

An explicit account preview is pending: Loading models and Start disabled

Failed account preview: Models unavailable, with the account control retained

Selected personal account in New session at 390 by 844 pixels

Profile at a narrow breakpoint

The same built UI at 390 by 844 pixels; the temporary viewport override was reset after capture.

Narrow Profile wraps Gateway, person, Personal scope and saved-account controls

Narrow Profile retains saved-account actions and protected sign-in inputs

Custodian handoff and administrator-only controls

Through Account menu → Settings → Ask OpenClaw, submitting the synthetic account-management request produced a model-accounts handoff and navigated the same connection to Profile. The destination below also shows the administrator-only existing-Gateway-credential selector. This uses the existing Custodian conversation, not a new button; no credential was entered in chat and the handoff made no account/configuration change.

Synthetic account-management request in the existing Ask OpenClaw conversation

Observed handoff destination: Profile with Gateway, person, Personal scope and admin-only selector

Existing real-Gateway context proof, without provider credentials

These already-published captures came from two isolated normal built Gateways at 31da58da0a923aa7bbffb6e76b183fb3094e68c4, not the mock above. Their production Profile UI is unchanged at 33ca1d1d. The corresponding live CLI/context/start-cancel checks are recorded below; no provider credential was submitted and no inference was performed in that context pass.

Real Gateway at 31da58da: saved person and Personal scope before Sign in

Real Gateway at 31da58da: missing-identity guidance before credential input

Callback capture gap: the actual loopback handler received a synthetic valid callback, but Chrome displayed ERR_BLOCKED_BY_CLIENT instead of the landing text. That fixture made zero external provider requests and zero state calls; the cause of the client block is not established. No bypass or successful callback-page screenshot is claimed. The browser tabs, viewport override and both fixture servers were cleaned up; the source tree remained clean at 33ca1d1d.

Archived normal-built Gateway API-key/anonymous captures, exact head 2778
Five current-head real-Gateway captures: API-key setup/replies and anonymous identity guidance

These inspected captures come from the normal built Gateway at 2778c084b14665743da5df2991095005ab1fc65c, with synthetic Gateway people/prompts. The three completed replies used real provider API keys. These are separate from the twelve Vite/mock-Gateway captures above and are not OAuth proof. No credentials, provider identities or authentication screens are shown.

Current normal Gateway: Connected accounts and the live provider catalog

Current normal Gateway: completed OpenAI API-key reply with a personal chat selection

Current normal Gateway: completed Anthropic Claude API-key reply with a personal chat selection

Current normal Gateway: completed Grok API-key reply with a personal chat selection

Current anonymous Gateway: missing-person guidance and no Add account control

Historical implementation screenshots: before and after

Historical implementation and live-provider images

These are historical checkpoints, not screenshots or new provider tests of the current head. The pre-picker image comes from the earlier PR implementation at 912f738198223be74286181528ac5902e068e460, not the current main baseline. It shows why clearing a default needed a separate per-session account choice:

Earlier implementation at 912f738: New session without a retained-account selector

The following three captures belong to the real, isolated normal-Gateway run at db6cd035b68fd0e72406b9b2ba2837f358da689d: New session selection, the actual Claude reply, and restored new-chat default. Their synthetic people/prompts and earlier layout are intentional. The Profile image's Connect labels and missing Gateway/Person/Personal block predate the later Sign in UX.

Historical db6 live run: personal account selected in the New session model picker

Historical db6 live run: Claude reply with the saved account shown

Historical db6 Profile: restored new-chat default before explicit sign-in context was added

The surrounding exact-head receipts establish credential selection and cleanup. These images do not establish invoice attribution, current-head provider compatibility, the outstanding live lifecycle matrix, or provider permission to collect/store subscription credentials. The earlier OpenAI/Custodian links and their limitations remain in the historical verification section above.

@clawsweeper

clawsweeper Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime agents Agent runtime and tooling extensions: openai size: XL maintainer Maintainer-authored PR labels Sep 1, 2026
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 1, 2026
@clawsweeper

clawsweeper Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 3, 2026, 8:52 AM ET / 12:52 UTC.

ClawSweeper review

What this changes

The PR adds provider-neutral, identity-scoped model accounts so users can connect personal provider credentials and select them for chats without exposing account identifiers to collaborators.

Merge readiness

⛔ Blocked before merge - 8 items remain

Keep open for manual maintainer review. The examined authority chain addresses the earlier provider-I/O concern, but this large identity-scoped credential and routing feature still needs an explicit product/security contract decision and the required Codex runtime-source inspection before merge.

Priority: P1
Reviewed head: 926fae23b475389021e4fa8077f331fc3aa84e0c
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The inspected implementation has coherent owner-boundary fences and substantial validation, but the unusually broad credential feature still lacks the required Codex contract check and maintainer contract decision.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) Security review found an item that needs attention.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
Evidence reviewed 8 items Gateway authority owner: The new connection service retains the original action, revokes terminal operations before cancellation, passes a live assertion into provider authentication, rechecks it after the provider returns, and passes it into the private-store commit.
Private credential ownership: Personal credentials are identity-scoped secret-store records; selection checks canonical ownership, and credential plus default-link writes occur together after the live assertion inside the synchronous transaction.
Final HTTP request fence: The guarded fetch contract invokes a synchronous before-request callback after DNS and dispatcher preparation and immediately before every request; its loop repeats that sequence for redirects.
Findings None None.
Security Needs attention Codex app-server contract remains uninspected: The introduced Codex adapter carries authorization assertions into app-server requests, but the repository policy requires direct inspection of the sibling Codex source for this dependency contract; that checkout was unavailable in this read-only review.

How this fits together

Gateway account-connect operations obtain and store a user’s provider credential, then session creation resolves a selected personal or shared account into the provider profile used for a chat. Provider plugins perform the final OAuth, device-code, API-key, or app-server exchanges while Gateway maintains the caller’s live authorization.

flowchart LR
  A[Connected user] --> B[Gateway account connection]
  B --> C[Live authorization check]
  C --> D[Provider authentication]
  D --> E[Private account store]
  E --> F[Session account selection]
  F --> G[Provider request]
Loading

Decision needed

Question Recommendation
Should OpenClaw adopt this persistent provider-neutral personal-account contract, including sticky per-chat selection and documented same-provider shared fallback behavior? Sponsor the contract: Approve the documented account, routing, and fallback semantics after exact-head gates and the Codex contract inspection.

Why: The feature changes durable credential ownership and model routing across Gateway, provider plugins, sessions, protocol clients, CLI, and UI; account selection is not merely an internal refactor.

Before merge

  • Resolve security concern: Codex app-server contract remains uninspected - The introduced Codex adapter carries authorization assertions into app-server requests, but the repository policy requires direct inspection of the sibling Codex source for this dependency contract; that checkout was unavailable in this read-only review.
  • Resolve merge risk (P2) - This creates persistent personal credential links and sticky session routing, including same-provider fallback behavior; maintainers must explicitly accept the operator and billing semantics across upgrades.
  • Resolve merge risk (P1) - The exact-head merge gate remains incomplete: required CI/native validation and the repository-required direct Codex runtime-source inspection have not been established in this read-only environment.
  • Complete next step (P2) - Maintainers must approve the persistent personal-account and provider-fallback contract, then complete exact-head CI/native gates and the required Codex contract inspection before merge.
  • Resolve review confidence - ClawSweeper must reach high confidence before merge readiness is known.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
  • Review config compatibility - Confirm compatibility and upgrade impact for the changed config or default surface before merge.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.

Findings

  • [low] Codex app-server contract remains uninspected
Agent review details

Security

Needs attention: No concrete bypass was found in the inspected Gateway, OpenAI, and xAI paths, but the PR changes credential authority and the required direct Codex runtime contract check could not be completed.

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

Metric Value Why it matters
Production versus test scope production +6597/-1440; tests/support +10184/-1327; docs +221/-35; generated/native +809/-0 This is a large feature and authority-boundary expansion, so merge review must assess cross-surface semantics rather than rely on individual test shards.
Changed files 327 files affected Gateway, state, provider plugins, protocol clients, CLI, documentation, and Control UI all participate in the proposed account contract.

Stored data model

Persistent data-model change detected: serialized state: ui/src/lib/chat/chat-metadata-store.ts, unknown-data-model-change: ui/src/lib/chat/chat-metadata-store.ts, unknown-truncated-pull-files. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Approve and validate the account contract (recommended)
    Record owner acceptance for personal-account routing and fallback semantics, then complete exact-head validation and the required Codex contract review.
  2. Pause pending product ownership
    Defer the feature if maintainers do not want durable personal-account selection and its fallback behavior in the current product surface.

Technical review

Best possible solution:

Approve one documented personal-account, routing, and fallback contract, then complete exact-head validation and the direct Codex runtime inspection before merge.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this is a new feature; the supplied authorization scenarios are validation evidence rather than reproduction of a current-main defect.

Is this the best way to solve the issue?

Unclear: the implementation reuses generic provider-auth and secret-store seams, but maintainers have not yet accepted the durable account-routing and fallback contract it implements.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against a5f3623302fd.

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.
  • remove status: 📣 needs proof: Current PR status label is status: ⏳ waiting on author.

Label justifications:

  • P1: The PR changes active provider credential and model-routing behavior for real multi-user operator workflows.
  • merge-risk: 🚨 compatibility: Persistent links and sticky session pins alter account-selection behavior for existing sessions and upgrades.
  • merge-risk: 🚨 auth-provider: Provider authentication methods and selected credentials are newly carried through Gateway, plugin, and session routing.
  • merge-risk: 🚨 security-boundary: The change creates identity-scoped credentials and carries connection-bound authorization to final provider I/O and private persistence.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.

Evidence

Security concerns:

  • [low] Codex app-server contract remains uninspected
    The introduced Codex adapter carries authorization assertions into app-server requests, but the repository policy requires direct inspection of the sibling Codex source for this dependency contract; that checkout was unavailable in this read-only review.
    Confidence: 0.98

What I checked:

  • Gateway authority owner: The new connection service retains the original action, revokes terminal operations before cancellation, passes a live assertion into provider authentication, rechecks it after the provider returns, and passes it into the private-store commit. (src/gateway/model-account-connect.ts:109, 926fae23b475)
  • Private credential ownership: Personal credentials are identity-scoped secret-store records; selection checks canonical ownership, and credential plus default-link writes occur together after the live assertion inside the synchronous transaction. (src/state/user-model-accounts.ts:361, 926fae23b475)
  • Final HTTP request fence: The guarded fetch contract invokes a synchronous before-request callback after DNS and dispatcher preparation and immediately before every request; its loop repeats that sequence for redirects. (src/infra/net/fetch-guard.ts:686, 926fae23b475)
  • Session pin behavior: Personal links apply only when a session is new, while explicit personal pins remain strict and an unavailable personal account fails closed rather than allowing another participant to inherit it. (src/agents/auth-profiles/session-override.ts:356, 926fae23b475)
  • Protocol privacy boundary: The additive account-selection schema limits account lists to 50 and omits personal credential identifiers from collaborator-facing selection metadata. (packages/gateway-protocol/src/schema/users.ts:120, 926fae23b475)
  • Current-main necessity: The checked current-main context does not contain the new Gateway account-connect owner, so current main has not already implemented this feature. (src/gateway/model-account-connect.ts, a5f3623302fd)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Record owner acceptance of personal-account routing, shared fallback, and billing semantics.
  • Complete exact-head CI/native validation and inspect the applicable sibling Codex runtime source in a permitted checkout.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (24 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-03T05:22:07.434Z sha 2778c08 :: needs real behavior proof before merge. :: [P1] Reserve only canonical generated personal-account IDs
  • reviewed 2026-09-03T08:00:13.334Z sha c58f44f :: blocked before merge. :: none
  • reviewed 2026-09-03T08:36:38.400Z sha ae5e3d2 :: blocked before merge. :: [P2] Use the shipped Connected accounts navigation label
  • reviewed 2026-09-03T09:12:09.862Z sha bcfcdc5 :: needs real behavior proof before merge. :: [P2] Use the Connected accounts navigation label
  • reviewed 2026-09-03T09:28:18.980Z sha bc6011a :: blocked before merge. :: [P2] Use the Connected accounts navigation label
  • reviewed 2026-09-03T09:56:47.630Z sha a8751eb :: blocked before merge. :: [P1] Revalidate authority before OAuth token exchange
  • reviewed 2026-09-03T10:28:56.422Z sha 27a5775 :: needs real behavior proof before merge. :: [P1] Revalidate authority before provider I/O
  • reviewed 2026-09-03T11:16:07.319Z sha 2841e6e :: needs real behavior proof before merge. :: [P1] Revalidate authority inside provider authentication

@scoootscooob
scoootscooob force-pushed the claude/multiplayer-mechanics-df097d branch 2 times, most recently from fb0bd00 to 08a381a Compare September 1, 2026 08:13
@scoootscooob
scoootscooob marked this pull request as ready for review September 1, 2026 08:14
@scoootscooob
scoootscooob requested a review from a team as a code owner September 1, 2026 08:14
Link a model auth profile to each Gateway user profile so sessions a person
starts bill their own subscription (ChatGPT/Codex OAuth or Claude
setup-token) instead of one shared gateway credential. Connecting is
self-service from Settings -> Profile -> Model accounts: the gateway drives
the OpenAI PKCE flow, catches the loopback redirect on its own when the
browser is on the gateway host, and falls back to pasting the redirect URL
for remote teammates. Selection is session-sticky with a new "user-link" pin
provenance that carries user-pin strength through failover, compaction, and
CLI forwarding while the runtime wire contract stays auto|user.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@scoootscooob
scoootscooob force-pushed the claude/multiplayer-mechanics-df097d branch from 08a381a to f207ec6 Compare September 1, 2026 08:18
@openclaw-barnacle openclaw-barnacle Bot added the app: android App: android label Sep 1, 2026
@clawsweeper clawsweeper Bot added status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 1, 2026
…ersistence

Review follow-up (ClawSweeper P1/P2 + security):
- users.linkAuthProfile requires operator.admin: profile ownership is not
  credential ownership, and a linked id becomes both a strict billing pin
  and the reconnect refresh target. Self-service stays on the connect
  flows, which prove account control. UI hides the manual row for
  non-admin writers.
- users.listAuthLinks / unlink never materialize the link table; only the
  first real link creates it.
- Reconnect refreshes the linked auth profile only when its stored
  credential carries the same provider accountId; anything else mints a
  fresh id so a link aimed at a shared credential is never overwritten.
- Authority is revalidated after the awaited token exchange and before
  any persistence; a person whose profile no longer resolves fails closed
  on both the RPC and loopback-callback paths.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@scoootscooob

Copy link
Copy Markdown
Member Author

Addressed all actionable findings in 68cda1f (head of this PR):

  • [P1] Manual links restricted — users.linkAuthProfile is now operator.admin only, with the guidance error pointing non-admins at the self-service connect flows (which prove account control). The profile page hides the manual row for non-admin writers. Cross-credential denial is covered by a unit test and by a live-gateway probe (redacted trace in the PR body): a write-scoped user linking openai:scott gets FORBIDDEN, the same identity with operator.admin succeeds.
  • Reconnect overwrite amplification closed — a reconnect reuses the linked auth profile id only when the stored credential carries the same provider accountId; anything else (including setup-token credentials, which carry no comparable identity) mints a fresh id, so a link aimed at a shared or foreign credential can never be clobbered. Regression: "mints a fresh id when the linked profile stores a different provider account".
  • [P2] Lazy storage honored on reads — users.listAuthLinks and unlink now read through the existing read-only helper and return empty when the table is absent; only the first real link creates it. Regression proves list+unlink on a fresh database leave the table uncreated.
  • Post-exchange revalidation — authority is re-checked after the awaited OAuth exchange and before any persistence: the RPC path re-runs the caller's live access predicate, and both paths fail closed when the person's profile no longer resolves. Regressions: "rejects completion when authority is revoked during the token exchange" (revocation happens inside the awaited exchange; no credential write, no link write) and "fails closed when the person's profile disappears before persistence".
  • SQLite table — the additive user_profile_auth_links table was explicitly approved in the operator's chat before implementation (new STRICT table, no schema-version bump, downgraded readers unaffected); the read paths above now also guarantee it never appears on gateways that never link.

PR body's Evidence section is updated with the redacted live authority-chain traces and the new regression coverage.

@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: android App: android app: web-ui App: web-ui cli CLI command changes commands Command implementations docs Improvements or additions to documentation extensions: anthropic extensions: codex extensions: copilot extensions: openai extensions: xai gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P1 High-priority user-facing bug, regression, or broken workflow. plugin: file-transfer rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants