diff --git a/src/servers/sidecar/claude/user-instance.ts b/src/servers/sidecar/claude/user-instance.ts index a78d16e7..8fe97967 100644 --- a/src/servers/sidecar/claude/user-instance.ts +++ b/src/servers/sidecar/claude/user-instance.ts @@ -161,6 +161,13 @@ function generateMcpConfig(): string { env: { PI_TOOLS_DIRS: hostToolsDirs, OFFICER_EMAIL_DB: join(userRoot, emailDbRel), + // The PARENT, because `OFFICER_EMAIL_DB` is one account and an owner may have several. + // + // `findEmailAccountName` picks the most recently synced, which is the right guess for a single + // question and a silent lie for "search all my email" — the agent gets one mailbox and no way to + // learn the others exist. Handing it the directory makes the rest discoverable by listing it, + // rather than by deriving a path from a convention it would have to be told anyway. + OFFICER_EMAIL_ACCOUNTS_DIR: join(userRoot, 'email_accounts'), MCP_TOOLS_LOG: join(userRoot, 'logs', 'mcp-tools.log'), OFFICER_API_URL, OFFICER_AUTH_TOKEN,