Greet a manager in team mode instead of a new hire - #199
Merged
LinseCed merged 1 commit intoSep 21, 2026
Merged
Conversation
The open endpoint knew one reader. A manager opening team mode was welcomed back to their own onboarding and told their team's stalls as if they were theirs, because STATE is the team's attention list and the prompt describes it as the reader's own work in flight. `team_mode` on the open request picks a team system prompt and a team fallback greeting. It says who is reading, that STATE is about other people, that a situation is a fact rather than a judgment of the person, and that the suggested step is a question a manager would ask about their team. The two-part marker format is deliberately identical, so the marker, the held-back suffix and the done payload stay one code path: a second format here would be a second parser to keep in step with this one. The hire prompt and its fallback are unchanged. Closes #194 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Afif-del
approved these changes
Sep 20, 2026
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.
Related issue
#194. Stacked on #198: the base is
feature/193-buddy-mode-persona, so this diff is only the greeting. Retarget todevonce #198 is merged.Short summary
The open endpoint knew one reader. A manager opening the buddy in team mode was welcomed back to their own onboarding and told their team's stalls as though they were theirs, because
STATEis the team's attention list while the prompt describes it as the reader's own work in flight.team_modeon the open request picks a team system prompt and a team fallback greeting.Checks
uv run ruff check .cleanuv run ruff format --check .cleanuv run pyright src/— 0 errorsuv run pytest— 903 passed, 8 skippedsprintstart-backend#230–#233) with a real manager accountAdditional notes
What changes
BuddyOpenRequestgainsteam_mode: bool = False, documented in the OpenAPI description, andstate's description now says what it holds in team mode.stream_session(..., team_mode=False)picks the system prompt and the fallback; nothing else in it branches._TEAM_STREAM_SYSTEM: the reader manages one project and is not being onboarded;STATEis the team's attention list and is about other people; greet briefly and say the one thing most worth their attention, grounded only inSTATEandMEMORY; a person's situation is a fact about that situation, never a judgment of them; the suggested step is a question a manager would ask about their team, never about their own work._TEAM_FALLBACK_GREETINGreplaces the hire's welcome when the model is unavailable or writes nothing.Decisions worth arguing with
The two-part marker format is identical, deliberately. The marker, the held-back partial-marker suffix and the
donepayload are subtle enough once. A team greeting with its own shape would be a second parser to keep in step with this one, so team mode swaps only the prompt and the fallback, and the tests assert the split-marker anddone-equals-tokens behaviour again in team mode.The fallback is per mode because it is the one greeting guaranteed to be read whole. When the model is down there is nothing else on the page, which is the worst place for "welcome back to your onboarding" to be the only sentence a manager sees.
The hire prompt is untouched. Byte-for-byte, with a test that the default path still says "greeting a new hire" and never mentions a manager.
Live behaviour
Opening team mode against the backend, before and after:
🤖 Generated with Claude Code