Skip to content

Bug: opencode-ai postinstall can silently keep stale native binary when postinstall script's childprocess npm is blocked (min-release-age) #30812

Closed as not planned

Description

@eersnington

Description

yo,

so in my root bunfig.toml and .npmrc, I have a min 3 day release age set up. but I install opencode through bun and have set opencode-ai to bypass that (.npmrc doesn't support selective minreleaseage exclusions).

this fucks up the postinstall script since that has hard coded npm within it and then silently fails due to the .npmrc.

https://github.com/anomalyco/opencode/blob/dev/packages/opencode/script/postinstall.mjs#L132-L135

my bunfig toml has opencode-ai in the bypass list, and .npmrc doesn't provide a config option to exclude from minreleaseage gate.

my ~/.bunfig.toml
[install]
minimumReleaseAge = 259200
minimumReleaseAgeExcludes = ["opencode-ai", "opencode-live"]

I would have been mad/borderline schizophrenic if I didn't have opencode to debug opencode. But the fix I had to opt for exactly download a 3d+ old version of opencode. It would be nice if the postinstall script was package manager aware (prob with npm_config_user_agent env var)

Plugins

plannotator, opencode-live

OpenCode version

1.14.48 during this bug

Steps to reproduce

minimal repro details:
~/.npmrc

min-release-age=3

then:

bun install -g opencode-ai@latest
opencode --version
# 1.15.13 (or latest at the time)

but if you open the TUI, and look at the corner, it will show an older version.

Image

(this points to what ever previously installed OS binary that has been successfully installed or none if it's your first time installing)

Screenshot and/or share link

included above ^

Operating System

macos 26.5.1

Terminal

ghostty

Activity

  1. eersnington commented on Jun 4, 2026

    @eersnington
    Author
    Image

    i would make an aura monster version of dax but i don't have his consent nor am i on his payroll

  2. github-actions commented on Aug 4, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions