Case study: reason for rejection (Codex solve-run on formal-ai #645) + low-reasoning warning#2049
Case study: reason for rejection (Codex solve-run on formal-ai #645) + low-reasoning warning#2049konard wants to merge 7 commits into
Conversation
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: #2047
…warning Compiles the formal-ai PR #645 solve-run log and all four reviewer rejections into docs/case-studies/issue-2047, reconstructs the timeline, and identifies two hive-mind root causes: - B1: Codex defaulted to reasoning effort 'none' (--think off) on a hard continue-mode PR task, producing a mid-run give-up. codex.lib.mjs now logs a visible 'Low reasoning' warning when reasoning is disabled. - B2: an auto-restart that only discarded untracked scratch files was reported as 'ready to merge' despite the prior session giving up and the branch being unchanged (documented; follow-up recommendations included). Adds tests/test-issue-2047-codex-low-reasoning-warning.mjs.
Working session summaryDone. Here's what I delivered for issue #2047. What the issue wasThe issue gave a single Codex What I foundThe log is a
Deliverables (branch
|
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost: $3.773869📊 Context and tokens usage:
Total: (7.3K new + 98.4K cache writes + 4.0M cache reads) input tokens, 30.5K output tokens, $3.773869 cost 🤖 Models used:
📎 Log file uploaded as Gist (2076KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
🔄 Auto-restart triggered (iteration 1)Reason: CI failures detected Starting new session to address the issues. Auto-restart-until-mergeable mode is active. This run will stop after 5 restart iterations. |
Working session summaryAll checks now pass or skip — the previously failing "Check for Changesets" is now green (skipping/satisfied). The fix was straightforward: the "Check for Changesets" CI gate requires every PR that touches source to include a changeset entry, and this PR modified Final state:
PR: #2049 This summary was automatically extracted from the AI working session output. |
🔄 Auto-restart-until-mergeable Log (iteration 1)This log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
📊 Context and tokens usage:
Total: (3.5K new + 16.7K cache writes + 312.7K cache reads) input tokens, 2.2K output tokens, $0.395494 cost 🤖 Models used:
📎 Log file uploaded as Gist (2448KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
✅ Ready to mergeThis pull request is now ready to be merged:
Monitored by hive-mind with --auto-restart-until-mergeable flag |
This reverts commit 4ba121a.
|
I think we should redo the analysis, I don't see the analysis of reason of the AI agent. Did it rejected the task from the start? Did it even read the comment and so on. |
|
🤖 AI Work Session Started Starting automated work session at 2026-07-12T02:33:46.763Z The PR has been converted to draft mode while work is in progress. This comment marks the beginning of an AI work session. Please wait for the session to finish, and provide your feedback. |
Addresses reviewer feedback: reconstruct what the Codex agent itself did. Finding: it accepted and correctly understood the review, then abandoned at the understanding->implementing transition (4s, 0 edits, no reasoning steps, reasoning_effort=none), and the restart session falsely checked off 'implement/commit' on its own todo. Ties B1 (reasoning=none) causally to the give-up.
|
Redid the analysis focused on the AI agent's own behavior, per your feedback. New section "Problem B0 — What the AI agent actually did (turn-by-turn)" in the case study, reconstructed verbatim from every Codex event in the log. Direct answers to your questions:
Full table + timeline updates + new B0 root-cause row: docs/case-studies/issue-2047/README.md (commit 04f3d24). |
Working session summaryDone. I addressed the reviewer's feedback — "I don't see the analysis of reason of the AI agent. Did it reject the task from the start? Did it even read the comment?" — by adding a turn-by-turn agent-behavior analysis (Problem B0) reconstructed verbatim from every Codex event in the log. What the reconstruction foundReplaying all 8 events of Session 1 (15:41:23 → 15:42:03 UTC, ~40 s, 0 edits):
Changes landed
PR: #2049 One note: local This summary was automatically extracted from the AI working session output. |
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost: $1.533198📊 Context and tokens usage:
Total: (3.7K new + 68.8K cache writes + 1.0M cache reads) input tokens, 12.3K output tokens, $1.533198 cost 🤖 Models used:
📎 Log file uploaded as Gist (1030KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
🔄 Auto-restart triggered (iteration 1)Reason: CI failures detected Starting new session to address the issues. Auto-restart-until-mergeable mode is active. This run will stop after 5 restart iterations. |
Working session summaryAll CI checks pass now, including lint. SummaryThe failing Fixes applied:
The merge commit ( This summary was automatically extracted from the AI working session output. |
🔄 Auto-restart-until-mergeable Log (iteration 1)This log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
📊 Context and tokens usage:
Total: (4.8K new + 19.8K cache writes + 666.0K cache reads) input tokens, 4.0K output tokens, $0.654717 cost 🤖 Models used:
📎 Log file uploaded as Gist (1673KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
✅ Ready to mergeThis pull request is now ready to be merged:
Monitored by hive-mind with --auto-restart-until-mergeable flag |
Summary
Resolves #2047 — "Investigate the reason for rejection".
The issue supplied a single Codex
solve-run log (from a gist) and asked us to find why the run was rejected and compile a deep case study intodocs/case-studies/issue-{id}.What the log actually was
A
solve … --tool codexrun against link-assistant/formal-ai#645 that was meant to address the reviewer's 18,507-char "Deep implementation review" (the 3rd of four rejections). Instead the Codex session gave up mid-run ("I wasn't able to complete … the branch remains unchanged"), an auto-restart only deleted three untracked scratch JSON files, and hive-mind then posted "✅ Ready to merge" — with the branch unchanged. The reviewer confirmed: "I don't see any changes after this comment."Root causes identified
item_0accepted it,item_2fetched all three feedback channels,item_3correctly summarized "four priority correctness gaps plus unsafe concurrent memory writes",item_5wrote a correct fix plan. It then abandoned at the understanding→implementing transition: 4 s after finishing its code-read (item_6), it gave up (item_7) with 0 edits, 0 tests, and no reasoning steps — not a token/time limit (~33K tokens/~90s against a 1M window). The restart session then falsely checked off "implement the fix" + "commit atomically" on its own todo despite 0 commits. See Problem B0 in the README.none(--think off) on a hard continue-mode PR task (model_reasoning_effort="none"on all 100 turns) → shallow give-up. Fixed:src/codex.lib.mjsnow logs a visible⚠️ Low reasoningwarning when reasoning is disabled.~/.gitconfigcredential-helper write warning (relates to--isolation dockeris not working #1939). Documented; non-fatal.Deliverables
docs/case-studies/issue-2047/README.md— full analysis: executive summary, 13-step timeline, requirements, root causes, proposed solution plans, existing components/libraries, debug/verbose recommendations.docs/case-studies/issue-2047/raw-data/— the complete solve log, all four PR feat: improve auto-restart behavior for uncommitted changes #645 rejections (human-readable.md+ raw JSON), and issues Fix start-screen URL validation for user URLs (fixes #539) #540/feat: add privacy mode diagnostics and troubleshooting for telegram bot #494/Investigate the reason for rejection #2047 bodies.src/codex.lib.mjs— low-reasoning warning (log-only, does not change the Make sure when --think option is not passed it is treated as--think nofor tools (claude/codex/agent and so on) #2032 default).tests/test-issue-2047-codex-low-reasoning-warning.mjs— regression test.Verification
npm run lint— cleannode tests/test-issue-2047-codex-low-reasoning-warning.mjs— passesnode tests/test-issue-2032-default-think-off.mjs— passes (default unchanged)node tests/test-issue-1990-codex-incomplete-session-false-success.mjs— passesCloses #2047