# 2026-02-07

## Gateway Stability Work
- Root cause of gateway freezes: event loop saturation from 64 concurrent sessions on single-threaded Node.js
- Reduced concurrency from 64/128 to 8/16 (`maxConcurrent`/`subagents.maxConcurrent`)
- Reduced heartbeat interval from 1h to 30m
- Removed keep-alive-wake cron job (can't self-heal a hung gateway)
- Created systemd watchdog timer (`openclaw-watchdog.timer`) — curls health endpoint every 5min, auto-restarts on failure
- Enabled SSH keepalives: `ClientAliveInterval 60` in sshd_config
- **TODO:** Reset concurrency to defaults (remove explicit overrides) — `subagents.maxConcurrent` default is 8, main default TBD

## Agency Dashboard Enhancements
- Added live CPU/Memory/Storage stats to `/agents` page
- API: `/api/system/stats/route.ts`, refreshes every 5s, color-coded bars
- Committed & pushed

## OpenClaw Memory Config
- Added OpenAI key to auth profiles for memory embeddings (`text-embedding-3-small`, 1536 dims)
- 5 files, 23 chunks indexed

## Agency App Starter Updates
- Enforced Opus 4.5 model in `.claude/settings.json` and `CLAUDE.md`
- Pushed to `symphco/agency-app-starter` (commit `7e1deff`)

## Site Recovery
- Agency site went 502 from corrupted `.next` dir (OOM-killed build)
- Rebuilt and restored; also restarted dashboard on port 3001

## Pending
- Reset concurrency to defaults
- Stop unused PM2 dev apps (gala-grid, garagepro, finance-operating-system, etc.)
- Trim HEARTBEAT.md from 30,625 chars to under 20,000
- Consider `NODE_OPTIONS=--max-old-space-size=4096` on gateway systemd service
- Consider updating OpenClaw from 2026.1.30 to 2026.2.6-3
- Security audit items: open groupPolicy, unrestricted slash commands, group-writable state dir
