Commit 07d139d
fix(daemon): give claude-ops-daemon the gog file-keyring env so memory-extractor can read email
The memory-extractor service shells out to `gog gmail search` to collect
recent email for memory extraction. gog stores its Gmail OAuth tokens in a
file keyring encrypted with $GOG_KEYRING_PASSWORD. The claude-ops-daemon
systemd unit only exported HOME/PATH/CLAUDE_PLUGIN_ROOT, so in the headless
unit gog could not decrypt the tokens and returned nothing — extraction
silently logged "gog returned no data" and skipped the email source
entirely (observed on a Linux EC2 install: every run produced "No data
sources available — nothing to extract").
Add `EnvironmentFile=-%h/.config/systemd/env/mcp-secrets.env` (the same
secrets file the pocket/whatsapp helper units already consume) so the daemon
and its spawned services inherit GOG_KEYRING_PASSWORD + GOG_KEYRING_BACKEND.
gog then decrypts the keyring and resolves the default account from
~/.config/gogcli/config.json, so no GOG_ACCOUNT is needed. The (-) prefix
keeps the unit booting on installs that lack the file.
Verified: with the env present, the extractor's exact gog call returns email
JSON and the run advances from "gog returned no data" to "Collecting recent
emails... Calling Claude Haiku for extraction".
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 4d5b55e commit 07d139d
1 file changed
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
15 | 25 | | |
16 | 26 | | |
17 | 27 | | |
| |||
0 commit comments