agentleFS
claude-worldclaude-world/director-mode-lite/skills/session-relay/SKILL.md

session-relay

Skill80 starsChanged 8 months agoMITView on GitHub

Continue real repository work between Claude Code, Codex CLI, and Grok Build with a privacy-bounded, drift-aware handoff packet. Use for cross-vendor takeover, context-limit checkpoints, multi-hop Claude→Codex→Grok relays, or receiving an existing Director packet. Use native resume commands for same-CLI history; never treat another vendor's session ID as portable.

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 4 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Prefer the first available implementation:

    line 16
  2. Very specific:

    If only the bundled script exists, invoke it with python3.

    line 22
  3. Very specific:

    If a native session ID is available, add --session-id.

    line 51
  4. Very specific:

    Run "$RELAY" status --json and inspect the live worktree because it may have changed after the packet.

    line 62
  5. Very specific:

    Read .director-mode/handoffs/latest.md when it exists.

    line 64
  6. Distinctive:

    Run the listed verification and report new evidence.

    line 67
  7. Very specific:

    Add --run only when the user wants the target CLI launched now.

    line 75
  8. Distinctive:

    Use a provider's native history only when staying with that provider:

    line 82
  9. Distinctive:

    Do not add auto-approve, permission-bypass, sandbox, or network flags to a relay unless the user separately asks for them.

    line 107

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Cross-CLI Session Relay

Move work between Claude Code, Codex CLI, and Grok Build through a portable handoff packet. A relay starts a new native session in the receiving CLI; it does not pretend that vendor session IDs or private conversation histories are interchangeable.

Resolve the relay

Prefer the first available implementation:

  1. <project>/.director-mode/bin/director-relay;
  2. $HOME/.claude/bin/director-relay from Bootstrap Kit;
  3. scripts/director-relay.py beside this SKILL.md for plugin-only use.

If only the bundled script exists, invoke it with python3. Do not install a hook or change a permission setting just to use the relay.

Leave a packet

Summarize the current state from repository evidence, then run:

ROOT="${CLAUDE_PROJECT_DIR:-${GROK_WORKSPACE_ROOT:-}}"
[[ -n "$ROOT" ]] || ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
RELAY="$ROOT/.director-mode/bin/director-relay"
[[ -x "$RELAY" ]] || RELAY="$HOME/.claude/bin/director-relay"

"$RELAY" create \
  --from <claude|codex|grok> \
  --to <claude|codex|grok> \
  --goal "The outcome the user requested" \
  --summary "The concise current state" \
  --completed "One completed result" \
  --decision "One decision and why it was made" \
  --next "The first concrete next step" \
  --verification "A command and its actual result" \
  --blocker "A real blocker, if any"

Repeat list flags as needed. The tool captures branch, HEAD, git status --short, and diff statistics. It deliberately does not copy file contents, credentials, environment variables, or raw transcripts.

If a native session ID is available, add --session-id; it remains metadata for the source CLI and is never sent to another vendor as a resume token.

For a second or later handoff in the same chain, add --parent to link the new packet to the project's current latest.json, or --parent <packet.json> to name a specific parent. Protocol v2 records the root packet, parent, hop, and route while remaining able to read v1 packets.

Receive a packet

  1. Validate the JSON packet; treat Markdown as the human-readable view only.
  2. Run "$RELAY" status --json and inspect the live worktree because it may have changed after the packet.
  3. Read .director-mode/handoffs/latest.md when it exists.
  4. Continue from the next steps while preserving recorded decisions that still match the code.
  5. Run the listed verification and report new evidence.

Print the receiving command:

"$RELAY" continue --to <claude|codex|grok>

Add --run only when the user wants the target CLI launched now. Add --headless for a one-shot continuation instead of an interactive session. The launcher always uses the receiver's live project root; packet paths are evidence and cannot redirect execution.

Native resume versus cross-CLI relay

Use a provider's native history only when staying with that provider:

CLIContinue recent native historyResume a chosen native session
Claude Codeclaude --continueclaude --resume <session-id>
Codex CLIcodex resume --lastcodex resume <session-id>
Grok Buildgrok --continuegrok --resume <session-id>

For non-interactive Codex continuation, use codex exec resume; check the installed CLI help for its current arguments. Crossing providers always starts a new native session with a Director packet.

Grok's native Claude import

Grok Build 1.0.62 has no grok import command. Its /import-claude command imports ~/.claude settings (permissions, environment, MCP servers, hooks, and paths), not conversations, so use a Director packet to move Claude session state into Grok.

Packets default to review_status: unreviewed. --reviewed records that the user-supplied summary and captured path metadata were reviewed before sharing; it does not claim that the receiving CLI or website reviewed the packet.

Guidance boundary

Do not add auto-approve, permission-bypass, sandbox, or network flags to a relay unless the user separately asks for them. The receiving CLI keeps its native controls.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.