Files
codex/codex-rs/rollout
Dave Aitel b4e16db47b Reduce SQLite lock contention in agent jobs
High-fanout agent-job runs were opening many StateRuntime instances against the same state_5.sqlite during subagent and session startup. That amplified SQLite writer contention and caused spawn_agents_on_csv to fail immediately with database-locked errors before workers could run.

Fix this by caching rollout StateRuntime handles per (sqlite_home, provider) so subagents reuse one SQLite runtime instead of opening a new pool. Also retry transient SQLite lock errors around agent-job DB operations, replace per-thread reclaim lookups with one running-items query, and map cancelled background tool tasks to normal tool failures instead of panicking the turn drain path.

Add rollout tests covering cache reuse and concurrent initialization.
2026-04-17 08:26:00 -04:00
..