Skip to content

fix(evals): Drop the session affinity header before Roach - #2636

Closed
sentry-junior[bot] wants to merge 1 commit into
mainfrom
fix/evals-drop-session-affinity
Closed

sentry-junior[bot] wants to merge 1 commit into
mainfrom
fix/evals-drop-session-affinity

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Since #2590, Junior sends the Conversation ID to AI Gateway in x-session-affinity. Roach treats every header whose name contains session as a credential (CREDENTIAL_HEADER in getsentry/roach src/secrets.ts). It redacts the header value in the response that the client gets (src/recorder.ts: "The client gets the redacted response too"). So when a model names a child agent's Conversation ID, the agent gets <<redacted>> instead.

That is why subagents.eval.ts › "when a child agent is no longer needed, stop it without a result turn" has failed on every run of integration shard 2 since #2590 landed. In run 41728176957, the model called stopAgent twice with conversation_id: "<<redacted>>", and both calls failed with <<redacted>> is not a child agent. A third call passed only because the model built the ID in codemode as "agent:" + "212aaafa…".

The eval AI Gateway dispatcher now removes the header from requests. AI Gateway uses this header only to group requests, and model-message-history.test.ts still checks that the product sends it.

Still open: handoff.eval.ts › "when the turn hands off, do the new request" has also failed since the same range (4e14179..89f35a0). This change does not fix it. In the failing run, the reranker was called once, and after the handoff the model ran bash and added no reaction. The "gut check" memory forbids both. This suggests that the reranker threshold in #2585 (0.55) dropped the memory, but nobody has confirmed it. Confirming it needs a live rerank score for that query.

via @dcramer.

--

View Session [Sentry]

Since #2590, Junior sends the Conversation ID to AI Gateway in
x-session-affinity. Roach takes each header whose name has "session" as a
credential and redacts its value in the response that the client gets. A
model call that names a child agent's Conversation ID then got
<<redacted>>, so stopAgent failed with "<<redacted>> is not a child agent"
in the subagents integration eval.

The eval AI Gateway dispatcher now drops the header. AI Gateway only groups
requests by it.

Co-Authored-By: David Cramer <23610+dcramer@users.noreply.github.com>
@vercel

vercel Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
junior-docs Ready Ready Preview Nov 3, 2026 10:46pm UTC

Request Review

This branch was successfully deployed

1 active deployment
Preview – junior-docs — ab98cce3 Deployed Nov 3, 2026 by vercel[bot]
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