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.
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.
This supersedes the standalone
com.phnx-labs.agents-secrets-agentservice shipped in 1.20.20. PR #413 (persistent service + self-heal + the ADR) is the interim foundation; this epic is the consolidation.Work
routines add)Why now / context
Surfaced during a run of incidents: a stale pre-upgrade daemon kept reading the
claudeOAuth 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.