Skip to content

fix(cli): use shell-neutral env-var removal guidance - #754

Merged
mldangelo-oai merged 1 commit into
openai:mainfrom
mangeshraut712:fix/login-status-shell-neutral-env-guidance
Aug 30, 2026
Merged

fix(cli): use shell-neutral env-var removal guidance#754
mldangelo-oai merged 1 commit into
openai:mainfrom
mangeshraut712:fix/login-status-shell-neutral-env-guidance

Conversation

@mangeshraut712

Copy link
Copy Markdown
Contributor

Summary

login status and the post-login warning printed POSIX unset OPENAI_API_KEY ..., which is invalid in PowerShell. Windows users following that hint cannot drop the environment API keys that shadow a ChatGPT sign-in.

Fixes #33.

Changes

  • Added formatEnvironmentVariableRemovalGuidance() so the CLI prints shell-neutral wording (remove OPENAI_API_KEY and CODEX_API_KEY from the environment) instead of a POSIX command.
  • Used that helper for the login status path and the post-login / access-token warning that lists whichever shadowing keys are actually set.

Testing

  • bun test --timeout 30000 ./tests-ts/api-environment.test.ts ./tests-ts/cli-authentication.test.ts — 29 pass, 0 fail
  • pnpm run lint (tsc --noEmit) — exit 0

Risk and rollout

Documentation-only user-facing strings. No auth, scan, or credential-handling behavior change. Existing CLI authentication tests now assert the shell-neutral text and that unset no longer appears.

Public disclosure review

  • No customer, partner, prospect, or user identities, data, or identifying details are included.
  • No credentials, personal data, private source, scan findings, or nonpublic links or tickets are included.
  • I reviewed the branch name, title, description, commits, changes, comments, logs, screenshots, attachments, and links for public disclosure.

login status and post-login warnings told users to run POSIX unset,
which is invalid in PowerShell. Print shell-neutral wording instead.
@chatgpt-codex-connector

Copy link
Copy Markdown

Note

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions github-actions Bot added the bug Something isn't working label Aug 30, 2026

@mldangelo-oai mldangelo-oai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing the PowerShell guidance. This makes the messages usable across shells while keeping authentication behavior unchanged. The tests cover both key names, mixed-case names, and the login and access-token warning paths.

I reviewed commit e488ee9ca1a165182b5fcb11582c3c250f407d32 and found no blocking issues. The 29 focused tests, type checking, formatting, and all CI checks passed. Codex's automated review attempt hit its usage quota, so this approval is based on my code review and those checks.

@mldangelo-oai
mldangelo-oai merged commit f714a65 into openai:main Aug 30, 2026
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

login status prints POSIX-only unset guidance on PowerShell

2 participants