Significant-Gravitas/AutoGPT · error · HTTPException
Graph execution #{graph_exec_id} not found.
Error message
Graph execution #{graph_exec_id} not found. What it means
Raised (HTTP 404) by the external get-graph-execution endpoint when `execution_db.get_graph_execution(user_id, execution_id, include_node_executions=True)` returns nothing — no execution with that id is visible to the API key's user. Ownership is enforced inside the DB query, so other users' executions look identical to nonexistent ones. (A second 404, `Graph #{graph_id} not found.`, fires when the execution exists but the caller-supplied graph_id doesn't match it.)
Source
Thrown at autogpt_platform/backend/backend/api/external/v1/routes.py:279
@v1_router.get(
path="/graphs/{graph_id}/executions/{graph_exec_id}/results",
tags=["graphs"],
)
async def get_graph_execution_results(
graph_id: str,
graph_exec_id: str,
auth: APIAuthorizationInfo = Security(
require_permission(APIKeyPermission.READ_GRAPH)
),
) -> GraphExecutionResult:
graph_exec = await execution_db.get_graph_execution(
user_id=auth.user_id,
execution_id=graph_exec_id,
include_node_executions=True,
)
if not graph_exec:
raise HTTPException(
status_code=404, detail=f"Graph execution #{graph_exec_id} not found."
)
if not await graph_db.get_graph(
graph_id=graph_exec.graph_id,
version=graph_exec.graph_version,
user_id=auth.user_id,
):
raise HTTPException(status_code=404, detail=f"Graph #{graph_id} not found.")
return GraphExecutionResult(
execution_id=graph_exec_id,
status=graph_exec.status.value,
nodes=[
ExecutionNode(
node_id=node_exec.node_id,
input=node_exec.input_data.get("value", node_exec.input_data),
output={k: v for k, v in node_exec.output_data.items()},View on GitHub (pinned to 9c8bb5550f)
Solutions
- Use the execution id returned by the execute endpoint (`{"id": ...}`) exactly, and the graph id that created it.
- List executions for the graph to discover valid, retained execution ids.
- Confirm the API key belongs to the user who started the execution.
- If executions were pruned by retention, restart the graph run to produce a fresh execution.
Example fix
# before: swapped ids
GET /graphs/{execution_id}/executions/{graph_id} # 404
# after
run = POST /graphs/{graph_id}/executions
GET /graphs/{graph_id}/executions/{run.id} Defensive patterns
Strategy: validation
Validate before calling
run = client.post(f"/graphs/{graph_id}/executions", json=payload).json()
exec_id = run["id"] # always use the id returned by the execute endpoint
# poll only this id, and keep graph_id from the same call
client.get(f"/graphs/{graph_id}/executions/{exec_id}") Try / catch
try:
client.get(f"/graphs/{graph_id}/executions/{exec_id}")
except HTTPError as e:
if e.response.status_code == 404:
execs = client.get(f"/graphs/{graph_id}/executions").json() # re-discover valid ids
if exec_id not in {x["id"] for x in execs}:
log("execution pruned or owned by another user")
raise Prevention
- Persist the execution id returned by the execute endpoint; never derive ids by hand.
- Keep (graph_id, execution_id) pairs together — the GET checks both match.
- Use the same API key (same user) that started the execution when polling.
When it happens
Trigger: GET `/api/external-api/v1/graphs/{graph_id}/executions/{graph_exec_id}` with a typo'd/deleted execution id, an execution owned by another user, or a graph_id that doesn't match the execution's actual graph/version.
Common situations: Polling an execution id after it was pruned/retention-expired; mixing ids between environments (staging vs prod); passing the graph id where the execution id belongs or vice versa; version skew after re-uploading a graph (old executions reference old versions invisible to the current graph lookup).
Related errors
- Provider '{provider}' not found
- Block #{block_id} not found.
- Graph #{graph_id} not found.
- Agent #{graph_id} v{graph_version} not found for this user (
- Agent graph #{graph_id} not found
AI-assisted analysis of Significant-Gravitas/AutoGPT@9c8bb5550f (2026-08-14).
Data as JSON: /api/errors/8fe4a3e7cea27ef8.
Report an issue: GitHub.