overnight-worktree-Codex-noop-recovery

Recover overnight Codex worktree batches that appear to succeed but produce no artifacts; harden rerun prompts and launch commands.

5 stars

Best use case

overnight-worktree-Codex-noop-recovery is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Recover overnight Codex worktree batches that appear to succeed but produce no artifacts; harden rerun prompts and launch commands.

Teams using overnight-worktree-Codex-noop-recovery should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/overnight-worktree-claude-noop-recovery/SKILL.md --create-dirs "https://raw.githubusercontent.com/vamseeachanta/workspace-hub/main/.agents/skills/workspace-hub-learned/overnight-worktree-claude-noop-recovery/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/overnight-worktree-claude-noop-recovery/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How overnight-worktree-Codex-noop-recovery Compares

Feature / Agentovernight-worktree-Codex-noop-recoveryStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Recover overnight Codex worktree batches that appear to succeed but produce no artifacts; harden rerun prompts and launch commands.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Overnight worktree Codex no-op recovery

Use this when an unattended multi-worktree Codex batch is launched correctly, exits with code 0, but expected planning/report artifacts are missing.

## Trigger pattern

- Background `Codex -p` jobs in separate worktrees
- `process poll` shows `exit_code: 0`
- stdout/log output is empty or unhelpful
- expected result files under `docs/reports/` / `docs/plans/` / `scripts/review/results/` were not created

## What happened in the learned case

A 3-worktree overnight planning wave was launched safely from isolated worktrees. All three Codex runs exited successfully, but two produced no expected outputs and one only preserved pre-existing artifacts. The initial prompts were too easy for Codex to effectively no-op while still returning success. A first rerun also failed because the launcher used relative prompt-file paths that the shell did not resolve as expected.

## Recovery workflow

1. Verify the run really no-op'd
- Check the expected artifacts directly, not just process exit code.
- For each worktree, inspect:
  - required summary/report file
  - target `docs/plans/*issue*` files
  - target `scripts/review/results/*issue*` files
- If none exist, treat the run as failed even if Codex exited 0.

2. Keep the worktree isolation
- Do NOT rerun in the dirty main checkout.
- Reuse or create one worktree per terminal/lane.
- Preserve zero-overlap write boundaries.

3. Harden the prompt before rerunning
- Make the FIRST mandatory action the creation of a unique summary/result file.
- Require a STARTED section immediately.
- Require a COMPLETED or BLOCKED section before exit.
- State explicitly: do not exit without writing this file.
- Reduce ambition: even if deeper plan edits fail, the summary file must still be produced.

Example requirement block:
- `docs/reports/2026-04-23-terminal-N-...summary.md`
- MUST include STARTED timestamp
- MUST include issues in scope
- MUST include blockers
- MUST append COMPLETED/BLOCKED before exit

4. Use absolute prompt paths in the launcher
- Avoid `PROMPT=$(< docs/plans/.../prompt.md)` in reruns.
- Prefer:
  - `PROMPT=$(< /abs/path/to/prompt.md)`
- This removes cwd/path ambiguity in copied worktree setups.

5. Relaunch as background jobs
- Same `Codex -p --permission-mode acceptEdits --no-session-persistence ...`
- Keep one process per worktree.
- Poll after launch to ensure the shell found the prompt file.

6. Morning interpretation rule
- `exit 0 + no artifacts` = failed/no-op run
- `exit nonzero due to prompt path` = launcher failure
- only artifact existence counts as success

## Recommended launch pattern

```bash
wt=/mnt/local-analysis/worktrees/ws-tier1-knowledge-overnight-t2
prompt=$wt/docs/plans/overnight-prompts/2026-04-22-tier1-knowledge-beef-up/rerun-terminal-2-engineering-core-and-utilities.md
cd "$wt"
mkdir -p logs
PROMPT=$(< "$prompt")
Codex -p \
  --permission-mode acceptEdits \
  --no-session-persistence \
  --output-format text \
  --max-budget-usd 20 \
  "$PROMPT" </dev/null > logs/Codex-tier1-terminal-2-rerun.log 2>&1
```

## Checks to run after a suspicious success

```bash
python - <<'PY'
from pathlib import Path
root=Path('/path/to/worktree')
for pat in [
    'docs/reports/expected-summary.md',
    'docs/plans/*2461*',
    'scripts/review/results/*2461*',
]:
    print(pat, list(root.glob(pat)))
PY
```

## Key lesson

For unattended Codex planning batches, prompt design must force an observable artifact very early. Process exit codes and silent logs are not reliable proof of work completion.

Related Skills

digitalmodel-worktree-test-execution-with-shared-venv

5
from vamseeachanta/workspace-hub

Run digitalmodel tests from isolated worktrees without uv editable-dependency failures by using the main repo's existing virtualenv and PYTHONPATH.

blender-worktree-test-hardening

5
from vamseeachanta/workspace-hub

Recover and harden digitalmodel Blender automation work in isolated worktrees when uv/editable dependency paths break and local machines lack a Blender executable.

worktree-pre-push-bypass-for-tier1-checks

5
from vamseeachanta/workspace-hub

Handle workspace-hub integration-branch pushes from isolated git worktrees when the pre-push hook incorrectly assumes sibling tier-1 repos exist under the worktree path.

worktree-branch-sync-hygiene

5
from vamseeachanta/workspace-hub

Class-level branch, worktree, dirty-main, stash, sync, and hook hygiene for workspace-hub style multi-repo work.

workspace-hub-overnight-plan-monitor

5
from vamseeachanta/workspace-hub

Monitor and reconcile workspace-hub overnight planning or implementation batches, including process status, result artifacts, issue/commit verification, and controlled failed-lane recovery.

verify-Codex-run-commit-vs-working-tree-before-closing

5
from vamseeachanta/workspace-hub

After a Codex implementation run, verify the claimed file set against the actual commit and working tree before treating the issue as fully complete.

multi-repo-stale-lock-recovery

5
from vamseeachanta/workspace-hub

Diagnose and recover from stale git lock files in multi-repo workspaces, especially with submodules

multi-repo-pull-with-untracked-conflict-recovery

5
from vamseeachanta/workspace-hub

Diagnose and resolve multi-repo pull failures caused by untracked files conflicting with remote changes

multi-repo-git-recovery

5
from vamseeachanta/workspace-hub

Diagnose and recover from stale lock files, diverged branches, and untracked file conflicts across multiple repos in a workspace ecosystem

git-worktree-cleanup-at-scale

5
from vamseeachanta/workspace-hub

Identify and remove stale git worktrees blocking branch deletion in multi-repo environments

git-worktree-cleanup-and-branch-reconciliation

5
from vamseeachanta/workspace-hub

Systematic process for cleaning up stale git worktrees, resolving merge conflicts in diverged branches, and reconciling branch state across multiple repositories.

git-worktree-cleanup-and-branch-hygiene

5
from vamseeachanta/workspace-hub

Systematic approach to cleaning up stale git worktrees, orphan branches, and branch hygiene at scale across multiple repos