| name | ghostex-move-codex-session |
| description | Explain how to fork an existing Codex CLI session into another folder by using `/status` to get the session id and `codex fork --yolo -C TARGET_FOLDER SESSION_ID`. Use when a user asks to move the current Codex session, change the Codex working directory, fork a Codex conversation into a different project folder, or continue a Codex thread under another workspace root as a separate session. |
ghostex-move-codex-session
Explain the supported Codex CLI workflow in simple numbered steps.
Steps
-
Ask the user to run this inside the current Codex session:
/status
-
Tell the user to copy the session id shown by /status.
-
Tell the user to open a shell and fork that session in the target folder:
codex fork --yolo -C ~/dev/hackathon <SESSION_ID>
Replace ~/dev/hackathon with the requested folder when the user gave a different target.
Tell the user that --yolo is the Codex alias for bypassing approvals and sandboxing. If they do not want full access, remove --yolo.
Fallback
If the user does not want to copy the id, suggest the recent-session fallback:
codex fork --all --last --yolo -C ~/dev/hackathon
Explain that --all matters because Codex normally filters fork candidates by the current working directory.
Rules
- Keep the answer short and procedural.
- Prefer
codex fork --yolo -C <folder-path> <SESSION_ID> as the primary command.
- Mention that this creates a separate forked Codex session under the new working root.
- Mention that users can remove
--yolo if they do not want full-access mode.
- Do not claim the active running TUI can be moved in place unless current Codex docs expose a real command for that.
- If the user asks for the exact command only, give only the command and one sentence.