/codex:adversarial-review --wait
- User
/codex:adversarial-review --wait
- User
codex:adversarial-review /codex:adversarial-review --wait
Assistant· claude-opus-4-6
Codex Adversarial Review
Target: branch diff against main Verdict: needs-attention
No-ship: the v2 dual-write still drops task metadata for a real mid-turn path, so rewinds/restores can silently miss subagent artifacts after a user commit.
Findings:
- [high] Late task artifacts are never copied into v2 checkpoints after a mid-turn commit (
cmd/entire/cli/strategy/manual_commit_hooks.go:2636-2689)CondenseSessioncopiestasks/from the shadow branch exactly once, at initial checkpoint creation (writeTaskMetadataV2IfEnabled). During the rest of the same turn,SaveTaskStepcan still append new task metadata to the shadow branch. At stop time,HandleTurnEndonly calls , and that path now preserves whatever task files already exist but does not resync newly-added ones. Inference from the hook flow: if a user commits mid-turn and a subagent finishes afterward, v1 keeps the later task metadata on the shadow branch, but the v2 checkpoint never receives it. The likely impact is missing task rewind artifacts or incomplete restored session data for exactly the kind of partial-turn checkpoint this code is trying to support. Recommendation: At turn finalization, rescan the current shadow branch and splice any current tree into before or after , rather than only preserving existing files. Add a regression test where creates the checkpoint first, then runs, then finalizes.
- [high] Late task artifacts are never copied into v2 checkpoints after a mid-turn commit (
- User
Are subagent tasks actually used for rewind/restore?
Assistant· claude-opus-4-6
Good question — let me check how task metadata is actually consumed in rewind/restore paths.
Assistant· claude-opus-4-6
Now let me check what
GetTaskCheckpointactually reads from and whether it uses v2 at all.Assistant· claude-opus-4-6
The key finding: task rewind/restore reads from the shadow branch commit (via
point.ID), not from v2 storage.Here's the evidence:
-
Rewind()inmanual_commit_rewind.go:289— restores files from the shadow branch commit tree (plumbing.NewHash(point.ID)). It doesn't touch v2 at all. -
GetTaskCheckpoint()incommon.go:1228— readscheckpoint.jsonfrom the shadow branch commit tree (point.ID), not from v2 storage. -
GetTaskCheckpointTranscript()incommon.go:1271— same pattern, reads the transcript from the shadow branch tree.
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.