session-management
npx machina-cli add skill a5c-ai/babysitter/session-management --openclawSession Management
Overview
Manage agent sessions in Gas Town: initialize new sessions, handle handoffs between agents, revive dead sessions (seance), and maintain persistent identity across ephemeral Polecat sessions.
When to Use
- Initializing new agent sessions
- Handing off work between agents
- Reviving a dead or stuck agent session
- Managing Polecat identity persistence across sessions
Session Operations
- Init: Start new session with role and hook setup
- Attach: Connect agent to Mayor for coordination
- Handoff: Transfer work between agents with context
- Seance: Revive a dead agent's session state
- Resume: Continue from last checkpoint
Agent Session Types
- Crew: Long-lived sessions, full state persistence
- Polecat: Ephemeral sessions, persistent identity, state via hooks
- Dog: Infrastructure sessions, minimal state
Key Commands
gt mayor attach- Attach to Mayor coordinationgt handoff- Hand off work to another agentgt seance- Revive dead sessiongt prime- Prime agent with context
Tool Use
Used within agent coordination and patrol monitoring processes.
Source
git clone https://github.com/a5c-ai/babysitter/blob/main/plugins/babysitter/skills/babysit/process/methodologies/gastown/skills/session-management/SKILL.mdView on GitHub Overview
Gas Town's session-management skill handles the full lifecycle of agent sessions: initialization, handoffs, revival (seance), and persistent identity. It supports long-lived Crew sessions, ephemeral Polecat identities with hooks, and lightweight Dog infrastructure sessions.
How This Skill Works
Sessions are created with Init, attached to the Mayor for coordination via gt mayor attach, and handed off between agents with context using gt handoff. Polecats maintain persistent identity across ephemeral sessions through hooks, while Crew sessions preserve state, and Dog sessions provide minimal infrastructure. Key commands like gt prime, gt seance, and gt resume govern lifecycle transitions from start to resume.
When to Use It
- Initializing new agent sessions
- Handoff work between agents
- Reviving a dead or stuck agent session
- Managing Polecat identity persistence across sessions
- Attaching to Mayor for coordination
Quick Start
- Step 1: Init a new session with role and hook setup
- Step 2: Attach to Mayor for coordination (gt mayor attach) and prime with context (gt prime)
- Step 3: When needed, hand off work (gt handoff) or revive with gt seance followed by gt resume
Best Practices
- Define clear roles for Crew (long-lived) vs Polecat (ephemeral with identity) vs Dog (infrastructure) to guide session behavior
- Use persistent hooks on Polecats to maintain identity across ephemeral sessions
- Prime agents with context before handoffs using gt prime to reduce context-switch cost
- Leverage gt seance to revive dead sessions and then gt resume to continue work
- Attach to Mayor (gt mayor attach) when coordination and supervision are required
Example Use Cases
- Initializing a long-running Crew session to coordinate a patrol routine with full state persistence
- Handing off a task from one Polecat to another while preserving identity through hooks
- Reviving a stuck session using gt seance and then resuming with gt resume
- Maintaining Polecat identity across multiple ephemeral sessions via persistent hooks
- Attaching an agent to the Mayor for centralized coordination using gt mayor attach