SuperAPI AI Directory

session

General & other

View repository

Updated 10-16 03:42

About this skill

Session Skill (Unified)

Consolidates all session-related functionality into one skill.

Usage

/session              # Show available options
/session list         # Show active sessions
/session inbox        # Check incoming messages
/session broadcast "message"  # Send message to all sessions

Subcommands

/session list - List Active Sessions

Shows all active Claude Code sessions in the current project.

📋 Active Sessions

| Session ID | Status | Last Activity |
|------------|--------|---------------|
| abc123     | active | 2 min ago     |
| def456     | idle   | 15 min ago    |

/session inbox - Check Inbox

Checks for incoming messages from other sessions.

📬 Session Inbox

| From | Time | Message |
|------|------|---------|
| abc123 | 5m ago | "Ready for review" |
| def456 | 10m ago | "API implementation done" |

/session broadcast "message" - Broadcast Message

Sends a message to all active sessions.

/session broadcast "Review complete, ready for merge"

Capabilities

Feature Description Reference
Initialization Start new session, load context See ../session-init/SKILL.md
Memory Persist learnings across sessions See ../session-memory/SKILL.md
State Control Resume/fork session based on flags See references/session-control.md
Communication Cross-session messaging See ../session-state/SKILL.md

Memory optimization (CC 2.1.49+)

In Claude Code 2.1.49 and later, memory usage when resuming a session is reduced by 68% was done.

Best practices for long session management

Workload Recommended strategy
Normal implementation every 1-2 hours with --resume resume
Large-scale refactoring Split sessions by feature unit → in each session --resume
Parallel tasks /work all run in parallel, and if it takes a long time, midway --resume
On memory warning immediately --resume resume (faster than before)

Automatic session name generation (CC 2.1.41+)

/rename Running without arguments automatically generates a session name from the conversation context. For long sessions or --resume it makes sessions easier to identify in workflows that use a lot of it.

Efficient workflow example

# 実装フェーズ1
claude "認証機能を実装"
# → 1時間後

# セッション再開(メモリ効率的)
claude --resume "パスワードリセット機能を追加"
# → 1時間後

# さらに再開
claude --resume "テストを追加"

Memory management recommendations

Recommendation Reason
Aggressive session resumption 68% memory reduction makes resumption cost low
Regular resumption Organize context and maintain focus
Feature-unit splitting Divide large tasks into smaller ones and resume
Utilize Plans.md Smooth handover when resuming

💡 Since memory efficiency has improved significantly, actively utilize session resumption.

Codex 0.123.0 session shell / terminal fixes

In Codex 0.123.0, stale proxy env is less likely to be restored from the shell snapshot, and VS Code WSL terminal Unicode / dead-key input and keyboard input are also fixed on the main body side. Harness does not add a proxy snapshot scrubber or key input wrapper, and automatically inherits the main body fixes.


When to Use

  • Session initialization (/harness-init)
  • Session resume/fork (/work --resume, /work --fork)
  • Memory persistence (automatic)
  • Cross-session communication (/session broadcast)

Execution Flow

1. Session Initialization

/harness-init
    ↓
├── Load project context
├── Initialize session.json
├── Load previous session memory (if exists)
└── Display session status

2. Session Control (from /work)

/work --resume
    ↓
├── Check session.json exists
├── Load session state
└── Continue from last checkpoint

/work --fork
    ↓
├── Create new session branch
├── Copy relevant context
└── Start fresh with context

3. Memory Persistence

Session end
    ↓
├── Extract learnings (gotchas, patterns)
├── Update .claude/memory/*.md
└── Prepare handoff summary

4. Cross-Session Communication

/session broadcast "message"
    ↓
├── Find active sessions
├── Write to session.events.jsonl
└── Notify all sessions

Files Managed

File Purpose
.claude/state/session.json Current session state
.claude/state/session.events.jsonl Event log for cross-session communication
.claude/memory/*.md Persistent memory files

Migration Note

This skill consolidates:

  • session-init → Session initialization
  • session-memory → Memory persistence
  • session-control → Resume/fork control
  • session-state → State management & communication

The individual skills are deprecated but still work for backward compatibility.