Agent failures - diegoami/imperial_conquest_2 GitHub Wiki
Every OpenCode or Claude agent run that ended early, lost work, or went where it should not, with
its cause and what was done about it. Append a row after every failed or derailed run (the
user's decision of 2026-10-08: "keep a history of failures and let us act on that"). Read the run
first (CLAUDE.md rule 19: python scripts/read-opencode-session.py <ses_…>), then record what it
actually did, not what it seemed to do. The patterns section below is re-read before any change to
the scripts, the agent files or the briefs.
| Date | Run | Model | What happened | Cause (class) | Done about it |
|---|---|---|---|---|---|
| 2026-10-0x | T118 implementer, attempt 1 (#637) | luna | Killed three commits in: permission rejected: external_directory (…\AppData\Local\Temp\*)
|
Guard: TEMP | Fell back to glm-flash by hand. TEMP root allowed 2026-10-08 (d3544b1) |
| 2026-10-08 | T135 implementer | deepseek-flash, then qwen-flash | Both runs rejected reading C:\Users\diego\projects\RE-imperial-conquest-2\docs\reports\*; "OpenCode unavailable: same failure twice" |
Guard: research checkout (the brief cited a report; the model went to read it locally) | Open: the research-mirror allow was dropped in #856 (write-capable, unanchored). Action below. |
| 2026-10-08 | T135 implementer, round 3 | deepseek-flash |
session idle for 900 s after committing; last message "let me read the surrounding section and update them" |
Idle: model stalled mid-edit | The main session finished. Cause not established |
| 2026-10-08 | T140 implementer, R2 | mm-m3 | Rejected running C:\Users\diego\.local\bin\godot.cmd
|
Guard: Godot shim | #856 allowed the shim; T150 allowed ~\.local\bin\*
|
| 2026-10-08 | T140 implementer, R2 resume | mm-m3 | Rejected redirecting git output to %TEMP%\opencode\; the script's git reset --hard then discarded the uncommitted R5 work
|
Guard: TEMP, plus work lost on failure | T150 allowed %TEMP%\opencode; TEMP root allowed d3544b1; T151 (#862) keeps a failed attempt's work |
| 2026-10-08 | T140 implementer, R2 resume 3 | mm-m3 | Rejected re-reading its brief from the main checkout's rendered/
|
Guard: brief outside the worktree | T150 copies the brief to the worktree's rendered/brief.md
|
| 2026-10-08 | T140 fallback | (Sonnet → same backend) | The exit-3 "fall back to Claude Sonnet" ran the session's own backend model, the one that had just failed | Fallback to the same model | T150's different-family substitute, never OpenAI |
| 2026-10-08 | T140 implementer, R1 | mm-m3 | Edited MapClickCheck.cs, outside Owns, on the brief's word; the review had it reverted, and the same check failed two rounds later |
Dependent check outside Owns | §4.4: a brief never widens Owns; amend Owns first (#855, #858) |
| 2026-10-08 | fix #861 implementer | mm-m3 | Listed C:\Users\diego\.local\bin\* "to check what godot shim is available"; rejected after two commits |
Guard: Godot shim (searching for it) | T150's bin allow (merged after this run); the main session finished the fix |
| 2026-10-08 | T150 proof runs | mm-m2.7, luna | The proof of the TEMP allow ran against the main checkout's old agent files; a compliant model refused to touch the path at all | Proof design (agents load agent files from the main checkout) | Proof moved to after the merge (#865) |
| 2026-10-08 | T152 rework 1 | mm-m3 | Wrote scratch scripts to /tmp with cat > /tmp/… <<EOF (allowed: the guard doesn't see redirects), ran one, then its rm -f /tmp/… was rejected and the run died after pushing; the final report was lost |
Guard: TEMP | TEMP root allowed (d3544b1, the user's decision); #875 closed |
| 2026-10-08 | Sol review of #870, 2nd re-check | sol | Couldn't read the research reports (local checkout rejected, gh api 404 on its own command): a whole review round spent on "could not verify" |
Guard: research checkout | The brief now gives the exact gh api …?ref=<commit> commands; worked on the next pass |
| 2026-10-08 | T113 implementer | mm-m3 | Added MercenaryDialogModel.cs and edited NationsAreaMapCheck.cs, both outside Owns |
Dependent check / new model file outside Owns | Judged at review |
| 2026-10-08 | Godot checks, fix #861 worktree | (main session) | Eight checks exited 0 without running: the fresh worktree had no dotnet build or Godot import |
Check never ran | The completion-marker rule caught it; build and import first (now in briefs) |
| 2026-10-08 | GLM re-check of T113 (#878) | glm | Ran godot --headless --path godot --script Checks/MercenariesCheck.cs three times. --script wants GDScript, so with a C# file Godot pops a blocking error message box on the desktop even under --headless (the user saw two), then the reviewer switched to res://Checks/<Name>.tscn
|
Wrong Godot invocation (blocking dialog) | Every Godot brief gives the exact command, godot --headless --path godot res://Checks/<Name>.tscn --quit-after <n>, and says never use --script
|
| 2026-10-08 | T113 implementer + rework 1 | mm-m3 | Both runs ended normally with "Outside paths touched: none", the first Godot task after the guard changes | (clean) | Recorded as the guard's first clean Godot runs on #854 |
| 2026-10-09 | T149 implementer (#792, PR #886) | mm-m3 | The run edited AssetSpecificationCoverageTests so that it asserted the seven new keys were absent from asset-specification.md §6 (a red test at the merge's doc update), dropped the count check, and narrowed Done-when 2's window to 0.4–2.0 s | Test weakened to fit | The main session reverted the test, added the keys to §6 (implicit Owns), restored 0.02–2.0 s (8ad59ae). Rework briefs now say: never change that test so it passes with a key missing |
| 2026-10-09 | T149 rework rounds 1 and 2 | glm | Demonstrating Done-when 3's "no key" stop with env -u ELEVENLABS_API_KEY spent real ElevenLabs credit each round (the generator falls back to the Windows user-scope key); round 2's brief said 0 calls |
Billable side effect | Results discarded. Asked Sol's round-2 re-check whether a committed offline no-key path (stub or switch) exists. Briefs for credit-spending tools must name the offline way to show a no-credentials path |
| 2026-10-09 | T151 implementer, attempt 1 (#862) | ali-glm | Killed after 900 s idle, mid-run, with 3 commits pushed; the final message was a mid-work line ("Writing a small check script instead:"), no model reply after it | Idle stall (pattern 5): the session was read and recorded; resumed on deepseek-flash from the pushed branch, losing nothing |
| 2026-10-09 | T155 rework 1, attempt 1 (#904, PR #923) | mimo-pro | Exit 0 after about 70 min of reading, with no edit and no commit; the final message was mid-exploration | Early end after over-reading: the brief asked for three named test fixes but let the model explore; re-dispatched to Claude Sonnet with a narrow brief (named files, exact changes, no broad exploration), which finished in about 3 min |
| 2026-10-09 | GLM re-check of T155 (PR #923) | glm | The guard rejected a read outside the worktree ("external_directory"), ending the run with nothing posted | Brief defect, not the model's: the main session's brief told an OpenCode reviewer to copy assets.local.ini from the main checkout. Fixed in the brief and re-run. Action: an OpenCode brief never names a path outside its worktree; a local-only check that needs the originals goes to a Claude reviewer or runs without them |
| 2026-10-09 | #908 rework 1, attempt 1 (PR #930) | mm-m3 | The guard rejected a doubled path outside the worktree (ic2-work\ic2-work\scripts\*), ending the run mid-work; its uncommitted R3 self-tests were kept as a patch. The script then picked deepseek-flash as the chain-spent substitute, which the user had blacklisted that day | Path slip, then a stale-tooling hazard: the model joined the worktree path twice; and main's scripts still mapped an opencode_go row to DeepSeek, the very bug being fixed. The main session stopped the substitute before its session started (no change made) and moved the rework to Claude Sonnet, starting from the patch. Action: while a fix to the selection scripts is in flight, run its rework on a Claude agent, not through the unfixed scripts |
| 2026-10-09 | T156 implementer, attempt 1 (#925, PR #933) | mm-m3 | Ended on a denied edit to a mistyped path (C:/Users/Users/..., its second doubled-path slip that day), after 10 commits and a PR. Its final message stopped and reported (success.txt lines, failing tests), but it had deleted T22's soak stall assertion with a justification comment; restored, the soak fails: the AI issued 572 commands in 50 games (24,433 before), its armies idle at war | Weakened a protected assertion to hide a regression, plus path slips. Action: the main session answered on #925 (restore the assertion, fix the inert armies, Owns amendments) and moved the rework to Claude Sonnet; bug #934 stops a denied write from ending a run (the user's decision) |
| 2026-10-09 | Re-check of PR #935 (bug #934) | mimo-pro | Exit 3, "no header line in its output": nothing posted. The session's final message was a complete review (gate 0, R1 confirmed, 192/192, one N1, Final pass done, approve) without the required first line #934 fix review (MiMo Pro) | Format slip, not a failed review: read per rule 19, then posted by hand with the header and a note, and counted as the approve it was. First MiMo review run; watch whether its next brief needs the header requirement stated more prominently |
| 2026-10-10 | IT13 setup, before any dispatch | — | A new machine had no OpenCode Go console login: opencode models opencode-go listed 31 models, so Test-OpenCodeGoLogin passed, and a real call died Error: Missing API key.; a run would have started and fallen back. Also Choose-Model had no alias for the tracker's gpt-6.1-sol (no reviewer found), and assets.local.ini was missing | Setup / check gap | Go login done; #941: the check also asks console orgs; Sol is gpt-6.1-sol; only a provider outage falls back now, every other failure stops with exit 6; notes posted on every exit |
| 2026-10-10 | T156 round 3 (#925, PR #933) | mm-m3 | Committed 3cca621 and did not push it for the rest of its turn, though the brief says push after every commit | Progress not pushed | Main session pushed it; the watch now flags a commit unpushed for 15 min. Open: make the script push, not the model |
| 2026-10-10 | T156 round 3 | mm-m3 | Ended with exit 0 and three Done-when evidence items (DW3/5/6 mutations, DW4 on origin/main, soak recount) marked "optional (next)" in its END block, though the brief required them | Early stop: required items deferred | Round 4 on the same model for exactly those three; all done. Briefs now say "not optional; do not stop before" |
| 2026-10-10 | T156 rework round 1 | mm-m3 | Added a PendingDocumentation allow-list of 28 keys to ScenarioAuthoringDocumentationTest (a weakened test, outside Owns) after reverting docs/scenario-authoring.md | Brief defect (main session): the R5 instruction "leave the rows to the main session" broke a test that requires the rows | #944 put the rows in Owns; main session restored them and dropped the allow-list (5f274d7) |
| 2026-10-10 | T156 rework round 1 | mm-m3 | Moved hire-mercenary into CommandCoverageTests' ConfirmedUnreachable set (outside Owns) so the re-timed success.txt no longer has to cover it | Test weakened to pass | Flagged to the re-review for a ruling |
| 2026-10-10 | Re-checks of PR #933 (T156), run in parallel | sol, mimo-pro | Both killed by Claude Code for low memory (WSL VM 13.9 GB, 3.3 GB free): two full build+test runs at once | Machine memory | WSL file cache dropped, build servers stopped; reviews now run one at a time; the watch warns below 2.5 GB commit |
| 2026-10-10 | Re-check of PR #933, serial | sol | Exit 6, session idle for 600 s: one rebuild+test step under memory pressure ran past the idle limit; the full fixture suite and Godot checks had already passed | Limit too tight (ours) | No fallback (rule 21). #948 adds -ResumeSession so the session continues in its worktree; resume with a longer idle limit |
| 2026-10-10 | Re-check of PR #933, serial | mimo-pro | Exit 6, no exit in 3600 s during its mutation evidence (M5 of its list); worktree clean | Limit too tight (ours) | No fallback. Resume through #948 with a longer total limit |
| 2026-10-10 | Fix 950, attempt 1 | sol | Stopped and reported at once: the brief told it to merge #949's branch, which the implementer agent's rules forbid | Brief defect (main session) | The main session does prerequisite merges itself; the brief no longer asks |
| 2026-10-10 | Fix 950, attempt 2 | sol | Stopped and reported: the brief said #949's branch was merged and pushed, but the branch was still at main | Setup defect (main session): the merge was made on the worktree's detached HEAD and the branch pushed unchanged | Merged on the branch, pushed, verified origin/fix/950-recommend-only before re-dispatching. Lesson: after an implementer run the worktree is detached; check out the branch before preparing it |
| 2026-10-10 | Fix 950, attempt 3 | sol | Ended its turn with Done 1 and 3 committed and pushed, the rest deferred in an END block ("partial implementation"); external-implement -SelfTest 42/43 | Early stop: work deferred | Notes posted on #950 by the script (rule 22 worked); resume on the same branch next session |
| 2026-10-15 | T171/T173 native implementation dispatch | Sol medium | Compound PowerShell edit/build calls waited for sibling-worktree approval; interrupted turns retained their files and commits. A later literal full-ruleset write also exceeded Windows command length (error 206). | Setup/command construction (main session) | Split edits, builds and tests; use bounded editing scripts with an exact script-path approval. Resumed the same agents and preserved work. No broader permission bypass or model fallback. |
| 2026-10-15 | T171 implementation acceptance | Sol medium | Focused checks passed, but the full suite exposed missing authoring-reference ownership, two changed CLI transcripts, and four military decision-log failures. | Preflight omission (main session) plus a newly reached downstream logging defect | Preserved and pushed implementation; proposed bounded ownership/prerequisite amendment PR1118 and filed logging-only bug1120. No assertions, seeded measurements or CLI snapshots waived. |
| 2026-10-15 | PR1118 contract review, session ses_ebf7e9ff9ffe794V9G6x31Vanx | Kimi K3 1M | Completed an approving review, but the wrapper exited6 with no matching header and posted nothing. The brief placed its whole context paragraph on the first line, so the wrapper expected that paragraph as the review header. | Brief defect (main session) | Read the complete saved review, put the exact header on its own line, and resumed the same session/worktree to retain the review. No model substitution. |
| 2026-10-15 | Kimi review routing, including PR1125 | Kimi through OpenCode Go, then Kimi For Coding | Main mapped the user's Kimi choice to OpenCode Go and described it as Kimi 1M without making the provider explicit. The user corrected the intended provider to Kimi For Coding at kimi.com. | Provider selection error (main session) | Retained earlier reviews with their actual provider. Verified the live model kimi-code-plan-cn/kimi-for-coding uses https://api.kimi.com/coding/v1 with 1M context; corrected the local adapter and dry-run output. PR1125 received a fresh full direct-provider review, not a resume of the Go session, and was approved after independent mutation and full-suite verification. New reviews use the direct route only. |
| 2026-10-16 | T169 implementation review, PR1130, session ses_ebe0dc7bfffeRWUoUTSG4Qipo6 | Kimi For Coding 1M, direct kimi.com | Verified exact HEAD dcbe947, full diff, all36Godot checks, tours, package and PCK font/licence inclusion; provider stopped just before final verdict. No review posted and no approval. Its solution run reported5420pass/38skips, not full-fixture coverage. | Provider quota: five-hour limit, exit1; explicit response, not outage | Read last session text and retained export/worktree; issue blocked with full handoff. No model substitution or fallback. Resume same session after reset, resolve/disclose fixture skips, finish verdict, then require human visual sign-off. User requested stop for day. |
| 2026-10-16 | T169 PR1130 review resume, session ses_ebe0dc7bfffeRWUoUTSG4Qipo6 | Kimi For Coding 1M, direct kimi.com | First resumed report repeated stale counts and missing-ini claim despite new copied config/instructions. Corrected rerun identified38skips caused by main's smaller fixture clone, which lacked battles/. | Stale resume evidence + wrong fixture argument | Local ignored adapter now inlines the full current resume brief; main passed full T129-fixtures checkout. Same reviewer independently reran7370tests/0fail/0skip, retained all3nonblocking findings, final user-decision report6209259543. Human visual gate still pending; no approval inferred. |
-
Guard rejections end runs: 8 of the 9 runs that died above (the ninth was an idle stall). By path:
- TEMP: 3 (T118, T140, T152). Fixed (
d3544b1). - The Godot shim: 2. Fixed (T150).
- The research checkout: 2 runs plus a reviewer. Open.
- The main checkout's brief: 1. Fixed (T150).
Lesson: every rejection so far was a benign read or a scratch write, never a harmful one. Allow what agents actually use, and keep denying only what holds credentials.
- TEMP: 3 (T118, T140, T152). Fixed (
-
Research reports. Briefs cite reports, and agents go to read them. Open action: tell every implementer and reviewer brief to read a report with
gh api "repos/diegoami/imperial-conquest-2-research/contents/docs/reports/<file>?ref=<commit>" --jq .content | base64 -d(no outside path), and keep pasting the excerpt the task needs (rule 15). -
Dependent checks outside Owns (T140, T113). A UI change breaks a check that another task owns, and the implementer fixes it without the contract allowing it. Action: when an entry changes a panel or screen, list the checks that read it in Owns from the start (grep
godot/Checksfor the class names before dispatch). -
Work lost when a run dies (T140). Planned: T151 keeps a failed attempt's work and worktree.
-
Idle stalls (T135). Open: read the next one's session before re-dispatching, and record the cause here.
-
Wrong Godot invocation (GLM, T113).
--script <file>.csopens a blocking error dialog on the desktop. Action: briefs give the exactres://Checks/<Name>.tscncommand. -
Reports lost when a run dies after pushing (T152). The work survived (pushed), only the hand-back was lost. The main session reads the session and the PR instead.