Code Archives Outlive the Papers That Justify Their Funding
When a computational paper is published, its conclusions rest on code that may not survive the grant that paid for it. Archives can outlive the papers they support, but few funders budget for their upkeep. This piece examines what the evidence on code survival actually shows, where the incentives fail, and what researchers and funders can do without waiting for a policy overhaul.
The Quiet Cost of Vanishing Code
A paper's methods section describes an algorithm, but the implementation lives in a repository. When that repository goes dark, the description becomes a recipe without a kitchen. Readers cannot check whether the code matched the prose, and later researchers cannot build on a result they cannot run.
Archives such as Zenodo, figshare, and institutional repositories can issue DOIs and store snapshots. These services outlive individual grants, yet their long-term costs are rarely covered by the grants that generate the need. Surveys of data-sharing practices tend to report that maintenance sits at the unfunded end of the research data lifecycle, well behind collection and initial deposit.
Reproducibility depends on executable artifacts, not narrative. Audits of computational papers in ecology and adjacent fields have repeatedly found that only a minority of articles with custom code supply a link that still works at the time of checking. The gap between what a paper claims and what a reader can verify is often a dead URL.
What the Archive Audit Found
Link rot is the most visible symptom. Analyses of reference lists in computational journals have found that a substantial share of URLs to code or data become unreachable within a few years. Widely cited work on articles in PLOS ONE found that a sizeable fraction of links to supplementary materials were dead within roughly five years, with the rate climbing steadily rather than plateauing.
DOIs help, but they are not a guarantee. A DOI resolves to a landing page, and that page can still point to a missing file or a repository that has changed its access rules. The permanence of a DOI depends on the organization behind it, not on the identifier itself. Registration agencies differ in their continuity arrangements, and a small institutional repository that folds can leave its DOIs pointing at nothing.
Survival rates vary by discipline and by repository. Code deposited in large, well-funded archives tends to persist longer than code hosted on personal websites or university pages that get redesigned. Few papers include a runnable environment, such as a container or a virtual machine image, that would let a reader execute the analysis without rebuilding dependencies by hand.
Even when code survives, it may be incomplete. Authors often strip out proprietary data, credentials, or internal libraries before deposit, leaving a skeleton that cannot run. A repository may host a snapshot that looks complete but lacks the configuration files or data schema needed to reproduce the published figures. Auditors who attempt to re-execute archived code frequently report that missing pieces are the rule rather than the exception.
How Code Gets Lost
Graduate students write most of the code, and they leave. Laptops retire, accounts expire, and the person who understood the undocumented script is now unreachable. Work from the Software Sustainability Institute has long suggested that a large share of research software is developed by a single person, often on a fixed-term contract, which makes the bus factor of a whole project equal to one.
Dependency hell breaks old workflows. A script that ran on an older Python release a decade ago may not run on a current system without significant effort. Libraries change their APIs, and the original environment is rarely preserved alongside the code. Package managers compound the problem by resolving to the latest compatible version by default, so a re-run silently installs something the author never tested.
There is no citation standard for software versions. A paper may cite a package by name but not by commit hash, making it impossible to know which version produced the reported results. Repositories charge for long-term storage, and those fees are rarely part of a grant's budget.
Hardware adds another layer of fragility. Code optimized for a particular GPU or cluster architecture may not run on newer hardware without modification, and the original environment is seldom documented. Emulation and containerization can help, but they require expertise and ongoing curation that few projects budget for.
Licensing is an underrated loss mechanism. Code written at one institution and reused at another may carry terms that forbid redistribution, so the version that actually produced a figure cannot legally be posted anywhere. When the original author moves, the rights situation often becomes murky enough that nobody bothers to clarify it.
The Incentive Gap
Promotion committees count new papers, not maintenance. A researcher who spends a month updating a five-year-old codebase to keep it runnable gets no credit comparable to a new publication. The same logic applies to reviewers, who seldom check code even when it is provided.
Journal policies rarely enforce archiving. Some journals require a data availability statement, but few require a working link to a version-controlled repository with a tagged release. Enforcement is inconsistent, and the consequences for non-compliance are minimal. A statement that code is available on request satisfies many editorial checklists while leaving the actual artifact inaccessible in practice.
Preservation falls to librarians and volunteers. Digital preservation is a formal process, as described in archival science, but research code is often outside its scope. A related piece on this site about how a mouse-model memory result lost its consensus illustrates how fragile the evidence base can become when methods are not fully documented.
The Trade-Off Nobody Budgets For
Archiving competes with the work it is meant to protect. Every hour a postdoc spends writing documentation and packaging dependencies is an hour not spent on the next experiment, and the accounting is asymmetric: the cost is immediate and visible, while the benefit is diffuse and arrives years later, often to someone else. That asymmetry explains why well-intentioned archiving pledges collapse once a deadline approaches.
There is also a genuine tension between preservation and reuse. A frozen snapshot optimized for exact reproduction is not the same artifact as a maintained library that keeps pace with its dependencies. The first serves auditors, the second serves users, and projects rarely have the resources to do both. Choosing one means accepting a specific kind of future failure.
Storage is the cheapest part. Curation, migration, and periodic re-testing dominate the true cost of keeping code alive, and those are labor costs that scale with the number of deposits rather than the number of bytes. A repository can promise permanence cheaply; it can only deliver usability expensively.
What the Evidence Does Not Show
There is no established causal link between code loss and retractions. A vanishing repository is a problem for reproducibility, but it does not by itself invalidate a published finding. The evidence is mostly about the difficulty of verification, not about the frequency of error.
Small samples limit generalization. Most audits of code survival cover a few hundred papers in specific fields, and the results vary widely. Self-reported archiving may inflate success rates, because authors may believe their code is available when the link is broken or the repository is private.
Long-term usability remains unmeasured. A link that resolves is not the same as code that runs. Few studies test whether archived code can be executed years later, and those that do often find that dependencies or hardware requirements have changed. This site has argued that replication audits in psychology and economics face similar limits when they rely on what authors report rather than on independent re-execution.
Practical Steps for Researchers and Funders
Assign a code curator in every grant. Name a person responsible for archiving and maintenance, and include that role in the budget. A related piece on how a spin-glass algorithm landed in traffic planning shows how code can travel beyond its original discipline, which raises the stakes for preservation.
Use a DOI-issuing repository with escrow. Deposit code in a service that guarantees long-term storage and provides a landing page that will not disappear. Test restoration every two years by attempting to run the archived code in a fresh environment.
Budget a meaningful slice of the grant for maintenance, in the range of several percent rather than a token line item. Funders can require a maintenance plan as part of the application, just as they require a data management plan. Cite software versions like data, using a commit hash or a release tag, so that others can identify exactly what was used.
Reviewers can ask for a runnable environment, not just a link. Journals can enforce archiving by checking that the link resolves and that the code runs. These steps are modest, but they shift the default from loss to preservation.