Skip to content

harness-driver: spawned-broker leaseTimer is not unref()'d — SDK embedders hang on exit without shutdown() #1317

Description

@willwashburn

Severity: minor · packages/harness-driver/src/client.ts:464-467

The 60s lease-renewal setInterval keeps the Node event loop alive until shutdown()/disconnect() clears it — unlike the reassertTimer in the CLI attach flows, which is unref()'d (attach-drive.ts:1019). Possibly intentional (the owning process should stay alive to hold the lease), but it's an undocumented divergence: an SDK embedder that forgets to call shutdown() will hang on exit.

Fix: either unref() it for consistency, or add a comment documenting the deliberate choice.


Found during a multi-agent reliability review of the relay tool/protocol.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions