Codex-print-stall-salvage

Recover delegated Codex print-mode runs that stall silently or produce partial edits in large worktrees.

5 stars

Best use case

Codex-print-stall-salvage is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Recover delegated Codex print-mode runs that stall silently or produce partial edits in large worktrees.

Teams using Codex-print-stall-salvage 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/claude-print-stall-salvage/SKILL.md --create-dirs "https://raw.githubusercontent.com/vamseeachanta/workspace-hub/main/.agents/skills/autonomous-ai-agents/claude-print-stall-salvage/SKILL.md"

Manual Installation

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

How Codex-print-stall-salvage Compares

Feature / AgentCodex-print-stall-salvageStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Recover delegated Codex print-mode runs that stall silently or produce partial edits in large worktrees.

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

# Codex Print-Mode Stall Salvage

Use when a delegated `Codex -p` implementation run is launched in a worktree and appears to hang with little/no stdout, an empty tee log, or long-running internal shell scans.

## Trigger signs

- `Codex -p ... | tee <log>` has an empty or near-empty log for several minutes.
- The process is still running, but the log is not growing.
- `ps` shows Codex or a child process running a broad command such as `rg`, `git status`, or repo-wide scans.
- `git status --short -- <owned paths>` shows useful partial edits despite no final Codex summary.
- The delegated run has exceeded the expected wall-clock budget for a bounded issue.

## Recovery workflow

1. Inspect state before killing:
   - `find tmp/Codex-logs -type f -printf '%f %s bytes\n'`
   - `ps -ef | grep '<worktree-or-prompt-id>' | grep -v grep`
   - `git status --short -- <owned paths>`

2. If useful partial edits exist and stdout is still stalled, stop the delegated run:
   - kill the tracked Hermes background process if available, or kill the exact Codex subprocess/process group.
   - If Codex is stalled inside a child command such as `git push`, inspect `ps -eo pid,ppid,pgid,stat,comm,args` first and terminate exact PIDs/negative PGIDs; avoid `pkill -f` patterns that can match the invoking shell and kill the recovery command itself.
   - preserve in-scope edits; do not reset the worktree blindly.

3. Verify path contract immediately:
   - `git status --short`
   - confirm only approved/owned paths changed.
   - remove or revert runtime artifacts/logs unless they are explicitly in scope.

4. Finish centrally if the remaining work is small:
   - inspect the partial diff.
   - complete only the approved scope.
   - run the exact targeted validator from the approved plan.

5. Run independent review before landing:
   - include that Codex produced partial work but stalled.
   - ask reviewer to check scope, acceptance coverage, and path-contract compliance.

6. In closeout, be transparent:
   - execution mode was delegated/hybrid.
   - Codex produced initial partial work but stalled.
   - orchestrator completed recovery, verification, commit/push, and closeout.

## Important details

- Do not judge a `Codex -p` run by stdout alone. Verify with git/file state.
- Do not let a stalled delegated process monopolize the worktree indefinitely.
- Prefer preserving good partial edits over restarting from scratch when the path contract is clean.
- If a repo-wide Python test or scan is slow because it walks ignored/untracked/generated files, prefer tracked-file approaches such as `git ls-files` or `git grep` in tests and validators.

## Example checks

```bash
find tmp/Codex-logs -type f -maxdepth 1 -printf '%f %s bytes\n' | sort
ps -ef | grep '/mnt/local-analysis/worktrees/ws-2311-exec' | grep -v grep
git status --short -- tests/docs/test_stage_transition_reference_confinement.py tests/helpers/stale_reference_docs.py
```

## Closeout wording pattern

```text
Execution mode: delegated/hybrid. Codex was launched in isolated worktree <path> and produced the initial targeted helper/test work. The non-interactive run stalled with no useful stdout, so the orchestrator stopped it, preserved in-scope partial edits, completed the minimal remaining changes, ran validation/review, committed, pushed, and closed.
```

Related Skills

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.

extract-skills-from-Codex-sessions

5
from vamseeachanta/workspace-hub

Automatically extract reusable skills from Codex session transcripts using LLM analysis and wire them into a Stop hook

interactive-Codex-to-file-based-fallback

5
from vamseeachanta/workspace-hub

Switch from tmux/interactive Codex to file-based Codex -p execution when interactive runs fail with upstream errors or analysis-only stalls, then verify landing from git/GitHub state.

exclude-wiki-Codex-md-from-harness-line-limit-hook

5
from vamseeachanta/workspace-hub

Fix false-positive pre-commit failures where workspace-hub's AGENTS.md line-limit hook blocks edits to auto-generated wiki schema files under knowledge/wikis/.

overnight-worktree-Codex-noop-recovery

5
from vamseeachanta/workspace-hub

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

overnight-planning-noop-run-salvage

5
from vamseeachanta/workspace-hub

Recover when unattended overnight Codex planning runs exit 0 but produce no required artifacts; salvage the wave by auditing existing plan state, generating missing summary artifacts manually, and preserving morning monitoring surfaces.

codex-skill-loader-broken-symlink-recovery

5
from vamseeachanta/workspace-hub

Diagnose Codex startup failures in workspace-hub caused by a broken `.Codex/skills/skills` symlink and recover without misattributing the failure to issue scope.

Codex-quota-failover-to-codex-for-overnight-plan-lanes

5
from vamseeachanta/workspace-hub

Recover an overnight multi-worktree planning wave when some Codex lanes hit quota by relaunching only the failed lanes with Codex in the same isolated worktrees and prompt files.

background-Codex-worktree-absolute-path-launch

5
from vamseeachanta/workspace-hub

Prevent overnight/background Codex worker launch failures in git worktrees by using absolute prompt/log paths and immediate post-launch polling.

orcaflex-installation-analysis

5
from vamseeachanta/workspace-hub

Create and analyze OrcaFlex models for offshore installation sequences including subsea structure lowering, pipeline installation, and crane operations. Generate models at multiple water depths and orientations for installation feasibility studies.

Codex-design

5
from vamseeachanta/workspace-hub

Design one-off HTML artifacts (landing, deck, prototype).

Codex-worker-patch-loop

5
from vamseeachanta/workspace-hub

Use Codex as a delegated worker to patch canonical skills or policy files directly, then verify and iterate from the main session.