brain_session_end
Close an active session by supplying a summary and next focus; reports unattributed artifacts created during the session.
Instructions
End a session from an explicit user command, on judgement alone.
nothing_to_capture_reason is now OPTIONAL. The old rule — a non-empty
ledger XOR a written reason — measured whether the client had DECLARED
its work. Derived capture feeds that signal from the server, and a check
is hollow the moment the thing it checks can influence its own signal;
worse, it made a session whose ledger the server had filled impossible
to close. Give a reason if you have one to give; a blank one is still
refused, because saying nothing and saying " " are not the same act.
What end still requires is what the server cannot produce for you:
a summary and a next focus. It REPORTS unattributed_in_window —
artifacts of this project created during the session that belong to no
ledger — as a measure, never a gate. It cannot refuse a close, and a
session cannot improve it by doing nothing.
An agent tracer is the only session the server opens or closes on its own; no hook and no auto-close may invoke this lifecycle boundary.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| summary | Yes | ||
| next_focus | Yes | Jugement et engagements pour la session suivante — ce qui n'est pas dérivable automatiquement (ex : ne pas publier ce brouillon et pourquoi, une échéance et sa raison, une décision opérateur à respecter). N'y recopie pas l'état mesurable (révision de schéma, HEAD git, arbre propre, résultat de suite de tests) : il est déjà recalculé à chaque briefing depuis la source réelle, et une copie manuelle se périme en silence. | |
| session_id | Yes | ||
| expected_client_key | Yes | Client identity expected for the addressed session UUID. The pair must match before any session mutation. This is an isolation guard, not authentication. | |
| expected_focus_revision | Yes | ||
| nothing_to_capture_reason | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session | Yes | Persistent state of one explicitly controlled concurrent session. | |
| replayed | Yes | ||
| focus_diff | No | ||
| focus_at_end | Yes | ||
| current_focus | Yes | ||
| focus_outcome | Yes | Persisted outcome of the one focus update attempted while ending. | |
| focus_revision_at_end | No | ||
| current_focus_revision | Yes | ||
| unattributed_in_window | Yes | ||
| remaining_open_session_count | Yes |