Skip to content

codex-companion: reap leaked broker/app-server processes — idle timeout or session-end equivalent #56

Closed

Description

@SSFSKIM

Observed (2026-08-11, via ida-solution#970): app-server-broker.mjs + codex app-server pairs outlive their sessions on macOS — a 19h55m pair from the 7.38.2 cache and multi-hour pairs from workflow runs were found live. The skill's CODEX_COMPANION_APP_SERVER_ENDPOINT dead-socket kill-switch covers review/adversarial-review/task invocations that follow the documented shape, but the workflow verb legitimately spawns brokers and nothing reaps them when a session dies mid-run (upstream reaped via a SessionEnd hook this bundle deliberately lacks).

Fix candidates: (a) broker self-idle-timeout (exit after N minutes with no client), (b) pid-file sweep on next invocation (each broker writes --pid-file already — a startup pass could kill stale ones whose socket is dead), (c) restore a SessionEnd-equivalent. (b) composes with the existing --pid-file plumbing and needs no hook.

Born-of: ida-solution#970 (closed there — zero ida-side scope).

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

Metadata

Metadata

Assignees

No one assigned

    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