Skip to content

runs: pid-file inventory loses sight of live background lanes — squads runs empty while lanes actively work #1125

Description

@agents-squads

Observed 2026-07-14 ~09:40: two squads run --background lanes were actively mid-execution (their JSONL logs appending in real time — npm build running, task updates flowing), yet squads runs reported 'No live background runs'. Minutes earlier the same command listed lanes correctly.

Impact: the orchestrator (and squads board) treats working lanes as finished — watchers fire early, harvest logic runs against incomplete work, and a second dispatch could collide with a live lane.

Suspicion: the pid-file inventory (src/lib/runs-inventory.ts) considers a run gone when the wrapper pid exits, but the provider process (or a post-suite phase) keeps writing; or the pid files land under a different repo root for squads whose repo != cwd. Repro data: lanes frontend-worker-1784036336198 / substrate-worker-1784036321209 (logs in hq .agents/logs/app/), both invisible while alive.

Fix should make liveness = wrapper pid OR recent log mtime (e.g. <60s), not pid alone.

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