---
name: windows-dev-environment
description: Set up, verify, and sign in developer tools on Rob's Windows 11 laptop 'Connie' via guided PowerShell blocks — WSL2/Ubuntu, Claude Code, npm tooling. Use when installing, upgrading, authenticating, or troubleshooting dev tools on the Windows side (not VPS).
---

# Windows Dev Environment (Connie)

## Ground rules
- The agent runs on the VPS and CANNOT see or touch Connie. All Windows-side work = guiding Rob through PowerShell (`PS C:\Users\Rob>`) copy-paste blocks and reading back his pasted output.
- Block UX conventions (hard requirement, from user profile): "Copy and paste this whole block" header on every runnable block, one coherent task per block, never bury a run-this command in prose.
- Connie is light (i5-1235U, 12GB) — heavy inference/workloads belong on the VPS. Don't suggest heavyweight local tooling (docker for prod loads, big Ollama models) without asking the goal first.

## WSL2 / Ubuntu
- Verify: `wsl -l -v` — read the VERSION column. `2` = done.
- **Pitfall — halfway state:** the interactive "Press any key to install WSL" prompt times out after 60s and can leave the WSL *platform* installed with *no distro* ("Windows Subsystem for Linux has no installed distributions"). Fix: `wsl --install Ubuntu --no-launch`, then re-verify. No reboot needed for this second step if the platform install already happened.
- If VERSION shows `1`: `wsl --set-version Ubuntu 2`.
- The "Welcome to WSL" GUI app (sidebar with General/GUI Apps/GPU/etc.) is a brochure, not an installer — safe to close.
- **First launch** (Start menu → Ubuntu): one-time Linux user setup. Username lowercase, no spaces, separate from Windows login. Password typing is INVISIBLE (no echo, cursor doesn't move) — warn Rob upfront or he will think the window is frozen.
- Daily-use tips: Windows files at `/mnt/c/Users/Rob/...`; `explorer.exe .` opens Explorer at the linux cwd; keep linux project files in `~` (heavy work across `/mnt/c` is slow); `exit` or closing the window returns it to `Stopped` (zero cost).

## Claude Code with a Claude Pro subscription
- Install/check: `claude --version`; if missing, `npm install -g @anthropic-ai/claude-code`. Note: version can self-update on launch (banner may show newer than `--version` reported moments earlier).
- **Clarify the auth path FIRST — which Anthropic product does Rob have:**
  - **Claude Pro/Max (claude.ai chat subscription):** OAuth — run `claude`, choose **"Sign in with Claude account"** (NOT "API key"), browser opens to claude.ai, approve, terminal picks it up automatically. No proxy, no key.
  - **API credits (console.anthropic.com):** API-key path instead.
- First-run wizard shows a theme picker first (cosmetic, `/theme` to change later); the login choice comes after it. If the browser doesn't pop on its own, the terminal prints a URL to paste manually.
- **Verify the login after first launch:** `/status` in the Claude Code TUI → look for `Login method: Claude Pro account` + Rob's email + default model. Then smoke-test the full loop (auth + tools + file write) with a trivial task like "create hello.txt on my Desktop" and approve the permission prompt. Exit with `/exit`.
- **Update:** auto-update fails — `/status` shows "Can't auto-update: npm global folder isn't writable". Fix: `npm update -g @anthropic-ai/claude-code` from an ELEVATED (admin) PowerShell. Not urgent; park it until a version actually matters.
- **Harmless `/status` noise:** `Additional CA cert(s): C:\ProgramData\Hermes\hermes-vps-root.crt` — Hermes Desktop sets a system-wide cert env var that Claude Code picks up. Leave it. MCP server count entries are also normal.
- **Superseded setup:** before the Pro account, Claude Code on Connie was routed through the "free-claude-code" proxy (fcc-server, github.com/Alishahryar1/free-claude-code) → OpenRouter free tier. With Pro, direct OAuth is the correct single-source-of-truth path. fcc remnants: `C:\Users\Rob\.local\bin\fcc-server.exe` (port 8082, admin UI `127.0.0.1:8082/admin`); `~\.local\bin` is NOT on PowerShell PATH (use full path or fix PATH). Removal decision deferred — raise it once Pro OAuth is confirmed working.
## Long-running tools: auto-start at login (Scheduled Task)

Tools that must survive reboots with no visible window (Syncthing, fcc-server, any tray-less daemon): register a Scheduled Task. **Elevation is mandatory** — `Register-ScheduledTask` fails `Access is denied` from a normal shell; have Rob open ADMIN PowerShell (right-click Start → Terminal (Admin)) first. The admin window opens in `C:\Windows\System32` — harmless; `$env:LOCALAPPDATA` still resolves to his profile.

```powershell
# ADMIN PowerShell. Example: Syncthing hidden at logon.
$exe = (Get-ChildItem "$env:LOCALAPPDATA\Microsoft\WinGet\Packages" -Recurse -Filter syncthing.exe | Select-Object -First 1).FullName
$action = New-ScheduledTaskAction -Execute $exe -Argument "--no-console --no-browser"
$trigger = New-ScheduledTaskTrigger -AtLogOn
$principal = New-ScheduledTaskPrincipal -UserId "$env:USERNAME" -LogonType Interactive -RunLevel Limited
Register-ScheduledTask -TaskName "Syncthing" -Action $action -Trigger $trigger -Principal $principal -Description "Start Syncthing at login (hidden)" -Force
Get-ScheduledTask -TaskName "Syncthing" | Select-Object TaskName, State   # expect: Ready
```

`--no-console` = hidden window, `--no-browser` = don't pop the GUI every boot. `-RunLevel Limited` is right for a sync client — it must REGISTER elevated but should not RUN elevated at logon.

## Cross-side pitfalls

- **127.0.0.1 is Connie, not the VPS.** When Rob pastes a localhost URL (e.g. the Agentic OS dashboard `http://127.0.0.1:3737/memory`), do NOT curl it from the VPS — the VPS's own loopback answers (or doesn't), never Connie's. Inspect the backing files via PowerShell instead. Same side-of-symptom rule as the diagnostic heuristic: localhost belongs to the machine the user is sitting at. To find what a Connie-local dashboard page reads: check `C:\Users\Rob\.agentic-os\config.json` and probe with `Get-ChildItem ... -Recurse -Depth 3`. Claude Code's per-project memory lives at `C:\Users\Rob\.claude\projects\C--Users-Rob\memory`.
- **Verify "it lives on the VPS" claims before designing around them.** Rob may describe a planned end-state as current. Search first (`find / -maxdepth 4 -iname '<name>' -not -path '/proc/*'` etc.). 2026-07-19: the "Obsidian vault on the VPS" was a plan, not a reality — the only obsidian trace was an `/etc/apparmor.d/obsidian` stub, and the real memory dir was on Connie.

## Session detail

- `references/claude-code-pro-setup.md` — exact observed outputs from the 2026-07-19 WSL2 + Claude Code Pro OAuth session (prompt texts, /status output, versions) for pattern-matching.
