async def _try_store_lesson_candidates(
    suggestions: list[str],
    session_id: str,
    domain_id: str,
    cwd: str,
) -> int:
    """Persist each non-empty top_suggestion as its own lesson-candidate memory.

    Precondition: `suggestions` is generate_critique()'s top_suggestions
    list (already capped to 5 by _collect_top_suggestions).
    Postcondition: returns the count of suggestions successfully stored.
    Never raises — best-effort, same contract as `_try_store_memory`: a
    self-critique persistence failure must not fail session-end.
    """

    stored = 0
    for suggestion in suggestions:
        text = (suggestion or "").strip()
        if not text:
            continue
        try:
            args = _build_lesson_candidate_args(text, session_id, domain_id, cwd)
            result = await remember_handler(args)
            if result.get("stored"):
                stored += 1
        except Exception as e:  # noqa: BLE001 — last-resort boundary — failure is logged; degraded mode continues
            logger.debug("Failed to store lesson-candidate suggestion: %s", e)
    return stored
