- All playbooks
- Slow tests
- Let an agent break import cycles and make the app load lazily
Let an agent break import cycles and make the app load lazily
Point a coding agent at the import cycles and eager imports behind a slow app boot, and merge what it lands.
Company examples
How Ramp used this technique
Read what Ramp changed and follow the original sources.
Let an agent break import cycles and make the app load lazily
Ramp's engineer in the August 2026 talk described telling the agent to fix all the app's import cycles and to make the app lazy, because the app boots up an enormous amount of Python modules. The agent made a lot of progress on both, and a lot of that code was merged. The talk presents this among the hard problems Ramp gave the agent.
2026: Ramp reported that a lot of the agent's import-cycle and lazy-loading code was merged. Source
- Use it when
- Tests and tools start the application, and its startup imports far more modules than a single test or command uses.
- Before applying it
- Lazy imports move a failure from startup to the first use, so keep a test that imports every module.
Company Playbooks
- Read Anthropic’s playbookRun only affected tests
- Read DoorDash’s playbookRun build and test in parallel, sharded across CI agents
- Read Linear’s playbookBenchmark the same job on faster hardware
- Read Mastra’s playbookStarSling runners for the slowest test workflow
- Read OpenAI’s playbookRank CI fixes by the minutes they save
- Read Ramp’s playbookMove a CPU-bound test suite to a faster CPU
- Read Shopify’s playbookLet an agent iterate against one CI metric
- Read Spotify’s playbookBuild arm64 on native arm64 runners
- Read Stripe’s playbookRun only the tests a change can reach
- Read Uber’s playbookBuild the merge-queue speculations most likely to be needed