# Coach sessions across slides, reloads, and course restarts

> A coach keeps one conversation for the whole course sitting, and it resumes when the learner returns to the slide.

- Plans: All plans
- Canonical: https://docs.devlin.ai/coaches/coach-sessions-and-restarts

A coach keeps one conversation going for the whole course sitting. The conversation is remembered in the host page (the Storyline player frame), so leaving the coach's slide and coming back resumes where the learner left off. A full browser reload of the course starts the coach fresh. Coach sessions work this way on every plan.

## When a coaching session ends
A session ends when a designer-defined end condition is met, in a text conversation when the coach's turn limit is reached (coaches have no turn limit unless one is set), or when the learner presses End in a voice session. In text, the coach then locks its composer and shows "This coaching session has ended." In voice, the panel shows "Session complete." Revisiting the slide in the same sitting shows the same locked state, so a return visit never looks like an unfinished conversation.

When the session ends, the coach sets its completion variable (`Coach_Complete` unless you renamed it) to true.

## Coaching again after a restart
The lock lifts automatically when the learner produces a new result for the coach to work with: they retake a linked simulation that the coach is set to debrief and finish it, or they submit to a linked evaluator whose results the coach debriefs. The coach sees the new result and starts a brand-new conversation. With a dynamic opening enabled it debriefs that result; otherwise it opens with its welcome message. Nothing needs to be configured for this.

This works in both layouts. If the coach is on its own slide, it picks up the new result the next time the slide loads. If the simulation or evaluator and the coach sit on the same slide, the coach reopens in place when the new result arrives, without a reload. Either way the coach's completion variable is set back to false when the new session opens, so course logic that reacts to a finished coaching session sees the new session as not yet complete.

If the coach is not linked to a simulation or an evaluator, there is no "new result" signal, so an ended session stays ended for that sitting. To reset it from course logic, call `restartSimulation()` from an Execute JavaScript trigger (for example on a Restart button). That helper also resets every course variable the simulations, evaluators and coach wrote in this sitting (including `Eval_Pass`, `Eval_Score` and `Eval_Feedback`), and reloads the first devlin.ai embed on the slide.

## What does not reset a coach
- **A cache-busting or session parameter on the Web Object URL.** The conversation and the ended lock are keyed by learner and coach inside the host frame, not by the URL, so changing the URL does not clear them.
- **The "reset between sims" session mode.** This mode starts a clean conversation each time a simulation begins in the course, instead of carrying the conversation across simulations (the default, "continuous"). The coach editor has no control for it; an AI tool connected through the [MCP server](https://docs.devlin.ai/integrations/mcp-server-and-ai-tool-connectors) can set it. It has no effect when no simulation runs alongside the coach, and it never clears an ended session.
