Install
openclaw skills install persistent-code-terminalPersistent per-project coding terminal (tmux). Run Codex CLI (codex exec) inside a stable session; mobile/SSH friendly.
openclaw skills install persistent-code-terminalA persistent coding terminal for OpenClaw. It creates a tmux session per project:
<project-name>-code-session
This makes terminal-first AI coding (Codex CLI / Claude Code / any CLI tool) reliable and mobile/SSH friendly:
When user intent is "use natural language to drive Codex CLI in this repo", route through this skill first.
Intelligent auto-trigger:
openclaw.config.dev.autoCodeRouting (default false).{baseDir}/bin/persistent-code-terminal-route.sh "<user message>"不要执行,只分析)persistent-code-terminal-auto.sh --max-retries 3 --instruction "<message>"persistent-code-terminal-summary.sh --lines 120tmux/codex) with doctor guidance.Multi-project routing:
; / ;给 <project> 项目 <instruction>给<project>项目:<instruction>为 <project> 修复/增加/修改 ...<project> 项目 ...;<project> 项目 ...start.sh --project <project>auto.sh --max-retries 3 --instruction "<instruction>"summary.sh --lines 120 --jsonTrigger shortcuts (recommended):
codex , treat the remaining text as instruction.{baseDir}/bin/persistent-code-terminal-codex-exec.sh "<remaining text>"{baseDir}/bin/persistent-code-terminal-status.sh{baseDir}/bin/persistent-code-terminal-summary.sh --lines 120Preferred execution pattern in chat-driven runs:
start.sh (or implicit auto-create from send.sh)codex-exec.sh "<instruction>" for Codex-driven workstatus.sh / summary.sh for concise progress reportingIf user says "检查项目/继续会话/跑测试并总结", use this skill scripts instead of asking user to type long shell commands.
start → send → read → decide
{baseDir}/bin/persistent-code-terminal-start.sh{baseDir}/bin/persistent-code-terminal-send.sh "<command>"
__PCT_EXIT_CODE__N--timeout <seconds>, --dry-run, --phase <name>{baseDir}/bin/persistent-code-terminal-read.sh
.pct-state.json{baseDir}/bin/persistent-code-terminal-status.sh{baseDir}/bin/persistent-code-terminal-summary.sh --lines 120{baseDir}/bin/persistent-code-terminal-doctor.sh{baseDir}/bin/persistent-code-terminal-list.sh (list *-code-session){baseDir}/bin/persistent-code-terminal-switch.sh --project <name>State file:
.pct-state.json (current project directory)projectDir, session, lastCommand, lastExitCode, phase, updatedAtStructured output:
{baseDir}/bin/persistent-code-terminal-read.sh --json{baseDir}/bin/persistent-code-terminal-summary.sh --json{baseDir}/bin/persistent-code-terminal-auto.sh --jsonIf Codex CLI is installed as codex, prefer:
{baseDir}/bin/persistent-code-terminal-codex-exec.sh "<instruction>"codex exec --full-auto --sandbox workspace-write --cd <current-dir> "<instruction>"{baseDir}/bin/persistent-code-terminal-codex-exec.sh --json -o /tmp/codex.json "<instruction>"PCT_CODEX_NO_DEFAULT_FLAGS=1 to disable default flags.Example:
{baseDir}/bin/persistent-code-terminal-codex-exec.sh "Implement feature X. Ensure build and tests pass. Commit and push to current branch. Do NOT force push."git push --force unless user explicitly requests.git push), follow active Codex approval/sandbox policy.