I think maybe we should disallow concurrent runs
# proj-automation
w
I think maybe we should disallow concurrent runs
would also be nice to have a "cancel" button
hmm this might be the bug:
Crashes report as
RUNNING
, not
FAILED
.
The import blew up before
fire_callback
, so seven runs are still hung open and only one recorded a failure.
l
@fresh-machine-37269 check if we have issues open on the automation repo about all of these comments and if not examine the code base together Fuller context about a possible solution and open an issue
👀 1
f
🤖 On it! View progress here: oss-agent-canvas.ngrok.dev/conversations/…
l
But actually Robert I think we don't want to disable concurrent runs because that would make it impossible to have things like good PR reviewer?
w
ooh good point
maybe concurrent cron runs?
not sure
you can definitely end up with a thundering herd problem if you have concurrency on by default, without a max
e.g. maybe every cron is accessing a rate-limited API, so every one that spins up puts more pressure on, slowing all the others down
f
✅ Done! Checked the OpenHands/automation repo — here's where each comment lands: 1. "Disallow concurrent runs" — already tracked: ◦ #218 "Add a minimal per-automation overlap guard (skip when a run is already in-flight)" (open) ◦ #72 "Implement hierarchical concurrency limits for automation runs" (open) 1. "Would be nice to have a cancel button" — already tracked: ◦ #154 "Add API and UI support to cancel automation runs" (closed — the API endpoint
POST /runs/{run_id}/cancel
exists; UI may already be covered by that work) 1. "Crashes report as RUNNING, not FAILED — import blew up before fire_callback, seven runs hung open, only one recorded failure" — not covered, so I opened a new issue. I traced the code: in
presets/prompt/sdk_main.py
and
presets/plugin/sdk_main.py
, the completion callback is only sent by the workspace context manager's
__exit__
. Everything before the
with workspace_ctx as workspace:
block — the
from openhands.sdk import ...
at line 132/128 and the
sys.exit(1)
calls for missing env vars / invalid
WORKSPACE_BASE
— exits with no callback. The run then sits
RUNNING
until the watchdog times it out (~10min + margin) before marking it FAILED. New issue opened: #406 — "Preset entrypoint crashes before the workspace context never fire the completion callback — runs hang in RUNNING instead of FAILED" github.com/OpenHands/automation/issues/406 It proposes: (a) POST a FAILED callback on early exits (mirroring
__exit__
), (b) defer the SDK imports into the workspace context, and (c) an optional service-side short probe to detect finished-but-uncall'd commands sooner. Related issues #203 (hard SIGTERM kills) and #337 (ephemeral bash_events) are cross-referenced. This reply was generated by an AI agent (OpenHands) on behalf of the user.