Skip to content
Back to skills

Autonomous Session Manager

ASecurity

Session lifecycle management for autonomous coding. Use when starting new coding sessions, resuming work, detecting session type (init vs continue), or managing auto-continuation between sessions.

  • 3 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added February 8, 2026
toolspythongosecuritydocumentation

Works with

  • cli

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned February 12, 2026

npx -y skills add adaptationio/Skrillz --skill autonomous-session-manager --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Autonomous Session Manager?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Autonomous Session Manager
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/adaptationio-autonomous-session-manager/badge)](https://www.skillsdirectory.com/skills/adaptationio-autonomous-session-manager)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: autonomous-session-manager
description: Session lifecycle management for autonomous coding. Use when starting new coding sessions, resuming work, detecting session type (init vs continue), or managing auto-continuation between sessions.
version: 1.0.0
category: autonomous-coding
layer: foundation
---

# Autonomous Session Manager

Manages session lifecycle for autonomous coding operations - creation, resumption, detection, and auto-continuation.

## Quick Start

### Detect Session Type
```python
from scripts.session_detector import detect_session_type, SessionType

session_type = detect_session_type(project_dir)
if session_type == SessionType.INIT:
    # First run - need to initialize
    pass
else:
    # Continuation - resume previous work
    pass
```

### Create New Session
```python
from scripts.session_manager import SessionManager

async with SessionManager(project_dir, model="claude-sonnet-4-5-20250929") as session:
    result = await session.run(prompt)
```

### Auto-Continue After Session
```python
from scripts.auto_continue import auto_continue

# Automatically start next session after 3 second delay
await auto_continue(delay_seconds=3)
```

## Session Workflow

```
┌─────────────────────────────────────────────────────────────┐
│                    SESSION LIFECYCLE                         │
├─────────────────────────────────────────────────────────────┤
│                                                              │
│  1. DETECT SESSION TYPE                                      │
│     ├─ Check for feature_list.json                          │
│     ├─ If missing → INIT session                            │
│     └─ If exists → CONTINUE session                         │
│                                                              │
│  2. CREATE SESSION                                           │
│     ├─ Initialize SDK client                                │
│     ├─ Configure tools and permissions                      │
│     └─ Set working directory                                │
│                                                              │
│  3. RUN SESSION                                              │
│     ├─ Execute prompt (initializer or coding)               │
│     ├─ Handle tool calls                                    │
│     └─ Capture results                                      │
│                                                              │
│  4. END SESSION                                              │
│     ├─ Save state                                           │
│     ├─ Check completion status                              │
│     └─ Trigger auto-continue or shutdown                    │
│                                                              │
└─────────────────────────────────────────────────────────────┘
```

## Key Features

| Feature | Description |
|---------|-------------|
| **Session Detection** | Automatically determines if INIT or CONTINUE |
| **State Restoration** | Reads progress files at session start |
| **Auto-Continue** | Configurable delay between sessions |
| **Graceful Shutdown** | Saves state before termination |
| **Iteration Tracking** | Counts sessions for limits |

## Configuration

```python
# Session configuration
SESSION_CONFIG = {
    "model": "claude-sonnet-4-5-20250929",
    "max_turns": 1000,
    "continue_delay": 3,  # seconds
    "max_iterations": None,  # None = unlimited
}
```

## Integration Points

- **context-state-tracker**: Provides state persistence
- **security-sandbox**: Provides command validation
- **autonomous-loop**: Uses session manager for continuous operation

## References

- `references/SESSION-LIFECYCLE.md` - Detailed lifecycle documentation
- `references/CONFIGURATION.md` - Configuration options

## Scripts

- `scripts/session_manager.py` - Core SessionManager class
- `scripts/session_detector.py` - Session type detection
- `scripts/auto_continue.py` - Auto-continuation logic

Files in this skill

  • SKILL.md4.4 KB
  • references/CONFIGURATION.md2.7 KB
  • references/SESSION-LIFECYCLE.md2.3 KB
  • scripts/auto_continue.py5.7 KB
  • scripts/session_detector.py4.4 KB
  • scripts/session_manager.py7.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.