[Bug]: semantic memory background task crashes while running amemgym benchmark, asyncpg.exceptions.CharacterNotInRepertoireError
Describe the bug
run amemgym benchmark using memmachine semantic memory on host ai2
--env_data data/v1.base/data_u03-04.json
after test completed, look at docker logs.
although no issues reported in the test, docker logs shows 2 exceptions in semantic background task.
asyncpg.exceptions.CharacterNotInRepertoireError: invalid byte sequence for encoding "UTF8": 0x00
sqlalchemy.exc.DBAPIError: (sqlalchemy.dialects.postgresql.asyncpg.Error) <class 'asyncpg.exceptions.CharacterNotInRepertoireError'>: invalid byte sequence for encoding "UTF8": 0x00
[SQL: INSERT INTO feature (set_id, semantic_category_id, tag_id, feature, value, embedding, metadata) VALUES ($1::VARCHAR, $2::VARCHAR, $3::VARCHAR, $4::VARCHAR, $5::VARCHAR, $6, $7::JSONB) RETURNING feature.id]
[parameters: ('mem_project_set_org_AMemGym-Benchmark_project_AMemGym-ea6111dd72b24a61ae64253b57933d7f_0_46b9dd2b0ba8__', 'profile', 'Helpful User Insights', 'cultural_learning_focus and cultural_focus', 'User focuses on activities exploring Mexican cultural traditions, specifically Las Posadas and D\x00a de Los Muertos.', '[-0.005965302232652903,0.03005252033472061,0.013403095304965973,0.0073761544190347195,-0.026600727811455727,-0.037120480090379715,0.03468230739235878 ... (32365 characters truncated) ... 0.01016361452639103,0.018039731308817863,-0.028038974851369858,-0.020012184977531433,-0.018902679905295372,0.04087362065911293,-0.005239329766482115]', 'null')]
(Background on this error at: https://sqlalche.me/e/20/dbapi)
2026-02-27 00:36:02,374 [ERROR] memmachine.semantic_memory.semantic_memory - background task crashed, restarting
Steps to reproduce
how to run amemgym is in this thread
https://memverge.slack.com/archives/C0A0Z69UC8L/p1771976896651179
Expected behavior
no crash
Environment
build is 2/25 main 46d7a05