Files
linear-coding-agent/generations
David Blanc Brioir 8153ea35a4 fix: Prevent context manager conflict in hierarchical_search
## Problem

"generator didn't stop after throw()" error when hierarchical_search
falls back to simple_search. Both functions use 'with get_weaviate_client()',
creating nested context managers on the same generator.

## Solution

- Use ValueError("FALLBACK_TO_SIMPLE") signal instead of calling simple_search()
  inside the context manager
- Catch ValueError in except block and call simple_search() outside context
- Applied to all 3 fallback points:
  1. No Weaviate client
  2. No summaries found (Stage 1)
  3. No sections after filtering

## Result

Fallback now works correctly without context manager conflicts.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-01 15:10:06 +01:00
..