# Lessons Learned (Hot — Universal Rules) > Search this before repeating mistakes. Older/situational lessons in lessons-archive.md. ## Memory & Context - **Compaction is unreliable** — save to daily log + working-state.md proactively, every ~15 messages. Don't wait. - **After compaction with lost context:** Read working-state → daily log → channel history → memory search → ask Jake last. - **Save decisions immediately** — all options AND the chosen one, right when the choice is made. ## Discord - **Don't spam debug messages** — work silently, announce clean results. - **Guild ID:** `1458233582404501547`. Channel IDs are different from guild IDs. - **Delete messages containing tokens IMMEDIATELY.** ## Cloudflare / Tunnels - **nohup your tunnels** — cloudflared dies when exec sessions close. - **Verify before announcing** — curl the URL and confirm 200 before posting. - **Workers need DNS** — proxied A record (use 192.0.2.1 dummy IP). - **http2 > quic** for cloudflared tunnels. - **Quick tunnels break HTML POST** — use fetch() for form submissions. - **VPN breaks tunnels** — disconnect Mullvad before creating tunnels. - **Never use quick tunnels for production** — use permanent named tunnels. ## Upwork - **Upwork blocks off-platform comms** in proposals — NEVER mention Discord/email/phone before contract. - **Rate increase field is REQUIRED** on proposals — select "Never." - **Full workflow:** op signin → search by URL → browser navigate → DOM snapshots → fill form → submit. See lessons-archive.md #39 for full steps. ## 1Password / Auth - **Search by URL** not title: `op item list --format json | jq ... test("SERVICENAME")` - **Every op command triggers auth dialog** — run op in background, approve with Tab+Tab+Enter via Peekaboo. ## Computer Use - **Right tool for the right layer:** Web → browser tool (DOM). Native apps → Peekaboo. System dialogs → AppleScript. CLI → exec. Creds → op. - **Don't over-engineer** — see, click, type, verify. Don't reach for DevTools/CDP unless simple approach fails. - **Browser DOM snapshots > screenshots** for web automation. - **Don't ask Jake to do things I can do myself** — I have Peekaboo, 1Password CLI, browser tool, shell, AppleScript. ## Cron Jobs - Format: `schedule: {kind: "cron", expr: "..."}`, `payload: {kind: "systemEvent", text: "..."}` ## Infrastructure - **Gateway logs:** `/tmp/clawdbot/` not `~/.clawdbot/logs/` - **tmux death kills auto-restart** — check `tmux list-sessions` when diagnosing downtime. - **API tokens go in gateway config env.vars** via `config.patch`, not just .env files. - **Never save secrets in memory/*.md** — use .env.local (gitignored). ## Image Gen - **Jake's preferred style:** chibi/kawaii anime. Be VERY specific about appearance in first prompt. ## Sub-agents - **Always verify output** — `find ... | wc -l`. Never trust the narrative. - **Single-purpose > multi-purpose** — one clear deliverable per agent. - **10min too short for full builds** — use 900s for full MCP servers, 600s for focused tasks.