Skip to content

Add managed Grok accounts and account controls - #25030

Draft
PyramidPeak wants to merge 1 commit into
stablyai:mainfrom
PyramidPeak:codex/grok-accounts-upstream
Draft

PyramidPeak wants to merge 1 commit into
stablyai:mainfrom
PyramidPeak:codex/grok-accounts-upstream

Conversation

@PyramidPeak

@PyramidPeak PyramidPeak commented Oct 3, 2026 •

Copy link
Copy Markdown

ELI5

Save multiple Grok accounts, see each account's usage, and choose the account for a new session from Grok's usage menu. Existing conversations retain their original account.

What Changed

  • Add account settings, isolated managed homes, IPC/RPC account operations, and orca account usage/select/import --agent grok commands.
  • Pin new and resumed sessions to the appropriate account home and leader socket; scan managed homes for session history and invalidate the parse cache when account provenance changes.
  • Renew expired OAuth credentials, preserve concurrent CLI credential changes, and check the renewed identity before persisting tokens.
  • Add account selection, independent usage bars, monthly-only usage support, and Manage Accounts to Grok's usage submenu.
  • Allow an ordinary second desktop launch to restore Orca after it was started in the background. Background launches retain their existing behavior.

Why

A single ambient login cannot reliably represent several Grok accounts. Reuse the existing account-management and terminal-launch boundaries, keeping default selection separate from running sessions. Account homes remain local to the execution host; local Windows homes are not injected into SSH or WSL launches.

Linked Issue

Addresses the managed-account and explicit-selection portions of #8121. Automatic switching within a running conversation remains outside this change.

Visual Proof

Draft: fresh before/after visual proof on the reconciled upstream branch is pending. Earlier local Windows builds were exercised using isolated fixture accounts. Personal account screenshots are excluded from this submission.

Testing

  • I manually tested these changes locally on Windows at the earlier installed checkpoints.
  • Automated tests added/updated.
  • Reconciled upstream branch: 150 focused account, auth, renewal, history-cache, startup, window-policy and PTY tests passed; 21 account settings and usage-menu tests passed.
  • Full node/web/CLI typechecking and the changed-code quality gate passed.
  • Production Electron main/preload/renderer build and renderer boot-graph verification passed.
  • After extracting the account-home and launch helpers, 32 focused managed-account and resume tests passed.
  • Pre-commit lint, React Doctor and formatting checks passed.
  • All automated launches used ORCA_BACKGROUND_LAUNCH=1.
  • macOS, Linux and SSH execution have not been exercised locally. Full upstream CI and fresh packaged end-to-end/visual checks remain pending.

AI Disclosure

Implemented and reviewed with OpenAI Codex, with feature direction and installed-app feedback from the contributor.

Review

Please review default selection versus resumed-session ownership, credential renewal races, and execution-host boundaries. The public branch contains source and synthetic tests. Secret and personal-data scans found no findings; the new contribution commit uses a GitHub noreply address.

Agent skill upstream boundary

  • Not applicable: no skill-installer source or registry changes.

Notes

Prepared as a fresh contribution commit on current upstream main. Optional Windows CodexBar integration is proposed separately in nesszer/Win-CodexBar#749. The legacy session-history repair performed on the local installation is separate from this contribution.

Checklist

  • This PR is small and focused.
  • I explained the behavior, mechanism and approach.
  • Before/after visual proof attached.
  • Self-reviewed for correctness, security and performance.
  • Cross-platform, SSH/remote and path impact considered.
  • Full upstream lint, typecheck, test and build CI pass.

This branch has not been deployed

No deployments
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