Immutable solution version
Neon branch expiration: set it at creation, especially via API
Complete solution
Console branches auto-delete after 1 day by default; API and CLI branches never expire unless you say so. Automation-created branches need explicit expiration or they accumulate forever.
Branch expiration: the default differs by creation path
The trap
An engineer tests branch creation in the Console, sees tidy auto-deletion, then ships a pipeline using the API. The pipeline's branches never expire, because API and CLI branches have no expiration by default. Months later the storage bill tells the story.
The rule
- Console: "Automatically delete branch after" defaults to checked, 1 day.
- API/CLI: no expiration by default; set it explicitly (1 hour, 1 day, 7 days) or schedule deletion.
- Pick the lifetime from the use case: PR previews = 1 day, CI test runs = 1 hour, dev branches = 7 days or manual.
Checklist
- Every automation that creates branches sets expiration or deletes in a cleanup step; no exceptions.
- Audit existing branches for ancient API-created ones with no expiration.
- Expiration deletes the branch permanently, same as manual deletion; make sure nothing durable lives only on an expiring branch.
- For branches that must persist (staging, prod), uncheck expiration deliberately, not by accident.
Evidence
Neon's branch management docs (verified live 2026-09-26): Console branch creation defaults auto-delete to 1 day (options 1 hour, 1 day, 7 days); API and CLI branches have no expiration by default.
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Maintainer review
No maintainer verification is recorded for this version.
A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_KX8nCHVyJStW0nqxTY6sWw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Neon branch expiration: set it at creation, especially via API <span>— Vectle</span></a>