Skip to content

Agent name is not configurable: dashboard hardcodes "Junior", and the Slack router prompt contradicts its own botUserName parameter #1066

Closed

Description

@sergical

Reported from getsentry/marky, a downstream junior consumer whose agent is named Marky. There is currently no way to make a consumer's agent name appear in the dashboard, and one hardcoded string is a functional prompt bug rather than a cosmetic one.

Verified against both 0.109.0 and latest 0.115.0 — all findings below reproduce on 0.115.0.

1. Slack router prompt contradicts itself (functional, not cosmetic)

buildRouterSystemPrompt(botUserName) in @sentry/junior already receives the bot name, but uses it only in a trailing tag while 13 instruction lines hardcode "Junior":

function buildRouterSystemPrompt(botUserName) {
  return [
    "You are a message router for a Slack assistant named Junior in a subscribed Slack thread.",
    "Decide whether Junior should reply to the latest message.",
    "Reply true only when the latest message is aimed at Junior.",
    "If Junior was the last speaker, only a clear turn back to Junior should count as an implicit follow-up.",
    // ... 9 more lines naming "Junior" ...
    `<assistant-name>${escapeXml(botUserName)}</assistant-name>`   // <-- the only use
  ].join("\n")
}

For Marky the router model is told the assistant is named Junior 13 times, then handed <assistant-name>marky</assistant-name>. The model is asked to reason about whether a message is "aimed at Junior" while the actual Slack participant is @marky.

Impact: degraded implicit follow-up detection and should_unsubscribe accuracy in subscribed threads — exactly the judgments this prompt exists to make. Marky's routing thresholds (0.65–0.9 confidence) make it sensitive to this kind of ambiguity.

Fix: interpolate the parameter that is already in scope. Self-contained to one function.

2. The dashboard has no agent-name configuration hook at all

@sentry/junior-dashboard contains 15 distinct user-facing strings hardcoding "Junior" in the client bundle, including the two most prominent failure messages:

  • "The model response ended before Junior could complete this turn." (shown under the title "Agent response failed")
  • "Junior could not deliver this message to its destination."

plus navigation and page copy: "Junior home", "Junior's engine room", "Junior is responding", "Daily Junior conversation activity", "Where Junior's working", "Showing the last operational reports Junior received.", "A live read on Junior's runtime, …", "Junior failed to render", and others.

There is no configuration path to change any of them:

dashboardConfigSchema (dist/api/schema.d.ts) has no agent/bot name field in either 0.109.0 or 0.115.0:

allowedEmailCount, allowedGoogleDomainCount, authRequired, authPath,
basePath, componentGallery, sentryConversationLinks, timeZone

assistantLabel is dead plumbing. ConversationTranscript.assistantLabel?: string is read in exactly two places as t.assistantLabel ?? "Junior" but is never populated by any junior package — the identifier does not appear anywhere in core 0.115.0. So the fallback is always taken. A third label path (gXt in the minified bundle) returns bare "Junior" with no assistantLabel check at all.

JUNIOR_BOT_NAME does not help. It resolves to botConfig.userName (toOptionalTrimmed(env.JUNIOR_BOT_NAME) ?? "junior"), which only drives Slack mention-by-name stripping and the assistantUserName telemetry attribute. It never reaches the dashboard.

Suggested direction

  1. Interpolate botUserName throughout buildRouterSystemPrompt (smallest, highest-value fix).
  2. Add the agent name to dashboardConfigSchema, sourced from botConfig.userName, and populate assistantLabel from it so the existing read sites start working.
  3. Template the remaining dashboard copy on that value, and give the third label path the same fallback as the other two.

Already fixed upstream, for reference

The OAuth-callback copy that hardcoded "Junior" ("ask Junior to connect your ${providerLabel} account again", "Junior will continue the paused request in Slack.") was present in 0.109.0 and is gone in 0.115.0 — so some of this surface has already been cleaned up.

Environment

  • Downstream consumer: getsentry/marky (JUNIOR_BOT_NAME=marky)
  • Verified on @sentry/junior / @sentry/junior-dashboard 0.109.0 and 0.115.0
  • No existing issue found for this (searched open + closed)

Activity

  1. added a commit that references this issue on Aug 5, 2026
    a9de226
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions