Install
$ agentstack add skill-adam-bull-codex-thread-toolkit-thread-workspace-relink ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
Thread Workspace Relink
Use this skill to migrate Codex thread workspace paths from old_path to new_path safely and repeatably.
Workflow
- Confirm target and scope
- Collect
old_pathandnew_path. - Decide scope:
allaffected threads or selectedthread_ids.
- Run dry-run first
- Use script in
scripts/relink_thread_workspaces.pywith--mode dry-run. - Review affected counts and files before writing.
- Apply with backup
- Run with
--mode apply. - Script creates timestamped backup under
~/.codex/path_rename_backup_*. - Script updates:
- Session JSONL
cwdfields (sessions/,archived_sessions/) - State DB
threads.cwdin~/.codex/state_*.sqlite
- Verify
- Confirm old count is
0for migrated scope. - Spot-check requested thread IDs.
- If no compatible DB is discovered, run
--diagnoseand inspectdb_search_roots,db_candidates, andcompatible_dbs.
- Refresh UI
- Quit/reopen Codex after apply so sidebar grouping refreshes.
Commands
Dry-run all:
python3 scripts/relink_thread_workspaces.py \
--old "/old/path" \
--new "/new/path" \
--mode dry-run \
--scope all
Apply all:
python3 scripts/relink_thread_workspaces.py \
--old "/old/path" \
--new "/new/path" \
--mode apply \
--scope all
Dry-run selected thread IDs:
python3 scripts/relink_thread_workspaces.py \
--old "/old/path" \
--new "/new/path" \
--mode dry-run \
--scope ids \
--ids "id1,id2,id3"
Apply selected thread IDs:
python3 scripts/relink_thread_workspaces.py \
--old "/old/path" \
--new "/new/path" \
--mode apply \
--scope ids \
--ids "id1,id2,id3"
Diagnose DB discovery:
python3 scripts/relink_thread_workspaces.py \
--old "/old/path" \
--new "/new/path" \
--mode dry-run \
--scope all \
--diagnose
Deep diagnostics (recommended for issue triage):
python3 scripts/relink_thread_workspaces.py \
--old "/old/path" \
--new "/new/path" \
--mode dry-run \
--scope all \
--diagnose-deep
Guardrails
- Do not bulk-rewrite arbitrary text/history; only structured
cwdsurfaces. - Always run
dry-runbeforeapply. - Always create backup before writes.
- Keep rollout reversible via backup restore.
- If JSONL matches exist but no compatible DB is found,
applyexits with an error by default. - Use
--db-path "/path/to/state_x.sqlite"to include explicit DB files when discovery misses your active state DB. - Use
--allow-jsonl-onlyonly when JSONL-only migration is intentional.
Compatibility Note
- This skill targets current Codex local state surfaces (
sessions/*.jsonl,archived_sessions/*.jsonl,state_*.sqlitewiththreads.cwd). - Codex versions can change storage/schema details over time.
- Always run
dry-runfirst and review counts beforeapply. - If expected tables/fields are missing, stop and inspect local state layout before writing.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: Adam-Bull
- Source: Adam-Bull/Codex-thread-toolkit
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.