feat(agents): name sessions in LangWatch, and stagger boot launches off the credential race - #150
Merged
rogeriochaves merged 2 commits intoAug 19, 2026
Conversation
…ff the credential race Every launched agent's tmux env now carries LANGWATCH_SESSION_TITLE with its slug. The LangWatch capture seams post it as the explicit session title, so the sessions screen reads "pr-reviewer" instead of the first line of the scripted daily greeting, for claude and codex both. Reconcile also staggers real launches. Twelve claude agents resuming in the same second after a boot all saw an expired OAuth token, all raced the refresh, and rotation let one win: the other eleven came up "Login expired" and sat dead until relaunched by hand. The first launch now gets a 20 s window to refresh and write the new token pair; the rest read a fresh token and never refresh. Agents whose tmux session is already alive cost no wait, so a routine reconcile stays instant. Claude-Session: https://claude.ai/code/session_01BUKKUiZbSBHmrLK9JJj4Ba
… env var The LangWatch capture now mirrors the name the harness itself holds, so the LANGWATCH_SESSION_TITLE env var is retired before anything shipped reads it. Fresh launches already passed --name <slug>; resumes now pass it too, so sessions created before naming existed pick their slug up on the next boot. Claude-Session: https://claude.ai/code/session_01BUKKUiZbSBHmrLK9JJj4Ba
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two agents-fleet fixes, both from this morning's boot incident on the agents box.
Session names. No custom env var: claude is named through its own
--nameflag. Fresh launches already passed--name <slug>; resumes now pass it too, so sessions created before naming existed pick their slug up on the next boot. The LangWatch capture (langwatch#7197) mirrors the name the harness itself holds, including a mid-session/rename, so the sessions screen reads "pr-reviewer" / "kanban-keeper" instead of thirteen rows of "Good morning. Use the ... skill".Boot stagger. Twelve claude agents resuming in the same second after a boot all saw an expired OAuth access token, all raced the refresh, and refresh-token rotation let exactly one win. The other eleven came up "Login expired · Please run /login" and sat dead until relaunched by hand. Reconcile now gives the first real launch a 20 s window to refresh and write the new token pair; every later launch reads a fresh token and never refreshes, with a 3 s gap between them. The gap trails a real launch, so a reconcile over a fleet whose sessions are all alive spends no time waiting.
Verification
npm run buildclean,npm test324 pass.