# Leonard — Lessons Learned ## Reusable lessons for the Leonard agent. One entry per lesson. > Newest first. | Date | Lesson | Context | |------|--------|---------| | 2026-09-01 | VPS SSH (local-vps-reference:22) is rate-limited/firewalled: >3 failed connect attempts within a period blocks the IP for a while. Don't loop SSH connect attempts against the VPS — ask Anthony to add a key/open the port. Gitea (:80/443) and headscale (:8443) still reachable, so HTTPS/Gitea endpoints stay up. | Athena Oracle deploy blocked | | 2026-08-31 | Vault RAG chunk/file counts recorded independently in STATUS.md, HOME.md, and 01_user/current-context.md drift after every reindex (160/162/167/219 all appeared for the same index). Update all three together (or point at one canonical count) when reindexing to avoid stale numbers. | AgentOS merge reindex | | 2026-08-30 | LFM2.5-2.6B is both agentic AND a pure reasoning model. It uses `think` tags in the chat template, putting reasoning in `reasoning_content` and visible output in `content`. Requires sufficient `max_tokens` (≥256) to complete reasoning before emitting visible answer. | LFM2.5 setup and testing | | 2026-08-30 | `notify` parameter on `terminal` tool requires `background=true` — foreground commands always return exit code, and `notify` is rejected. Use background mode for daemons/services. | LFM2.5 launch debugging | | 2026-08-30 | Llama.cpp `--n-gpu-layers 999` is required for full CUDA offload on Windows. Without it, the model runs on CPU only. | LFM2.5 setup | | 2026-08-30 | LFM2.5-2.6B (Q4_K, ~2.1GB) + FreeToken gpt-oss-20b (~12.8GB) cannot coexist on RTX 3060 12GB. Only one can run at a time. | GPU VRAM budget | | 2026-08-30 | Hermes foreground timeout (120s) kills long-running processes. Use `background=true` for daemons, then verify with separate curl. | Process management | | 2026-08-29 | Put auth/authorization gates at the single central callback-dispatch point, not in each per-handler function. For callback-heavy integrations (Telegram inline buttons), a shared gate at dispatch covers every existing + future callback prefix at once and is regression-proof; per-handler gates silently miss new handlers (the model picker was the ungated one). | Telegram picker auth audit | |------|--------|---------| | 2026-08-29 | In a cron job config, provider prefix must NOT go in the `model` field — use bare `deepseek/deepseek-v4-flash-0731` + separate `provider: openrouter`. Sending `openrouter/deepseek/...` as the model ID → "not a valid model ID" → falls to a rate-limited free model then freetoken's tiny 8,448-token budget → job dies. | Agent OS cron consolidation setup | | 2026-08-29 | Cron jobs inherit the full default-toolset system prompt (~16,931 tokens context). Huge context overflows tiny fallback models with small KV budgets. Give cron jobs a minimal toolset (e.g. `read, files`) like `check-agent-discussion` (~2,648 tokens). | Agent OS cron consolidation setup | | 2026-08-29 | Files in a session that came back as base64 text on disk (memory_policy.md, lessons.md) were real corruption — the decoder (`read_file`) hid it. Always verify a file's on-disk content is plain markdown, not base64. | Vault Agent OS setup — base64 corruption bug | | 2026-08-29 | `/model ` in Hermes is session-scoped; use `--global` or `hermes config set model.default` to persist. Config/status showing a different model than the live session = split-brain from session-level switches. | Model switching permanence | | 2026-08-29 | `hermes fallback add|remove` are interactive pickers that reject bare model strings; set the whole `fallback_providers` list via `hermes config set` instead. | Model switching permanence |