How to Coordinate Role-Based CLI Seats & Session Handovers for AI Agents: A Governance MCP Server
说明与用途
多个 AI 代理在同一终端运行时可能导致竞争、会话失忆和破坏性命令。CliSeat 提供单写座位锁、可防篡改的交接日志和自动回收功能。
问题
Multiple AI agent sessions running in the same terminal can cause race conditions, session handover amnesia, and out-of-domain execution.
结果
Agents can safely coordinate repository mutations, preserve context across handovers, and prevent accidental destructive actions.
工作流
- 1. Agent claims a domain seat via CliSeat’s SeatManager.
- 2. If the seat is occupied, the claim is rejected with holder info.
- 3. Agent performs its tasks while holding the seat.
- 4. Upon completion or timeout, agent records a handover brief to HandoverLedger.
- 5. CliSeat logs the brief with a SHA‑256 hash in an SQLite WAL ledger.
- 6. Next agent claims the seat and reads the ledger for context.
证据
When another session attempts to mutate the repository while domain:cli is occupied, the claim is rejected immediately with the current holder's session ID and remaining lease time.
CliSeat persists every handover to an atomic SQLite WAL database sealed with a SHA-256 state hash.
- 记录日期: 2026-10-21T06:56:02.540Z