Mailbox Support Automation — Code Consultation (Beta)
Optional best-effort read-only code analysis for CRM inbox support automation. When an inbound email likely needs repository context, Corcava can consult your codebase via Cursor Cloud Agents and attach cited evidence to generated drafts, project tasks, or tickets.
Prerequisites
- A connected CRM mailbox with support automation enabled (classification, drafts, tasks, and/or tickets).
- At least one Project with a synced Repository (Git integration in Corcava).
- A Cursor Cloud Agent API key on a locked-down service account (repo-only access; no extra MCP integrations or secrets in that Cursor workspace).
- Team admin access to Integrations → Development.
Connect Cursor Cloud (separate from usage reporting)
Corcava has two Cursor integrations:
| Integration | Purpose | API key |
|---|---|---|
| Cursor (Integrations) | Coding Report usage and spend | Cursor Admin API key |
| Cursor Cloud code analysis (Integrations → Development) | Mailbox code consultation | Cursor Cloud Agent API key |
Steps:
- Open Integrations → Development.
- On Cursor Cloud code analysis, enter a name and your Cloud Agent API key → Connect.
- Expected: Card shows Connected after
/v1/meverification.
The usage-reporting Cursor card remains independent.
Configure mailbox code consultation
- Open mailbox automation settings for your connected inbox.
- Enable automation and configure your usual outputs (draft, task, ticket, support project destination).
- Select Coding agent connection → Repository.
- Only repositories attached to the chosen support project and listed as accessible by Cursor are shown.
- Save settings.
- Expected: An amber beta warning appears when a repository is selected.
- Expected: Saving an invalid or inaccessible repo is rejected with a retry hint.
What happens on inbound mail
- Corcava classifies the email and decides whether code context is needed.
- If yes and a connection + repo are configured, status shows Analyzing code… while a Cursor Cloud Agent run completes.
- On success, draft/task/ticket content includes a Code evidence (best-effort read-only) section with file paths and summaries from the agent.
- If the agent fails, times out, returns malformed JSON, or violates read-only policy (e.g. pushed branch/PR), the run moves to Needs review: code context unavailable without enriching outputs.
Retry
From the CRM thread automation row, Retry starts a fresh run and clears prior agent fields (provider_agent_id, code_result_json, etc.) before reprocessing.
Security and beta scope
- Corcava is designed to send only the repository URL/ref and a support prompt to the agent — not Corcava bearer tokens, OAuth tokens, or GitHub PATs.
- Agent runs use Cursor plan mode with auto-PR disabled; treat this as best-effort read-only, not a hard guarantee.
- Keep the feature on trusted internal teams until your Cursor Cloud workspace is verified.
Related
- Cursor Integration — Coding Report and MCP editor integration.
- Support Ticketing — Ticket workflow when automation creates tickets.