When a container dies unexpectedly, nothing updates the events file. The status stays 'running' forever.
Options: 1. Remove --rm and check container exit status periodically 2. Spawn background 'docker wait' process that emits event on exit 3. Wrap container command to catch exit
Probably best: after spawning container with -d, also spawn 'docker wait <id> && emit-crashed-event' in background. On normal completion, agent emits 'complete' event. On crash, the wait process detects exit and emits 'crashed' with exit code.