Skip to content

Keep Standard scan progress and saved review activity consistent #70

Open

Description

@hujm2023

Summary

Standard scans need to distinguish active worker/tool activity, completed review, and unavailable progress information. Live output and saved history should agree about the phase and completed work.

The original generic-heartbeat complaint has been partly addressed. The remaining problem is that activity can occur before durable review results are published, while counters or saved phase information still imply that nothing has happened.

Current status — 19 October 2026

Completed-review receipts and reconciliation between live progress and saved history remain related open work in #829 and #1596. An observed worker or file read is not itself proof that review is complete.

Historical observations and correction

The original CLI 0.1.1 Standard scan printed a generic Running scan heartbeat for roughly 43 minutes. It then completed successfully at 44:13 and produced findings and saved artifacts. The initial concern was missing observability, not a confirmed hang.

A later 0.1.16 synthetic three-file run hit its $3 estimated-cost limit after 4 minutes 28 seconds. The terminal showed Files: 0/3, while saved state still said phase=preflight with zero completed review items.

The follow-up corrected the suspected cause: rollout evidence showed a coordinator, five workers, and 53 sandboxed commands reading source and guidance. There was no demonstrated sandbox or ARM64 execution stall in that controlled run. Review work was active behind the zero counters, and workers started at different times before the limiter stopped them.

Remaining expectations

  1. Distinguish an active request, worker/tool activity, and completed review using the evidence available for each.
  2. Display unknown counts as unknown rather than inventing zero completed work or a planned total.
  3. Persist phase/review progress consistently with the live display and completed-review receipts.
  4. Show when the last meaningful progress was observed without treating a quiet model request as proof of a hang.
  5. Preserve accurate progress when the scan stops before its first result is committed.

The historical proposal for a no-progress watchdog is separate from the requested truthful reporting. Any watchdog would need to account for actual worker/tool activity and normal long-running requests.

Related issues

#29 covers usage freshness and ChatGPT allowance, #956 covers dispatch timing for CI guards, and #187 covers a durable session-artifact index. These provide different evidence and should not be treated as interchangeable fixes.

Activity

  1. hujm2023 commented on Jul 29, 2026

    @hujm2023
    Author

    Update: the scan completed successfully at 44:13.

    Final summary:

    [44:13] Scan complete
    codex-security: Findings: 37 (15 high, 22 medium). Coverage: partial.
    codex-security: Elapsed: 2641s.
    codex-security: Tokens: 135,369,191 input, 129,318,400 cached, 480,582 output.
    codex-security: Estimated cost: $109.330615 USD.
    

    The manifest and turn are both marked completed; exit code 2 was expected because coverage was partial. All documented result artifacts (scan-manifest.json, findings.json, coverage.json, report.md, and SARIF) were generated.

    The observability concern remains: from [01:00] until completion at [44:13], the only CLI output was the generic once-per-second Running scan heartbeat. There were no phase transitions, worker progress updates, cost updates, or other signals that distinguished this healthy 43-minute in-flight request from a stalled scan.

  2. added
    enhancement
    on Aug 3, 2026
  3. mldangelo-oai commented on Aug 3, 2026

    @mldangelo-oai
    Collaborator

    Related observability/cost work has several separate scopes: #63 adds verbose scan diagnostics; #29 asks for ChatGPT allowance visibility; #187 requests rollout-session retention; and #31 / #198 address overlapping cost-polling work. None of those changes alone establishes that a long-running scan is making useful forward progress, so they should be linked without treating this request as a duplicate or already fixed.

  4. added
    area:cli
    area:cost
    bug
    priority:p2
    on Aug 15, 2026
  5. mldangelo-oai commented on Aug 15, 2026

    @mldangelo-oai
    Collaborator

    The live activity dashboard landed in #261, but Standard scans can still display an unverified 0 / N reviewed count. Keeping this open for accurate phase, activity, and completed-review reporting.

  6. changed the title [-]Standard full-repository scan shows only generic heartbeat for 40+ minutes — expected behavior?[/-] [+]Show truthful Standard scan progress and completed review activity[/+] on Aug 15, 2026
  7. blodebole commented on Aug 20, 2026

    @blodebole

    Additional reproduction: Standard scan remains in preflight until cost limit

    We hit a stronger version of this failure with a very small path-scoped Standard scan: the scan never published a preflight check or review-item completion and stopped only when --max-cost aborted it.

    Environment

    • @openai/[email protected]
    • bundled plugin 0.1.22
    • bundled Codex runtime 0.148.0-alpha.8
    • model gpt-5.6-sol, reasoning effort xhigh
    • ChatGPT device authentication
    • Node 22 / Python 3
    • Linux arm64 under OrbStack's Docker engine on Apple Silicon
    • non-root uid 1000
    • repository scope reduced to a directory containing 2 files

    Observed

    Across Standard runs:

    • scans.phase remained preflight for the whole run;
    • scan_progress.review_items_total = 0 and review_items_completed = 0;
    • preflight_checks_total = 0 and preflight_issues_json = [];
    • terminal progress nevertheless displayed reviewing files (...) | Files: 0/2;
    • usage grew at roughly 1M mostly-cached input tokens/minute while output increased only about 200 tokens/minute;
    • CODEX_SECURITY_LOG_LEVEL=debug --verbose emitted only cost.updated events, with no shell, helper, sandbox, or source-read activity;
    • the run ended only at the configured cost limit, whose message became scans.failure_message.

    Sandbox controls

    An earlier run had a real Docker seccomp failure preventing Bubblewrap user-namespace creation. That is separate and was eliminated before the reproduction above.

    Using the exact post-seccomp container flags and runtime user, a quota-free probe through the bundled Codex sandbox wrapper:

    • ran _bundled_plugin/scripts/config_preflight.py successfully;
    • returned status: ready;
    • read files from the mounted scan workspace.

    The same sandbox behavior was reproduced on Linux x86_64, weakening an ARM64-runtime explanation. --read-only and no-new-privileges did not affect the helper result.

    Interpretation

    The evidence is consistent with a model/orchestration loop before the Standard-scan agent invokes or publishes capability preflight, rather than a long source-review turn or a Bubblewrap failure. Because the saved session rollout was deleted during credential cleanup, we cannot provide the raw event stream; the workbench counters and verbose-output summary above were captured before cleanup.

    Expected behavior

    If the agent has not invoked or published preflight after bounded turns/time, stop with a diagnostic before further model usage. At minimum, distinguish an active model request from repeated no-progress turns and avoid displaying reviewing files before preflight has completed.

    0.1.16 was released after this reproduction; its release notes do not mention preflight or progress-loop changes. We plan one bounded seeded-control retry on that version and can report whether the behavior persists.

  8. blodebole commented on Aug 20, 2026

    @blodebole

    Follow-up with the bounded 0.1.16 seeded-control retry:

    • Environment: isolated OrbStack Ubuntu machine, Linux arm64, Node 22.14.0. Only a sanitized clone, scan brief, and public knowledge-base files were present.
    • CLI 0.1.16; bundled plugin remains 0.1.22; Codex remains 0.148.0-alpha.8; gpt-5.6-sol / xhigh.
    • Exact scope: three files containing three intentional security controls (tenant authorization bypasses and unsafe privileged billing reconciliation).
    • Dry run completed immediately and resolved all three files.
    • The paid run emitted worker.preflight delegation="available" configured_slots=8 at 28s, then the terminal switched to reviewing files at 55s.
    • It hit the $3 limiter after 4m28s: estimated $3.048526, 2,361,440 input tokens, 2,099,712 cached input tokens, and 23,001 output tokens.
    • Terminal remained Files: 0/3.
    • The sealed workbench still recorded phase=preflight, review_items_total=0, review_items_completed=0, preflight_checks_total=0, finding_occurrences=0, and no registered artifacts.
    • The only output-dir file was scoped-source-input.jsonl.

    Important correction to the initial interpretation: the Codex rollout logs prove that work was occurring behind the zero counters. The run created one coordinator plus five worker sessions and made 53 sandboxed exec calls. Workers successfully read the three scoped source files, repository context, migrations, security guidance, security-scan/SKILL.md, scan-prologue.md, config-preflight.md, and core-scan.md. No bubblewrap, namespace, permission, or read-only-filesystem failure occurred. One initial relative-path read used the output directory and failed with file-not-found; the coordinator immediately retried against $CODEX_SECURITY_REPOSITORY successfully.

    Worker creation was also highly staggered: coordinator at 18:02:05, workers at 18:04:04, 18:04:27, 18:05:35, 18:05:58, and 18:06:22. The final file-specific worker had only seconds before the cost limiter canceled the run.

    So this no longer looks like an ARM64/bubblewrap execution stall. It looks like an observability and cost-bounding problem: active pre-publication worker work is represented as zero review items (and SQLite stays in preflight even after the terminal claims reviewing), while the cost cap can cancel all workers before the first result is committed. A cheap no-progress watchdog still seems valuable, but progress should include worker/tool activity; exposing active/completed worker counts and persisting the actual phase would make the CLI truthful.

  9. mldangelo-oai commented on Oct 8, 2026

    @mldangelo-oai
    Collaborator

    Merged #882 advances progress when drafts are saved, and #962 exposes observed worker sessions. Open #829 adds completed-file review receipts; #1276 improves usage display and dashboard responsiveness. These cover parts of this request.

  10. removed
    area:cost
    on Oct 8, 2026
  11. changed the title [-]Show truthful Standard scan progress and completed review activity[/-] [+]Keep Standard scan progress and saved review activity consistent[/+] on Oct 19, 2026
  12. removed
    enhancement
    on Oct 19, 2026
  13. mldangelo-oai commented on Oct 25, 2026

    @mldangelo-oai
    Collaborator

    #1757 already refreshes the terminal from saved progress. #1960 addresses the misleading initial 0/N.

    There are two different things we can save here: #1866 counts files seen in tool output, while #1686 and #1030 propose saving the files reported as reviewed. A file read isn’t a completion receipt. Keeping this open for the receipts and agreement between live and saved counts.

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

Metadata

Metadata

Assignees

Labels

area:clibugpriority:p2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions