FigmaAgent 126.10.13 memory retention: font lookup grows to 4.7 GiB
Hello Figma Support,
Please open a bug ticket and escalate a reproducible FigmaAgent memory-retention issue to the engineering team. During normal use, figma_agent reached about 4.7 GiB after running for over four days, and my 16 GiB Mac became very slow. Restarting the helper released the accumulated memory.
Environment
- Component: local font helper, executable figma_agent, bundle com.figma.agent
- macOS 27.0, build 26A5425a; Apple Silicon (arm64); 16 GiB RAM
- FigmaAgent 126.10.13, protocol version 24
- Installed Figma desktop app: 126.9.11; the desktop app was not running during the controlled reproduction
- Font cache: 3,973 font files, including 3,307 activated through SandollCloud
Controlled reproduction (no Figma document edits required)
1. Start FigmaAgent and measure its physical footprint.
2. Repeatedly issue this normal font-enumeration request:
curl -s -H 'Origin: https://www.figma.com' http://127.0.0.1:44950/figma/font-files > /dev/null
3. Measure footprint and heap object counts again, then stop requests and leave the process idle.
Measured results
- In a 67-request run, physical footprint rose from 35.970 MiB to 129.798 MiB immediately after the requests.
- After 15 seconds idle it remained at 126.016 MiB.
- Heap growth across those 67 requests: +303,577 NSURL objects (exactly 4,531/request), +302,840 CFString objects (4,520/request), and +67 NSArray storage allocations (one/request).
- Repeated version queries and English/Korean spell-check requests did not show comparable linear growth.
macOS memory diagnostics
- 'leaks --autoreleasePools' reported about 89.8 MiB held directly or indirectly by autorelease pools.
- On long-lived Actix HTTP worker threads, the reference chain was autorelease pool -> __NSMallocBlock__ -> captured block -> captured NSArray -> NSArray storage -> NSURL / CFString. Individual retained font arrays were about 1.28 MiB.
- The ordinary leaks scan found only 3,536 bytes of unreachable leaks. The main problem therefore appears to be reachable objects retained in undrained worker-thread autorelease pools, rather than orphaned allocations.
This points to autorelease-pool lifetime management in the font-enumeration path. Please confirm the exact responsibility between FigmaAgent and CoreText on this macOS build; I have not established whether other macOS versions are affected.
For now, I have had to add a local workaround that restarts only FigmaAgent when its footprint stays above 256 MiB. This is not a fix and briefly interrupts local font access.
Please provide a ticket/bug ID, route the reproduction and retention chain to engineering, and advise which release will address it. Sanitized heap summaries and an autorelease-pool excerpt are available.
Thank you.

