personal memory agent
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix uncaught ObservationNumberError in entities CLI

The observe command only caught ValueError but add_observation can
raise ObservationNumberError (a direct Exception subclass). Added
the import and catch so concurrent writes produce a clean error
instead of a traceback.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

+6 -2
+6 -2
apps/entities/call.py
··· 16 16 from think.entities.core import is_valid_entity_type 17 17 from think.entities.loading import load_entities 18 18 from think.entities.matching import resolve_entity, validate_aka_uniqueness 19 - from think.entities.observations import add_observation, load_observations 19 + from think.entities.observations import ( 20 + ObservationNumberError, 21 + add_observation, 22 + load_observations, 23 + ) 20 24 from think.entities.saving import save_entities 21 25 from think.utils import now_ms 22 26 ··· 285 289 286 290 try: 287 291 add_observation(facet, resolved_name, content, observation_number, source_day) 288 - except ValueError as exc: 292 + except (ValueError, ObservationNumberError) as exc: 289 293 typer.echo(f"Error: {exc}", err=True) 290 294 raise typer.Exit(1) 291 295