Significant-Gravitas/AutoGPT · error · HTTPException
Execution not found
Error message
Execution not found
What it means
HTTP 404 from the admin stop-execution endpoint. get_graph_executions with just graph_exec_id returned no rows, so no AgentGraphExecution with that id exists at all (unlike the requeue endpoint, no status filter applies here). The stop is never attempted.
Solutions
- Confirm the full UUID exists: check the executions list or AgentGraphExecution table.
- Paste ids programmatically (from the API/DB) rather than by hand to avoid truncation.
- Ensure you are authenticated against the same environment where the execution ran.
- If the row was deleted, no stop is needed — the executor has no record to stop.
Defensive patterns
Strategy: validation
Validate before calling
const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
if (!UUID_RE.test(executionId)) throw new Error('invalid execution id'); Type guard
function isExecutionId(id: string): boolean { return /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(id); } Prevention
- Pass execution ids programmatically, never hand-typed.
- Confirm the environment (dev/stage/prod) matches where the execution ran.
When it happens
Trigger: POST /admin/execution/stop with a malformed or non-existent execution UUID — e.g. truncated when copying, wrong environment (dev id against prod), or the execution record was deleted.
Common situations: Stopping an execution already purged by retention; using an execution id from a logs URL that was URL-encoded/truncated; copy-paste between staging and production consoles.
Related errors
- Execution not found
- Execution not found or not in QUEUED status
- Graph execution # not found.
- Agent / not found
- Graph # not found
AI-assisted analysis of Significant-Gravitas/AutoGPT@9c8bb5550f (2026-08-14).
Data as JSON: /api/errors/f0f196ac254f59b2.
Report an issue: GitHub.
Appendix: source
Thrown at autogpt_platform/backend/backend/api/features/admin/diagnostics_admin_routes.py:530
Stop a single execution (admin only).
Uses robust stop_graph_execution which cascades to children and waits for termination.
Args:
request: Contains execution_id to stop
Returns:
Success status and message
"""
logger.info(f"Admin {user.user_id} stopping execution {request.execution_id}")
# Get the execution to find its owner user_id (required by stop_graph_execution)
executions = await get_graph_executions(
graph_exec_id=request.execution_id,
)
if not executions:
raise HTTPException(status_code=404, detail="Execution not found")
execution = executions[0]
# Use robust stop_graph_execution (cascades to children, waits for termination)
await stop_graph_execution(
user_id=execution.user_id,
graph_exec_id=request.execution_id,
wait_timeout=15.0,
cascade=True,
)
return StopExecutionResponse(
success=True,
stopped_count=1,
message="Execution stopped successfully",
)
View on GitHub (pinned to 9c8bb5550f)