Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
Email service infrastructure
Owns the email API, pub/sub consumers, focus worker, scheduled handlers, queues,
attachment storage, and Redis. Runtime code lives in services/email_service.
Worker capacity
- Set
pubsub_workers_desired_count,pubsub_workers_min_capacity, andpubsub_workers_max_capacityin eachPulumi.<stack>.yaml. They control ECS tasks, must be positive integers, and must satisfy min <= desired <= max. - Production is pinned to 8 tasks for backfill recovery; dev retains a desired count of 1 and autoscaling bounds of 1–2. Lower the production values after recovery. There is no expiry or automatic scale-down when the queue empties.
- Keep desired count and autoscaling bounds in sync when changing capacity. Deployments apply configuration changes but do not refresh Pulumi state; manual ECS adjustments can persist when Pulumi sees no change. Refresh state before reconciling out-of-band drift.
- Per-task
BACKFILL_QUEUE_WORKERScomes from the email service's Doppler config throughAPP_SECRETS_JSON. At 24 per task, 8 tasks provide 192 backfill workers at steady state; rolling deployments can temporarily overlap old and new tasks. The legacybackfill_queue_workersPulumi key is not wired into the task's runtime configuration. - These tasks also consume inbox sync and Gmail operation queues. Changing task count scales their consumers and database connection pools as well.
Checks
bun run --cwd infra checkfrom the repository root.just checkfrom the repository root.