🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

Coding Sessions

by @luke-deltadesk

Run long-lived AI coding agents (Codex CLI, Claude Code, Ralph loops) in persistent tmux sessions with completion hooks and automatic monitoring. Use when la...

Versionv1.0.0
Installs2
πŸ’‘ Examples

Single Codex Task

tmux -S ~/.tmux/sock new -d -s  "cd  && \
  PATH=/opt/homebrew/bin:\$PATH codex exec --full-auto ''; \
  EXIT_CODE=\$?; echo 'EXITED:' \$EXIT_CODE; \
  openclaw system event --text ' finished (exit \$EXIT_CODE) in ' --mode now; \
  sleep 999999"

Ralph Loop (preferred for multi-step work)

tmux -S ~/.tmux/sock new -d -s  "cd  && \
  PATH=/opt/homebrew/bin:\$PATH ralphy --codex --prd PRD.md; \
  EXIT_CODE=\$?; echo 'EXITED:' \$EXIT_CODE; \
  openclaw system event --text 'Ralph loop  finished (exit \$EXIT_CODE) in ' --mode now; \
  sleep 999999"

Parallel Ralph Loops

tmux -S ~/.tmux/sock new -d -s  "cd  && \
  PATH=/opt/homebrew/bin:\$PATH ralphy --codex --parallel --prd PRD.md; \
  EXIT_CODE=\$?; echo 'EXITED:' \$EXIT_CODE; \
  openclaw system event --text 'Ralph parallel  finished (exit \$EXIT_CODE)' --mode now; \
  sleep 999999"

πŸ“‹ Tips & Best Practices

  • "Failed to refresh token" in ~/.codex/log/codex-tui.log β†’ run codex auth login
  • Agent reads files and exits β†’ wrap in Ralph loop (auto-retry solves this)
  • API rate limits (429s) with parallel agents β†’ reduce parallelism or stagger starts
  • Session died β†’ restart with same command from daily notes
  • View on ClawHub
    TERMINAL
    clawhub install coding-sessions

    πŸ§ͺ Use this skill with your agent

    Most visitors already have an agent. Pick your environment, install or copy the workflow, then run the smoke-test prompt above.

    πŸ” Can't find the right skill?

    Search 60,000+ AI agent skills β€” free, no login needed.

    Search Skills β†’