# CC Local Sessions

## Recent Sessions

### 2026-02-03 13:00-14:00
**Tasks:** Set up CC Local memory system
- Created `.cc-local/cc-local-curator.sh` - daily health checker
- Set up Windows Task Scheduler (6am daily)
- Created `.sessions/` folder with per-agent files
- Fixed curator to use `--autostash` for git pull
- All system tests passing
**Outcome:** CC Local infrastructure complete

### 2026-02-03 ~15:00-15:55 UTC
**Tasks:** Supabase finalization, VPS cleanup, secret scrub
- Deployed Supabase credentials to VPS (config.env + .env)
- Verified job_locks table CRUD via REST API with service role key
- Patched cc-poll to source config.env (CC VPS now has Supabase + Notion access)
- Executed VPS cleanup: deleted /root/clawd/, /home/ccuser/.clawdbot/, .memdb/
- Removed 3 low-value crons (strategic-coo, task-monitor, script-monitor)
- Found and scrubbed hardcoded secrets from 6 git-tracked doc files
- Updated MEMORY.md with all session work

**Lessons Learned:**
1. Always check `.env` vs `config.env` — Node.js dotenv only reads `.env`, shell scripts need explicit `source`
2. Services/daemons don't inherit env vars — cc-poll had no credentials until we patched it
3. RLS matters — anon key couldn't write to job_locks, only service_role key works
4. Docs are a secret leak vector — env templates and setup guides had real keys committed
5. Always verify the full chain: credentials exist → service can load them → API call works

**Outcome:** Supabase fully operational, VPS cleaned up, secrets scrubbed

### 2026-02-03 14:00
**Test:** Auto-sync test entry

### 2026-02-03 ~05:30-06:15 UTC
**Tasks:** Task Monitor v2, Shared Memory, VPS deployment
- Built `scripts/task-monitor-v2.sh` (per-task state, max 3 alerts, BLOCKED-aware)
- Created `.claude/SHARED-MEMORY.md` (all agents read/write)
- Fixed `.cc-vps/` permissions on VPS (root→ccuser)
- Cleaned INBOX.md on VPS (78 REMINDER blocks removed, 827→205 lines)
- Deployed monitor v2 to VPS cron (every 5 min), test run passed
- Updated instruction files for all 3 agents to know about SHARED-MEMORY.md
- Updated MEMORY.md for all 3 agents with session learnings
**Outcome:** Monitor v2 live, shared memory live, all agents informed

### 2026-02-03 ~06:15 UTC
**Tasks:** Swap cc-poll from 60s polling to inotifywait
- Installed `inotify-tools` on VPS
- Backed up `/usr/local/bin/cc-poll` → `cc-poll.bak`
- Replaced `sleep 60` with `inotifywait -e modify,create -t 120 "$INBOX"`
- Added SHARED-MEMORY.md read into Claude task prompt context
- Fixed shebang corruption from heredoc-over-SSH (`#\!` → `#!/bin/bash`)
- Restarted service, verified instant wake on INBOX touch
- No token cost impact — Claude only called on actual PENDING tasks, same as before

**Lessons Learned:**
1. Writing scripts via heredoc over SSH can corrupt shebangs — always verify with `xxd`
2. inotifywait doesn't increase API costs — it only changes reaction latency, not call frequency

**Outcome:** cc-poll now reacts to local INBOX writes in <1s (was 60s). 120s fallback for git-pushed changes.

### 2026-02-03 ~06:20-06:30 UTC (17:20-17:30 AEDT)
**Tasks:** E2E test of inotifywait cc-poll + VPS timezone change
- Ran full e2e test: dropped PENDING task → cc-poll picked up in <1s → Claude executed → OUTBOX written (23s total)
- Changed VPS timezone from UTC to Australia/Sydney (`timedatectl set-timezone Australia/Sydney`)
- Note: cron jobs now fire in AEST/AEDT — may need adjusting if any were set to UTC times
- Updated all memory files
**Outcome:** inotifywait confirmed working e2e. VPS now on Sydney time.
