Skip to content

Epic: fold secrets-agent broker into a hardened, always-on daemon #418

Description

@muqsitnawaz

Tracking issue for the architecture decision recorded in docs/08-secrets-agent-process-model.md (added in #413).

Decision

The secrets-agent broker should not be a standalone launchd service. It belongs inside a hardened, always-on routines daemon — the daemon is meant to be the most reliable, supervised, bounce-back backbone, so a critical service (every secret read depends on it) should be hosted there, not routed around it.

Make the host (the daemon) reliable enough to carry the critical service — don't route the critical service around the host.

This supersedes the standalone com.phnx-labs.agents-secrets-agent service shipped in 1.20.20. PR #413 (persistent service + self-heal + the ADR) is the interim foundation; this epic is the consolidation.

Work

Why now / context

Surfaced during a run of incidents: a stale pre-upgrade daemon kept reading the claude OAuth bundle from the keychain (Touch ID storm), the broker cold-started under load, and manual restarts produced duplicate daemons. Root pattern: long-running background processes need to be one robust supervised backbone, not several ad-hoc services.

Not doing (rejected)

Keeping the broker as its own service "for isolation" — the isolation is largely illusory (both rely on launchd KeepAlive), and it treats the daemon's bugs as permanent instead of fixing them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Nice-to-have / moat-hardeningenhancementNew feature or request

    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