← 2.1.0 Test tested · runtime-test

context: fork — runtime test

Hands-on runtime battle-test of context: fork. Result: PASS.

context: fork runtime test confirms isolated skill execution with clean result return.

How it Works

The context: fork frontmatter directive in a skill SKILL.md file triggers execution of that skill in a forked sub-agent context. This isolation prevents skill execution from polluting the parent conversation history or context window. The forked context receives a fresh state; results are returned cleanly to the parent.

Test Setup and Execution

The test created a skill named test-fork with context: fork in its frontmatter. The skill's task was to confirm forked execution by reading a file at .claude/skills/test-hotreload/SKILL.md and returning a summary of its contents. This simple operation verified both isolation and filesystem access.

What the Test Found

The skill executed successfully in forked context. The output explicitly indicated "forked execution" and "fresh forked context as expected." The forked agent retained access to Read tools for the filesystem and successfully retrieved the target file's content, proving that tool capability isolation is not a side effect of context forking.

Use Cases and Mechanics

Context forking is useful for skills that require isolated context (preventing pollution of conversation history), long-running tasks that should execute independently, or verbose output that should be summarized before returning to the parent. The forked execution pattern preserves parent state entirely: context, variables, and history remain unchanged. Results are marshalled back as clean output, with the parent retaining explicit visibility of which execution occurred in a fork.

Primary source
⎘ 2.1.0/tests/02-context-fork/TEST-RESULTS.mdverbatim from the corpus

Test Results: Context Fork for Skills

Feature: Added support for running skills and slash commands in a forked sub-agent context using context: fork in skill frontmatter

Tested: 2026-01-07

Test Setup

Created .claude/skills/test-fork/SKILL.md:

---
name: test-fork
description: Test skill to verify context:fork runs in a forked sub-agent
context: fork
---

# Test Fork Context Skill

You are running in a forked sub-agent context.

1. Confirm you're in a forked context by noting you have fresh context
2. Read the file at `.claude/skills/test-hotreload/SKILL.md`
3. Return a summary: "Fork test complete - I read the test-hotreload skill which says: [first line of instructions]"

Test Results

Test 1: Invoke skill with context: fork

Result: PASS Output:

Skill "test-fork" completed (forked execution).

Result:
Fork test complete - I read the test-hotreload skill which says: `Say exactly: "Hot reload test v1 - skill created at runtime!"`

note: running in fresh forked context as expected.

Key Findings

  1. context: fork in frontmatter triggers forked execution
  2. The forked agent has access to file system tools (Read)
  3. Results are returned to the parent context cleanly
  4. Output clearly indicates "forked execution" in the result

Use Cases

  • Skills that need isolated context (won't pollute main conversation)
  • Long-running tasks that should run independently
  • Skills that might produce verbose output you want summarized

Status: PASS

Evidence & receipt
◇ ed25519 receipt
idtest_2efd00465ab8225720f0e554
alged25519
pubkey9b87705613b1e2fd064d57fa75a6b679d2856ceafad6b1daa8f982493871b6dd
siga7fa02a6bcad68766ab121591dc5ac30a973ab77c10b16b8a634a43d184c246a2fbe3cbf72b43a8edbe9f0e089b5ee5a0f19449d911531252b6222133e50de03

Signed with an ed25519 key held off the repo. Anyone can verify against the published public key; nobody without the secret key can forge it. Click verify: it recomputes the signature in your browser. The signature proves integrity and authorship of this exact content — not a third-party timestamp or that the underlying claim is objectively true. signedAt is when the @f3/attest pipeline ran, not when the work happened; the evidence refs carry the source dates.

Connected