CedarCopilot wants to merge 1 commit into main from staging
Live on prod, no production signal yet
unknown
unknown
unknown
Libra has verdicts on 0 of 3 tracked behaviors on prod; 3 are still being checked. Libra attributed 3 failures to this change at medium confidence and is still confirming them. Libra checks hourly for 3 days after each deploy.
This change lets autonomous drafting search live Gmail threads that were never synced into Cedar, adds recipient metadata to live-thread results, and updates related evaluation and operational guidance.
Two reproduced issues need correction before merge. The drafting executor invokes live-mail tools without its agent identity, so configured mailbox restrictions are bypassed. Live-thread reads also expose historical Bcc recipients as ordinary participants, allowing a hidden address to be added to a visible reply.
The reported customer-data exposure was dropped after an executed unauthenticated GitHub API and raw-file visibility check returned 404 for the repository and document. The document contains sensitive operational data, but the claimed public repository distribution was contradicted by that check.
Not safe to merge until live-mail scope enforcement and Bcc recipient handling are corrected.
Focused executable checks reproduced two independent security failures: restricted mailbox access falls back to inherited access, and hidden Bcc recipients can become visible reply recipients. The repository-rule evaluation issue is also present.
Files Needing Attention: apps/server/src/mastra/tools/subagent-tool-allowlists.ts, apps/server/src/mastra/tools/event-execution/orchestrator-dispatch-tools.ts, apps/server/src/mastra/tools/mail/readLiveThreadTool.ts, and apps/server/.claude/skills/playbook-instruction-eval/live-thread-search-eval.ts.
Live-mail access can exceed an agent's configured mailbox scope because the executor omits agentId when calling the tool gate, causing the connection scope to fall back to inherited access. Historical Bcc recipients are also returned to the model and can flow through the normal recipient merger into a visible outgoing reply. Both issues were reproduced through the affected production paths.
What T-Rex did
### Issue 1
apps/server/src/mastra/tools/subagent-tool-allowlists.ts:222-223
**Live-mail grants bypass agent scope**
The drafting executor grants `search-live-emails` and `read-live-email-thread`, but invokes the gated tools with a request context that does not include `agentId`. The scope resolver treats that context as inherited access rather than applying the drafting agent's configured mailbox restrictions. A restricted dra
Libra has not measured any production surfaces for this change yet.