Repository navigation
Import existing Codex accounts from Orca #4393
Description
Area
Authentication and account pool
What are you trying to accomplish?
I have several Codex accounts signed into Orca and want to use them in OpenCodex without logging into each account again. Repeating the import should not create duplicate pool entries or replace existing accounts.
What prevents this today?
There is no account command for importing Orca's registered Codex accounts. A one-off access-token copy expires, while copying refresh tokens gives two applications control of the same refresh grant.
What should OpenCodex do?
Add a local import command with a preview by default and an explicit apply flag. Read only accounts listed in the selected Orca profile, check each managed-home marker, and skip account IDs already known to OpenCodex.
Keep Orca responsible for refresh. Store a source link and read its current access token when needed, without copying or using its refresh token. Reject missing, expired, or identity-mismatched sources. New accounts should still go through the existing validation step.
Example usage or interface
ocx account import-orca --source "$env:APPDATA\orca" --registry "$env:APPDATA\orca\profiles\local-default\orca-data.json" --json
ocx stop
ocx account import-orca --source "$env:APPDATA\orca" --registry "$env:APPDATA\orca\profiles\local-default\orca-data.json" --apply
ocx startAfter import, use Refresh quotas in Codex Auth to validate the new accounts. Command output should contain counts, not tokens or account details.
Alternatives or workarounds
Logging into each account again works, but is cumbersome for several accounts. Manually copying access tokens requires repeating the process after expiry.
Additional context
Orca records its account list in settings.codexManagedAccounts and writes a .orca-managed-home marker:
The initial scope is local host homes. WSL and remote homes can stay out of scope. Matching by ChatGPT account ID deliberately skips separate members of the same workspace too. Orca must keep the source login available and refreshed.
Checks
- I searched existing issues and documentation.
- This request describes a concrete OpenCodex workflow rather than merely naming a desired technology.
- I removed secrets and personal data.
Activity
lidge-jun commentedon Sep 12, 2026
리뷰 · 우선순위 56 / 80
이 이슈는 Orca에 이미 로그인해 둔 Codex 계정을 OpenCodex 풀에 다시 로그인하지 않고 붙이려는 요청입니다. 지금
devHEAD20861aebf(#4390 Cline/픽스처 + #4385 Combo 시계)에는ocx account import와 일반 login/refresh만 있고, Orca 프로필의orca-data.json+ managed home을 읽어 오는 전용 경로가 없습니다. 그래서 지금은 (1) 액세스 토큰만 복사했다가 만료되면 다시 깨지거나, (2) refresh 토큰까지 복사해 두 앱이 같은 refresh grant를 두고 싸우게 됩니다. 이슈가 원한 계약은 preview 기본값,--apply는 프록시 중지 후에만, 이미 아는 ChatGPT account id는 건너뛰고, refresh는 Orca가 계속 소유하고 OpenCodex는 현재 access token만 읽는 것입니다.같은 날 PR #4394가 이 이슈를 닫으려 열렸습니다. 구현은
src/codex/orca-auth-source.ts(심볼릭 링크·크기 상한·ownership marker 검사)와src/codex/orca-import.ts(preview/apply, 중단된orca-*pending 복구) 그리고src/codex/account-store.ts의sourceAuthPath분기로 refresh flight에 들어가지 않게 막아 둡니다. 방향은 이슈와 잘 맞고, 지금dev의 계정 풀·검증 대기(codexValidationPending) 흐름과도 이어집니다. 다만 #4394는 hygiene에서unsponsored_surface(경로:src/codex/auth-api.ts)로intake: hygiene-blocked가 붙어 있어, 메인테이너가maintainer-sponsored를 달기 전에는 머지 게이트를 통과할 수 없습니다. 또 같은 ChatGPT workspace를 쓰는 멤버를 중복으로 취급한다는 점은 이슈 본문에도 적혀 있으니, “사람마다 따로 쓰고 싶다”는 기대를 가진 사용자는 미리 알아 두어야 합니다.이슈만 놓고 보면 제품 가치는 분명합니다. Orca와 OpenCodex를 같이 쓰는 사람 입장에서는 반복 로그인이 제일 큰 마찰이고, refresh 이중 소유를 피하려는 설계도 안전 쪽에 가깝습니다. 다만 지금
dev가 밀어 올리는 릴리스/회귀 열차(#4390 계획 문서)와는 직교하는 auth 표면이라, 스폰서십과 보안 리뷰가 먼저입니다. GUI 임포트는 요청 범위 밖(CLI + 문서)으로 두는 것도 이슈와 일치합니다.이슈 본문 Example usage- PowerShell 경로 예시는 좋지만, macOS/Linux(~/Library·~/.config) 예가 없어 비전공 기여자가 Windows 전용으로 오해할 수 있다. 이슈나 후속 PR 문서에 OS별 한 줄씩 더하자.중복 정책 (workspace / account id)- ChatGPT account id 기준으로 건너뛰면 같은 워크스페이스 멤버가 “내 좌석”을 못 갖게 된다. 이슈가 의도한 안전장치인지, 나중에 subject 단위로 풀지 한 번 더 박아 두자.PR #4394 hygiene-unsponsored_surface가auth-api.ts를 가리키므로, 이슈를 닫으려면 코드 리뷰만으로는 부족하고 메인테이너 스폰서 라벨이 필요하다.검증 단계- apply 후 “Refresh quotas in Codex Auth”로 pending을 푼다는 흐름이 이슈에만 짧게 있다. 대시보드 어디에 버튼이 있는지 문장 한 줄을 더 쓰면 실수 import가 줄어든다.메인테이너의 판단이 필요한 지점
maintainer-sponsored를 달고 보안 리뷰를 할지, 아니면 Orca 연동을 다음 계정-풀 로드맵([Feature]: complete the OAuth account-pool lifecycle — session affinity, 401/403 rotation, pool health, and stable reset-credit identity #3375 계열)으로 미룰지needs-sponsor처럼 표시할지너의 추천
#4394가 이미 이슈를 구현 중이니 이슈는 그 PR에 묶인 채로 두고, 메인테이너가 auth 경로를 읽은 뒤
maintainer-sponsored를 달 때만 닫자. workspace 중복 정책은 PR 리뷰 댓글에 한 줄로 확정해 두고, OS별 경로 예시는 문서에만 보완하면 된다. 스폰서 없이 merge하지 말자.이 댓글은 grok-bot이 작성했습니다
lidge-jun commentedon Sep 18, 2026
Fixed on
devby #4985, squashed as76d9a59e96cf37ad8cb06c1b7429e5c24eddd1af, carrying the original contribution with aCo-authored-bytrailer so it is attributed in the contributor graph rather than only in prose.Accounts listed in an explicitly selected Orca registry can now be imported. Preview is offline and read-only, applying requires an initialized target and a stopped proxy, and existing main, configured and orphan credential identities take part in account-ID deduplication. Imported pool records keep an access-token snapshot and a local source reference with no refresh token: Orca owns refresh, and even a forced refresh never exchanges its refresh token.
Shipping in the next release off
dev.