Remote: providers whose key is only in the terminal's environment are missing from the phone
Cause: the launch agent runs `pic remote --login` with launchd's bare environment (HOME, PATH, SHELL, USER, TMPDIR, SSH_AUTH_SOCK and nothing else; `~/Library/LaunchAgents/app.zeitforge.pic.remote.plist` sets no EnvironmentVariables). The owner's OPENROUTER_API_KEY and ANTHROPIC_API_KEY come from Doppler through `~/.zshenv`, so the terminal has them (`pic auth status` shows `openrouter env*`, `anthropic env*`) and the daemon does not. Its get_available_models and get_credentials list only providers with a stored key, which here is the OpenAI sign-in.
Reproduce on a disposable home, with no live service: 1. `HOME=$H pic auth login openai --api-key` with any fake key. 2. Start `env -i HOME=$H PATH=$PATH PIC_MODEL_CATALOG=offline pic remote`, the environment launchd gives, and pair a phone (the pic-relay page on a local `wrangler dev`). 3. The phone's model sheet lists openai only; the Keys sheet lists openai only. 4. `env -i HOME=$H PATH=$PATH PIC_MODEL_CATALOG=offline OPENROUTER_API_KEY=fake pic auth status` lists openrouter env*. The same pic sees it from a shell and not from the daemon.
Observed: the phone offers only providers with a stored key, and nothing says why. Expected: what the terminal offers, or at least a plain reason for each provider the daemon cannot reach.
Code path: remote.c, `pic remote install` (line ~9852) writes the agent running `pic remote --login` (line ~9936). Credential resolution reads `getenv(key_env)` in the daemon's own environment, which never held the login shell's variables.
Fix shape (pic's call): at `pic remote install`, and in `pic remote status`, name each provider whose key the terminal has only in its environment, and offer to store it (`pic auth login PROVIDER --api-key` from the variable). get_credentials could also list such a provider with state "missing in pic remote: set in the terminal's environment only", so the phone's Keys sheet says why. Sourcing the login shell in the daemon would run the user's dotfiles (Doppler here) at every start, so I would not recommend it.
Workaround for the owner until then: `pic auth login openrouter --api-key` (and anthropic), then restart pic remote.
Closed by !208: remote-fixes landing on trunk (778886bba32a)