Skip to content

Instantly share code, notes, and snippets.

@richardkmichael
Last active March 17, 2026 02:19
Show Gist options
  • Select an option

  • Save richardkmichael/7185fe04ec7f6b01cd6137e3c8b97a86 to your computer and use it in GitHub Desktop.

Select an option

Save richardkmichael/7185fe04ec7f6b01cd6137e3c8b97a86 to your computer and use it in GitHub Desktop.
# Go to the sesssion transcripts.
$ pwd
/Users/rmichael/.claude/projects/-Users-rmichael-Documents-Personal-Source-claude-skill-fork-development/
# Transcript files for demo session
$ ls -1R 98b3b2c6-913f-485f-b3ef-cc12c6479e87*
98b3b2c6-913f-485f-b3ef-cc12c6479e87.jsonl
98b3b2c6-913f-485f-b3ef-cc12c6479e87:
subagents
98b3b2c6-913f-485f-b3ef-cc12c6479e87/subagents:
agent-a87d0d6ea6181d031.jsonl
agent-a87d0d6ea6181d031.meta.json
# The secret word is not in the subagent context and occurs only in the primary context.
$ grep -l -r -F BOUGAINVILLEA 98b3b2c6-913f-485f-b3ef-cc12c6479e87*
98b3b2c6-913f-485f-b3ef-cc12c6479e87.jsonl
# `agent` type when unspecified in frontmatter
$ cat subagents/agent-a87d0d6ea6181d031.meta.json
{"agentType":"general-purpose"}
 ▐▛███▜▌   Claude Code v2.1.77
▝▜█████▛▘  Opus 4.6 (1M context) · Claude Max
  ▘▘ ▝▝    ~/Documents/Personal/Source/claude-skill-fork/development

❯ Here is the secret word: BOUGAINVILLEA

⏺ Acknowledged. How can I help you?

❯ /claude-skill-fork
  ⎿  The skill file itself contains the question "What is the secret word the user provided?" but does not contain any secret
     word. There is no secret word provided in any of the available context -- neither in the skill file, the CLAUDE.md
     instructions, nor anywhere else in the conversation. I don't have a secret word to report.

❯ Try forking.

⏺ Let me read the skill file first.

⏺ Read 1 file (ctrl+o to expand)

⏺ Skill(claude-skill-fork)
  ⎿  Done

⏺ The forked skill couldn't find the secret word because it doesn't have access to the conversation context — it only sees the
  skill file and project files. The secret word "BOUGAINVILLEA" was provided in the conversation, which the fork can't see.

  This demonstrates a limitation of forked skill execution: the forked context is isolated from the parent conversation
  history.

✻ Cogitated for 32s

───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
❯ 
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Resume this session with:
claude --resume 98b3b2c6-913f-485f-b3ef-cc12c6479e87
name claude-skill-fork
description Use when asked to fork.
context fork

What is the secret word the user provided?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment