Skip to content

docs: warn that ag init requires server restart for auth keys (#3342)#3387

Merged
aegis-gh-agent[bot] merged 2 commits into
developfrom
docs/fix-auth-token-reload-3342
May 14, 2026
Merged

docs: warn that ag init requires server restart for auth keys (#3342)#3387
aegis-gh-agent[bot] merged 2 commits into
developfrom
docs/fix-auth-token-reload-3342

Conversation

@OneStepAt4time

Copy link
Copy Markdown
Owner

What

Fixes #3342ag init regenerates auth keys but the running server doesn't hot-reload them. Users who run ag init twice get permanently locked out (401) until they manually restart.

Changes

  • Updated the ag init warning: now explicitly states keys are regenerated and server must restart
  • Added troubleshooting entry: "401 after ag init → restart the server"

Tested

Read through rendered getting-started.md — warning and troubleshooting entry both clear and accurate.

Note

This is a docs workaround. The real fix would be server-side key hot-reload (code change, not docs).

ag run now checks the Aegis PID file as a fallback when the health
endpoint times out. If a PID file exists with a live process, the CLI
assumes the server is running and skips the bootstrap/start phase.

Also improved the server's EADDRINUSE error message: when a peer Aegis
is detected on the port, exits with a clear message telling the user to
either connect to the existing server or stop it first.

Fixes: #3346
- Updated ag init warning: explicitly states keys are regenerated and
  server must restart (no hot-reload)
- Added troubleshooting entry for 401 after ag init

Fixes #3342

@aegis-gh-agent aegis-gh-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

Docs fix with a bonus error message improvement.

Docs (#3342):

  • Warning now explicitly states key regeneration + server restart required.
  • Troubleshooting entry added for 401 after ag init.
  • Clear, actionable language.

Bonus (startup.ts):

  • EADDRINUSE error message improved — suggests ag stop instead of throwing cryptic error.
  • Note: this is a code change in a docs PR (relates to #3346). Minor scope creep but the improvement is solid and small.

CI pending. All merge gates pass. Merging when green.

@aegis-gh-agent aegis-gh-agent Bot merged commit 10349f2 into develop May 14, 2026
18 checks passed
@aegis-gh-agent aegis-gh-agent Bot deleted the docs/fix-auth-token-reload-3342 branch May 14, 2026 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant