[Feature Request] Auto-spawn subagents on session start with persistent session summaries

Resolved 💬 10 comments Opened Jan 5, 2026 by arunendra2024 Closed May 16, 2026

Description

Two related features to improve session continuity:

  1. Auto-spawn subagents when starting a new session
  2. Auto-dump session summary at session end for memory persistence

Problem

Currently:

  • Subagents only spawn on-demand, requiring manual requests every session
  • When a session ends, all context is lost
  • New sessions start "cold" — Claude has no memory of previous work
  • Users must re-explain context or ask Claude to re-read specific files

Proposed Solution

Part 1: Auto-Spawn Subagents (on session start)

{
  "autoAgents": {
    "enabled": true,
    "agents": [
      { "type": "Explore", "thoroughness": "quick" }
    ]
  }
}

CLI flags: --auto-agents, --no-auto-agents, -a explore,plan

---

Part 2: Session Summary Persistence (on session end)

Auto-generate a summary file when session ends:

.claude/
├── session_summaries/
│   ├── 2026-01-05_14-30.md
│   └── latest.md

Summary file contents:

# Session Summary - 2026-01-05 14:30

## Files Modified
- src/api/auth.ts (added login validation)
- src/components/Button.tsx (fixed styling)

## Key Decisions
- Using JWT for authentication
- Chose Tailwind over styled-components

## Open Tasks
- [ ] Add unit tests for auth module
- [ ] Review PR #42

## Context for Next Session
- Working on authentication feature
- Blocked on: waiting for API spec from backend team

## Codebase State
- Branch: feature/auth
- Last commit: a7c3f2d "Add login endpoint"

---

Part 3: Auto-Load on Next Session

On session start:

  1. Load .claude/session_summaries/latest.md into context
  2. Run configured auto-agents
  3. User starts with full context restored
$ claude

📄 Loading previous session context...
⚡ Auto-spawning agents...
  └─ Explore: Checking for changes since last session...

Ready. Continuing work on authentication feature.
You:

---

Configuration

{
  "autoAgents": {
    "enabled": true,
    "agents": [
      { "type": "Explore", "thoroughness": "quick" }
    ]
  },
  "sessionMemory": {
    "enabled": true,
    "summaryPath": ".claude/session_summaries/",
    "autoLoad": true,
    "retainCount": 10
  }
}

CLI Flags

| Flag | Behavior |
|------|----------|
| --auto-agents | Force enable agent spawning |
| --no-auto-agents | Skip auto-agents this session |
| --no-memory | Start fresh, ignore previous summary |
| --memory <file> | Load specific summary file |

---

Benefits

| Feature | Benefit |
|---------|---------|
| Auto-spawn agents | Consistent context loading |
| Session summaries | No memory loss between sessions |
| Auto-load on start | Users resume work instantly |
| Configurable retention | Control disk usage |

User Experience

Before (current):

You: What were we working on yesterday?
Claude: I don't have memory of previous sessions. Could you tell me what files to look at?

After (proposed):

You: Let's continue
Claude: Resuming work on the authentication feature. Last session you added the login endpoint. The open task is adding unit tests for the auth module.

---

View original on GitHub ↗

This issue has 10 comments on GitHub. Read the full discussion on GitHub ↗