Skip to content
Tools/Context & Session/update_session_context

update_session_context

Update session context: register a skill invocation, record a recommendation, set focus area, switch lens, or store custom state for cross-skill coordination.

Context & Sessionnon-atomic. Session mutates in-memory immediately; lens persistence flushes the .upg file as a separate side-effect that may succeed or fail independently of the session update.

Arguments

skill_invokedstringoptional

Register that this skill was just invoked (e.g. "upg-status")

recommendationstringoptional

Record a recommendation given to the user (e.g. "Run /upg-strategy to fill strategy gap")

focus_areastringoptional

Set the current focus area (e.g. "strategy", "validation", "user_research")

lensstringoptional

Switch the active lens. Changes what context, skills, and gaps are surfaced first.

productengineeringdesigngrowth
persist_lensbooleanoptional

If true, also save the lens to the .upg file so it persists across sessions

customobjectoptional

Arbitrary key-value pairs for cross-skill state

Returns

Shape
{ updated: true, session: SessionContext }

reflecting the new state.

Examples

Live call against the Notion example graph.

Output

{
  "updated": true,
  "session": {
    "lens": "product",
    "skills_invoked": [],
    "recommendations_given": [],
    "focus_area": null,
    "custom": {}
  }
}

See Also