Skip to content

CLI 0.1.0: real scans fail with “The model service could not be reached” while codex exec succeeds #26

Closed

Description

@franklinburrus

Summary

Codex Security passes local preflight, but every real scan fails immediately with:

The model service could not be reached. Check your network connection and try again.

The regular Codex CLI works successfully from the same repository using the same stored ChatGPT authentication.

Environment

  • macOS 26.5.2 (Build 25F84)
  • Codex Security CLI: 0.1.0
  • Bundled plugin: 0.1.14
  • Codex CLI tested: 0.144.6 and 0.145.0
  • Node.js: 24.6.0
  • Python: 3.12.8
  • Authentication: stored ChatGPT credentials
  • Repository: valid Git repository
  • Output directory: private directory outside the repository

Working Codex test

cd ~/Projects/Job-Search-OS
codex exec "Reply with exactly: connection successful"

Result:

connection successful

The normal Codex CLI successfully reached the service with gpt-5.6-terra.

Successful preflight

codex-security scan . \
  --model gpt-5.6-terra \
  --output-dir /private/tmp/job-search-os-security \
  --archive-existing \
  --dry-run

Result: local preflight completes successfully.

Failing scan

unset OPENAI_API_KEY CODEX_API_KEY

codex-security scan . \
  --model gpt-5.6-terra \
  --output-dir /private/tmp/job-search-os-security \
  --archive-existing

Result:

[00:00] Preparing scan
[00:00] Authentication: stored Codex credentials.
[00:00] Preparing scan
codex-security: The model service could not be reached. Check your network connection and try again.
codex-security: Partial output was kept at /private/tmp/job-search-os-security.

The same failure occurs with the default gpt-5.6-sol model.

Additional verification

  • codex-security login status reports Logged in using ChatGPT.
  • OPENAI_API_KEY and CODEX_API_KEY were unset before scanning.
  • The repository path and external output directory pass validation.
  • Reinstalling Codex Security did not change the result.
  • Updating Codex CLI from 0.144.6 to 0.145.0 did not change the Codex Security failure.
  • Regular codex exec continued to work.

Expected behavior

A real Codex Security scan should initialize the model service and begin scanning when stored ChatGPT credentials are valid and normal Codex access works.

Actual behavior

The scan fails immediately during model-service initialization with a generic connectivity message, despite working Codex connectivity from the same shell and repository.

Activity

  1. daneschneider-oai commented on Jul 29, 2026

    @daneschneider-oai
    Collaborator

    Thanks for posting! This should now be fixed if you upgrade to 0.1.1 — please let me know if you're still seeing the issue.

  2. added
    bug
    question
    on Aug 3, 2026
  3. removed
    question
    on Aug 15, 2026
  4. mldangelo-oai commented on Aug 15, 2026

    @mldangelo-oai
    Collaborator

    Thanks for reporting this. #22 fixed the authentication and scan-state problem, and the original follow-up confirms the fix in 0.1.1. Please update to the current release if you run into this again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions