Low-Context Execution Packet
Use branch stage/d3-12-session-resilience-design.
Design only. Do not implement the reaper or mailbox in this stage.
docs/SESSION_RESILIENCE_MANIFEST.md must include:
- Async dispatch choice
- Mailbox storage choice
- SQLite schema or flat-file format
- Session state machine
- Reconnect handshake
- Duplicate-prevention rules
- Interactive prompt timeout
- Sub-agent TTL
- Memory/process limits
- Reaper audit interval
- D3-13 implementation checklist
Default values unless data argues otherwise:
interactive_prompt_timeout_seconds=300
background_task_default_ttl_seconds=1800
background_task_hard_ttl_seconds=3600
reaper_interval_seconds=60
mailbox_flush_batch_size=50
Preferred persistence:
- SQLite if D3-10 already uses Python and needs atomic ack/delete
- append-only JSONL only if SQLite is unavailable or overkill
- avoid Redis/RabbitMQ unless D3-10 already introduced it and measured acceptable overhead
Mailbox schema must include:
id,session_id,message_id,sender,body,created_ms,delivered_ms,delivery_attempts
The design must explicitly state what happens when the RG powers off mid-command and when it reconnects later.