fix: surface configured sandbox mounts to agents (#1638)

* fix: surface configured sandbox mounts to agents

* fix: address PR review feedback

---------

Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
This commit is contained in:
Admire
2026-03-31 22:22:30 +08:00
committed by GitHub
parent 3ff15423d6
commit aae59a8ba8
8 changed files with 93 additions and 2 deletions
@@ -81,7 +81,9 @@ class RunManager:
async def list_by_thread(self, thread_id: str) -> list[RunRecord]:
"""Return all runs for a given thread, newest first."""
async with self._lock:
return list(reversed([r for r in self._runs.values() if r.thread_id == thread_id]))
# Dict insertion order matches creation order, so reversing it gives
# us deterministic newest-first results even when timestamps tie.
return [r for r in reversed(self._runs.values()) if r.thread_id == thread_id]
async def set_status(self, run_id: str, status: RunStatus, *, error: str | None = None) -> None:
"""Transition a run to a new status."""