# Upgrade Guide — vNEXT

<!-- assembled-by: assemble-next-md -->
<!-- bump: patch -->

## What to Tell Your User

If your agent mentors another agent, its check-in messages no longer give away code
locations — it guides the mentee on what to verify and lets it find the where on its
own. Nothing to configure.

## Summary of New Capabilities

- The mentor Stage-A compose prompt (buildStageAContext) now explicitly instructs
  the compose model never to name source paths, file names, line numbers, PR or
  issue numbers, or commit hashes — only what to check, not where. This prevents the
  recurring two-hats leak finding at its source. The leak detector, the empty tool
  grant, and the spawn path are all unchanged.

## Evidence

- Found by the mentorship loop's own leak detector: a recurring stage-a-leak finding
  (high impact score) fired on nearly every live mentor tick while driving the codex
  mentee.
- Verified against the composed prompts: the compose model added where-in-the-code
  hints (source folders) when assigning tasks, which the detector flags. The
  existing no-internals preamble was too soft to stop it.
- The fix adds one targeted instruction to the compose prompt; the leak detector is
  untouched and still catches any residual leak.
- Unit test, tests/unit/MentorStageA.test.ts: the composed prompt contains the
  no-leak instruction; the existing compose, detector, and canary tests stay green.

## What Changed — The mentor stops handing the mentee answers in its check-in messages

If you run your agent as a mentor to another agent, it composes its check-in
messages using only what a real user would see — it is not supposed to peek at the
mentee's code and feed it answers, so the mentee discovers things itself. There is
an automatic detector that flags it whenever the mentor's message names something a
blind user could not know, like a source folder, a file, a line number, or a
pull-request number.

In real mentoring that detector kept flagging a leak on almost every check-in: when
the mentor's AI assigned a task, it would helpfully add where in the code to look —
from general knowledge, not by reading the mentee's internals, but still handing
over the answer. We added one clear instruction telling the mentor to say what to
check, not where in the code to look. The mentor stays useful and the leak stops at
the source. The detector itself is unchanged, so it still catches anything that
slips through.
