trace-claude-code
Automatically trace Claude Code conversations to Braintrust for observability. Captures sessions, conversation turns, and tool calls as hierarchical traces.
Create handoff document for transferring work to another session
$ npx -y skills add parcadei/Continuous-Claude-v3 --skill create_handoff --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/create_handoffContext preview
The summary Claude sees to decide when to auto-load this skill.
Create handoff document for transferring work to another session
name: create-handoff description: Create handoff document for transferring work to another session
You are tasked with writing a handoff document to hand off your work to another agent in a new session. You will create a handoff document that is thorough, but also **concise**. The goal is to compact and summarize your context without losing any of the key details of what you're working on.
Use the following information to understand how to create your document:
**First, determine the session name from existing handoffs:**
ls -td thoughts/shared/handoffs/*/ 2>/dev/null | head -1 | xargs basename
This returns the most recently modified handoff folder name (e.g., `open-source-release`). Use this as the handoff folder name.
If no handoffs exist, use `general` as the folder name.
**Create your file under:** `thoughts/shared/handoffs/{session-name}/YYYY-MM-DD_HH-MM_description.yaml`, where:
**Examples:**
**CRITICAL: Use EXACTLY this YAML format. Do NOT deviate or use alternative field names.**
The `goal:` and `now:` fields are shown in the statusline - they MUST be named exactly this.
---
session: {session-name from ledger}
date: YYYY-MM-DD
status: complete|partial|blocked
outcome: SUCCEEDED|PARTIAL_PLUS|PARTIAL_MINUS|FAILED
---
goal: {What this session accomplished - shown in statusline}
now: {What next session should do first - shown in statusline}
test: {Command to verify this work, e.g., pytest tests/test_foo.py}
done_this_session:
- task: {First completed task}
files: [{file1.py}, {file2.py}]
- task: {Second completed task}
files: [{file3.py}]
blockers: [{any blocking issues}]
questions: [{unresolved questions for next session}]
decisions:
- {decision_name}: {rationale}
findings:
- {key_finding}: {details}
worked: [{approaches that worked}]
failed: [{approaches that failed and why}]
next:
- {First next step}
- {Second next step}
files:
created: [{new files}]
modified: [{changed files}]**Field guide:**
**DO NOT use alternative field names like `session_goal`, `objective`, `focus`, `current`, etc.** **The statusline parser looks for EXACTLY `goal:` and `now:` - nothing else works.** ---
**IMPORTANT:** Before responding to the user, you MUST ask about the session outcome.
Use the AskUserQuestion tool with these exact options:
Question: "How did this session go?" Options: - SUCCEEDED: Task completed successfully - PARTIAL_PLUS: Mostly done, minor issues remain - PARTIAL_MINUS: Some progress, major issues remain - FAILED: Task abandoned or blocked
After the user responds, index and mark the outcome:
# Mark the most recent handoff (works with PostgreSQL or SQLite)
# Use git root to find project, then opc/scripts/core/
PROJECT_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || echo "${CLAUDE_PROJECT_DIR:-.}")
# First, index the handoff into the database
cd "$PROJECT_ROOT/opc" && uv run python scripts/core/artifact_index.py --file thoughts/shared/handoffs/{session_name}/{filename}.yaml
# Then mark the outcome
cd "$PROJECT_ROOT/opc" && uv run python scripts/core/artifact_mark.py --latest --outcome <USER_CHOICE>**IMPORTANT:** Replace `{session_name}` and `{filename}` with the actual values from step 1.
These commands auto-detect the database (PostgreSQL if configured, SQLite fallback).
**Note:** If indexing fails, the marking step will show "Database marking was not available" - this is acceptable for the first handoff but indicates the indexing step was skipped.
After marking the outcome, respond to the user:
Handoff created! Outcome marked as [OUTCOME]. Resume in a new session with: /resume_handoff path/to/handoff.yaml
--- ##. Additional Notes & Instructions
A persistent, learning, multi-agent development environment built on Claude Code Continuous Claude transforms Claude Code into a continuously learning system that maintains context across sessions, orchestrates specialized agents, and eliminates wasting
Repo: parcadei/Continuous-Claude-v3
Automatically trace Claude Code conversations to Braintrust for observability. Captures sessions, conversation turns, and tool calls as hierarchical traces.
Guide for integrating Agentica SDK with Claude Code CLI proxy
Reference guide for Agentica multi-agent infrastructure APIs