Skip to content

Interrupted plugin host builds leak empty dist/.host-stage-* staging directories #1726

Closed

Description

@ymichael

buildPluginHost (packages/plugin-build/src/build-plugin-host.ts) mkdtemps a .host-stage-XXXXXX/ staging directory inside the plugin's dist/ and removes it in a finally, so a killed process (dev loop restart, daemon kill) leaks the directory.

Evidence (final gate run 2, /tmp/final-gate-2.md, pre-existing observation 3): three empty dist/.host-stage-* directories from earlier sessions were found on disk. Cosmetic, but they accumulate.

Fix shape: sweep stale .host-stage-* entries at the start of the next build (or on plugin load) rather than relying on finally alone.

Surfaced during #1640 final validation; pre-existing (also present on origin/main).

AGENT GENERATED: by Claude Fable 5

Activity

  1. self-assigned this
    on Aug 17, 2026
  2. added a commit that references this issue on Aug 17, 2026
    0bdb806
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