You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: system agent is never created on a fresh install until the backend restarts — /setup creates the admin after the only deploy attempt #3237
On a fresh install that creates its admin through /setup (every one-click / marketplace path: DigitalOcean, AWS, the hosted script), trinity-system is never deployed until something restarts the backend. The only deploy attempt runs at backend startup, before /setup has created the admin, and fails:
System agent: create_failed - Failed to create system agent: Admin user 'admin' not found
Nothing retries it after /setup succeeds.
Where
src/backend/main.py → _init_docker_and_system_agent() calls system_agent_service.ensure_deployed() once, at startup.
src/backend/services/system_agent_service.py → create_system_agent needs the admin user to exist.
src/backend/routers/setup.py creates the admin and never triggers a deploy.
Reproduction
Launch a fresh install (seen on an AWS AMI built from v1.0.0-aws.2, and on v1.0.0-aws.1).
Complete /setup.
docker ps shows no agent-trinity-system; the backend log has the error above from boot.
docker restart trinity-backend → System agent: created - System agent created and started.
On AWS the first IP refresh after a stop/start or an Elastic IP change recreates the backend, which hides the bug on those paths.
Suggested fix
After /setup creates the admin, run system_agent_service.ensure_deployed() (in the background, non-fatal, as at startup). It is idempotent, so a later restart stays a no-op.
Activity
dolho commentedon Oct 6, 2026
/claim
github-actions commentedon Oct 6, 2026
Claimed by @dolho. Label
status-in-progressadded.Next steps:
feature/3237-<short-slug>Fixes #3237docs(setup): show the system-agent deploy step in the first-time setu…
fix(setup): deploy the system agent once /setup creates the admin (#3237