Exit Detour

Manually exit the active detour and return to the parent practice.

Mirrors the auto-exit flow in the main practice endpoint:

  • Pop detour_stack snapshot
  • Restore parent current_question / completed / skipped / observations
  • Set last_completed_detour so the NEXT turn's system prompt can inject the welcome-back augmentation
  • Clear active_detour_practice_id and pending_detour

Resolution order (first match wins):

  1. body.session_id → update that row directly (auth-independent)
  2. current_user's student → their in-progress session for this module
  3. Single incomplete session matching module_type (dev fallback)

Idempotent — returns {"exited": false} if there's no active detour.

post/api/practice/{problem_set_id}/exit-detour

Request

  • Base URL: https://api.tegore.ai (the document declares no server; this is the origin it was published from)
  • URL: https://api.tegore.ai/api/practice/{problem_set_id}/exit-detour
  • Auth: none declared

Path parameters

problem_set_idstring required

Request body

session_idstring nullable

Response

Successful Response

unknown required

Changes

No recorded changes to this operation across all 1 revision of this API.