Commit Graph
1 Commits
Author SHA1 Message Date
agent-exec-transportandCursor 1edf326448 Remember the super-admin credential file path in svc
Auth-on agent services need super-admin credentials at every launch, but
svc only forwarded them from the current environment, and recover/watchdog
relaunch with a cleared environment, so a bare restart or recovery failed
closed. svc now records only the absolute path of AGENT_SYSTEM_ENV_FILE as
superadmin_envfile= after checking it is a regular, owner-only (0600) file
before stopping anything, and forwards that path when no explicit
credentials are set. An empty AGENT_SYSTEM_ENV_FILE clears the record. The
file content is never read, copied or printed.

Why: prod restarts and recovery required re-exporting AGENT_SYSTEM_ENV_FILE.
Evidence: agent-exec unit dev-svc-superadmin-envfile-persist (cursor, attempt 1, terminal=success); unittest test_svc_superadmin_envfile + test_svc_recover + test_svc_identity: 51 OK (1 skipped).
Impact: svc.sh agent launch and svc.env gain superadmin_envfile; docs/svc.md 4.2 note.
Refs: Dev task fix/svc-superadmin-envfile-surface-conv.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-21 14:58:38 +00:00