Fix empty run_id on sandbox events in progress.jsonl

The JSONL listener's run_id was initialized to "" and only populated
when WorkflowRunStarted fired, but sandbox events emit before that.
Seed it with the already-generated ULID so all events carry the run_id.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Bryan Helmkamp 2026-03-14 15:00:40 -04:00
parent e6f59cf426
commit 6db816e8b3
No known key found for this signature in database

View file

@ -507,7 +507,7 @@ pub async fn run_command(
{
let jsonl_path = run_dir.join("progress.jsonl");
let live_path = run_dir.join("live.json");
let run_id = Arc::new(Mutex::new(String::new()));
let run_id = Arc::new(Mutex::new(run_id.clone()));
let run_id_clone = Arc::clone(&run_id);
emitter.on_event(move |event| {
if let crate::event::WorkflowRunEvent::WorkflowRunStarted { run_id, .. } = event {