trw_session_start
Restore prior learnings and active run status to start a session with full context. Use for new sessions, resuming after compaction, or recalling focused topic.
Instructions
Load prior learnings + any active run so you start with full context.
Use when:
Starting a new session (first action, before reading code or editing).
Resuming after context compaction and you need the pin and learnings reloaded.
Switching onto an unfamiliar task and want a focused recall on the topic.
Recalls high-impact learnings (patterns, gotchas, architecture decisions) and checks for an active run (phase, progress, last checkpoint). Partial-failure resilient: a failure in one sub-step does not block the others.
Input:
query: optional focus string. When set, performs a focused recall on your topic AND a baseline high-impact recall, then merges + dedupes. Empty string or "*" uses default wildcard behavior.
verbose: when False (default) returns a COMPACT payload — the learnings list is capped to the top-K most relevant (with a
learnings_omitted"N more" indicator) and the low-signal diagnostic sub-blocks (embed_health/assertion_health/sync_health/step_durations_ms) are folded into a one-linehealth_summaryto cut token cost. Run/pin recovery, errors, framework_reminder, and degraded advisories are always preserved. Set verbose=True for the full diagnostic payload (legacy behavior).
Output: SessionStartResultDict with fields {learnings: list, learnings_count: int, learnings_omitted?: int, run: RunStatusDict, auto_recalled?: list, health_summary?: str (compact), embed_health?: dict (verbose), assertion_health?: dict (verbose), framework_reminder: str, errors: list, success: bool, compact: bool, payload_token_estimate: int}.
Example: trw_session_start(query="sqlite extension macos") → {"learnings": [...], "learnings_count": 8, "compact": true, "health_summary": "embed=ok; start=42ms (verbose=True for ...)", "run": {"active_run": "/path/...", "phase": "IMPLEMENT"}, ...}
See Also: trw_init, trw_recall
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | ||
| verbose | No |