Area
Authentication and account pool
Goal
Allow users to import existing Google Antigravity accounts exported by Cockpit Tools instead of repeating interactive browser OAuth for every account.
Imported refresh tokens are credentials and must remain inside OpenCodex's normal credential-storage boundary.
This issue tracks the Cockpit Tools → Google Antigravity import contract only.
Current status
Implementation is in progress in:
#1357
feat(auth): import Cockpit Tools accounts through safe adapters
The earlier #1077 approach was superseded.
The current implementation direction deliberately avoids accepting credentials through command-line arguments or ordinary configuration.
This issue should remain open until the accepted implementation lands on dev.
Supported v1 input
The supported v1 format is a Cockpit Tools Google Antigravity export containing one or more records conceptually shaped like:
[
{
"email": "user@example.com",
"refresh_token": "<redacted>"
}
]
Examples, screenshots, logs, tests, and issue comments must use placeholders only.
No real refresh token belongs in repository content or normal diagnostic output.
Supported surfaces
Dashboard
Provide the import action under:
Providers
→ Google Antigravity
→ Accounts
→ Import Accounts
The Dashboard should use a local file picker.
It must not:
- redisplay the file contents;
- redisplay refresh tokens;
- place credentials into persistent frontend state;
- return credentials after processing.
Only safe result information should be shown.
CLI
CLI import must accept credential material through:
ocx account import google-antigravity --format cockpit-tools --file <path>
or:
cat accounts.json | ocx account import google-antigravity --format cockpit-tools --stdin
Credential JSON must not be accepted as a positional/argv value.
Command arguments can be retained in:
- shell history;
- process listings;
- diagnostics;
- terminal transcripts.
File/stdin-only admission avoids that unnecessary exposure.
Import validation
For each record:
- parse the supported Cockpit Tools format;
- require the fields needed by the format;
- reject malformed or unsupported entries;
- use the refresh token to perform the provider validation required by the Antigravity account path;
- derive authoritative account identity from the provider rather than trusting arbitrary caller-supplied identity;
- verify any claimed email against the provider-derived identity where applicable;
- resolve/validate the required Cloud Code Assist project;
- only then persist the account through the normal Antigravity credential store.
An imported credential must not be marked healthy merely because the JSON parsed.
Duplicate handling
Imports must be deterministic.
If the provider-derived account identity already exists, the import should safely update/upsert that identity rather than creating duplicate pool entries.
Duplicate detection must be based on authoritative account identity rather than trusting only the email text supplied by the export.
Batch behavior
A Cockpit Tools export may contain multiple accounts.
The import result may report bounded aggregate/status information such as:
imported
updated
failed
unsupported
or equivalent fixed result codes.
Do not include:
- refresh tokens;
- access tokens;
- account IDs that are not already safe public identifiers;
- raw provider errors;
- raw import records.
Malformed successful responses from internal import components must fail closed rather than accidentally projecting unexpected data.
Credential handling
Imported refresh tokens must use the same protected credential-storage path as interactively authenticated Google Antigravity accounts.
The implementation must not place refresh tokens in:
- ordinary
config.json provider configuration;
- request/history logs;
- usage records;
- telemetry;
- diagnostics;
- management API responses;
- Dashboard result objects;
- screenshots;
- error messages.
Raw import payloads should not be retained after processing.
Security boundaries
The import adapter must be explicitly allowlisted.
For v1:
provider = google-antigravity
format = cockpit-tools
must be the proven contract.
Do not interpret this feature as generic arbitrary OAuth credential import.
Other Cockpit Tools provider formats should remain unsupported until their credential and validation contracts are separately established.
The import parser should also be bounded so an untrusted local export cannot cause unbounded parsing or processing.
Failure behavior
One bad record should not expose or corrupt other credentials.
Failures should use safe, bounded result codes and counts.
A failure to:
- refresh;
- derive identity;
- validate claimed identity;
- resolve the Cloud Code Assist project;
- persist the account;
must leave that record unavailable for routing.
Normal account import failure must not damage existing healthy Antigravity accounts.
After successful import
Successfully imported accounts should immediately become ordinary Google Antigravity accounts available to the existing account-management and pool machinery.
Import itself does not define:
- pool selection policy;
- automatic failover;
- quota aggregation;
- quota/reset presentation.
Those remain separate concerns.
Related issues
Broader Google Antigravity account-pool and management UX.
Per-account Gem/Cla quota display.
Generic OAuth account-pool selection/failover architecture.
Superseded earlier implementation attempt.
Current implementation PR for this issue.
Acceptance criteria
Checks
Area
Authentication and account pool
Goal
Allow users to import existing Google Antigravity accounts exported by Cockpit Tools instead of repeating interactive browser OAuth for every account.
Imported refresh tokens are credentials and must remain inside OpenCodex's normal credential-storage boundary.
This issue tracks the Cockpit Tools → Google Antigravity import contract only.
Current status
Implementation is in progress in:
The earlier #1077 approach was superseded.
The current implementation direction deliberately avoids accepting credentials through command-line arguments or ordinary configuration.
This issue should remain open until the accepted implementation lands on
dev.Supported v1 input
The supported v1 format is a Cockpit Tools Google Antigravity export containing one or more records conceptually shaped like:
[ { "email": "user@example.com", "refresh_token": "<redacted>" } ]Examples, screenshots, logs, tests, and issue comments must use placeholders only.
No real refresh token belongs in repository content or normal diagnostic output.
Supported surfaces
Dashboard
Provide the import action under:
The Dashboard should use a local file picker.
It must not:
Only safe result information should be shown.
CLI
CLI import must accept credential material through:
or:
cat accounts.json | ocx account import google-antigravity --format cockpit-tools --stdinCredential JSON must not be accepted as a positional/argv value.
Command arguments can be retained in:
File/stdin-only admission avoids that unnecessary exposure.
Import validation
For each record:
An imported credential must not be marked healthy merely because the JSON parsed.
Duplicate handling
Imports must be deterministic.
If the provider-derived account identity already exists, the import should safely update/upsert that identity rather than creating duplicate pool entries.
Duplicate detection must be based on authoritative account identity rather than trusting only the email text supplied by the export.
Batch behavior
A Cockpit Tools export may contain multiple accounts.
The import result may report bounded aggregate/status information such as:
or equivalent fixed result codes.
Do not include:
Malformed successful responses from internal import components must fail closed rather than accidentally projecting unexpected data.
Credential handling
Imported refresh tokens must use the same protected credential-storage path as interactively authenticated Google Antigravity accounts.
The implementation must not place refresh tokens in:
config.jsonprovider configuration;Raw import payloads should not be retained after processing.
Security boundaries
The import adapter must be explicitly allowlisted.
For v1:
must be the proven contract.
Do not interpret this feature as generic arbitrary OAuth credential import.
Other Cockpit Tools provider formats should remain unsupported until their credential and validation contracts are separately established.
The import parser should also be bounded so an untrusted local export cannot cause unbounded parsing or processing.
Failure behavior
One bad record should not expose or corrupt other credentials.
Failures should use safe, bounded result codes and counts.
A failure to:
must leave that record unavailable for routing.
Normal account import failure must not damage existing healthy Antigravity accounts.
After successful import
Successfully imported accounts should immediately become ordinary Google Antigravity accounts available to the existing account-management and pool machinery.
Import itself does not define:
Those remain separate concerns.
Related issues
#1062
Broader Google Antigravity account-pool and management UX.
#1082
Per-account Gem/Cla quota display.
#695
Generic OAuth account-pool selection/failover architecture.
#1077
Superseded earlier implementation attempt.
#1357
Current implementation PR for this issue.
Acceptance criteria
dev.Checks