2.8 KiB
2.8 KiB
description, argument-hint, allowed-tools
| description | argument-hint | allowed-tools |
|---|---|---|
| Receive context from parent or child session | <direction> [subject] [path] | Bash, Read |
receive - Receive context from parent or child session
Read and integrate context from a parent or child session handoff file.
Usage
/context:receive parent [subject] [path]
/context:receive child [subject] [path]
Both subject and path are optional:
- subject: Claude will infer from context if not provided
- path: Defaults to
/tmp/claude-ctx/if not provided
What it does
- Checks if
/tmp/claude-ctx/directory exists using test command - Creates directory only if it doesn't exist
- If creating directory, generates minimal README.md:
# Claude Context Handoff Directory This is an **ephemeral directory** for Claude Code session context handoff. Created by claude slash commands. '/context:send' and '/context:receive'. - Determines direction: parent-to-child or child-to-parent
- If subject provided, looks for
{path}/ctx-{direction}-{subject}.md - If no subject, uses wildcard:
{path}/ctx-{direction}-*.mdsorted by newest first - Path defaults to
/tmp/claude-ctx/but can be customized - Reads and displays context file
- Integrates context into current session understanding
Important: When using wildcard (no subject), files are sorted by modification time with newest first, ensuring you get the most recent context.
Example: Receiving from Parent (Wildcard)
/context:receive parent
✓ Searching for context files: /tmp/claude-ctx/ctx-parent-to-child-*.md (newest first)
✓ Found: /tmp/claude-ctx/ctx-parent-to-child-database-migration.md (modified 2 minutes ago)
[Context displayed with parent session details]
Ready to begin focused work based on parent's context!
Example: Receiving from Child with Subject
/context:receive child api-implementation
✓ Context received from child session
File: /tmp/claude-ctx/ctx-child-to-parent-api-implementation.md
[Context displayed with completed work summary]
Child session completed. Integrating results back.
Example: Custom Path
/context:receive parent database-work ~/Documents/context/
✓ Context received from parent session
File: ~/Documents/context/ctx-parent-to-child-database-work.md
[Context displayed]
What gets loaded
- Context file content: Decisions, work done, blockers, next actions
- Handoff metadata: Why the handoff occurred, what was planned
- Related context: Key information needed to continue
When to use
- Immediately after starting a new child session from parent
- After resuming parent session when child is complete
- When receiving context from any parent/child session
- To understand what happened in related session
Related commands
/context:send- Send context to parent/child before switching