langchain-ai/deepagents · error · RuntimeError
Offload result has no status.
Error message
Offload result has no status.
What it means
After confirming the offload result is a dict, `_validated_offload_result` requires a non-empty string `status` field; a missing, `None`, empty, or non-string `status` raises `RuntimeError` with this message. The status drives downstream handling (e.g. `compacted` vs failed), so an absent status makes the result unusable.
Source
Thrown at libs/code/deepagents_code/client/remote_client.py:137
`KeyError` reported as a generic reporting failure for an offload the server
already committed.
Args:
result: The `result` object from a `complete` operation response.
Returns:
The same mapping, once its required fields are known to be present.
Raises:
RuntimeError: If a required field is missing or has the wrong type.
"""
if not isinstance(result, dict):
msg = "Offload server completed without a typed result."
raise RuntimeError(msg) # noqa: TRY004 # protocol fault, not a type misuse
status = result.get("status")
if not isinstance(status, str) or not status:
msg = "Offload result has no status."
raise RuntimeError(msg)
# Statistics are only meaningful (and only read) for a committed compaction.
if status == "compacted":
for field in _OFFLOAD_RESULT_INT_FIELDS:
value = result.get(field)
if not isinstance(value, int) or isinstance(value, bool):
msg = (
f"Offload result field {field!r} must be an integer, got "
f"{type(value).__name__}."
)
raise RuntimeError(msg) # noqa: TRY004 # protocol fault
return cast("OffloadResult", result)
def _require_thread_id(config: Mapping[str, Any] | None) -> str:
"""Extract and validate that `thread_id` is present in config.
Args:
config: Config dict with `configurable.thread_id`.View on GitHub (pinned to a1af029e6e)
Solutions
- Update the server (or client) so both sides agree the response includes a non-empty `status` string.
- Check server logs for the code path that produced the result without a status.
- Capture and inspect the full JSON response to confirm which field is missing/renamed.
- Retry the offload after fixing; report persistent cases as a protocol bug.
Example fix
// before: status omitted on failure path
return {"error": err}
// after: always include status
return {"status": "failed", "error": err} Defensive patterns
Strategy: validation
Validate before calling
def has_status(result: dict) -> bool:
status = result.get("status")
return isinstance(status, str) and status != ""
# check before consuming the result
if not has_status(result): request_missing_status_from_server() Type guard
def has_status(result: object) -> TypeGuard[dict]:
return isinstance(result, dict) and isinstance(result.get("status"), str) and bool(result["status"]) Try / catch
try:
result = await aoffload(...)
except RuntimeError as exc:
if "has no status" in str(exc):
log_payload(result_if_any) # server omitted/renamed status; align schemas Prevention
- Always include a non-empty `status` on every server response path, including failures
- Watch for renames of the `status` field during schema changes
- Contract-test the offload response schema
When it happens
Trigger: The offload server's completed response dict lacks `status`, or contains `""`/`null`/a non-string value, when `aoffload` validates the result.
Common situations: Server bug omitting the field on some code path; partial schema change where status was renamed; intermediary truncating JSON; mismatched client/server versions.
Related errors
- Offload server completed without a typed result.
- Offload server returned an invalid cancellation acknowledgem
- Offload result field {field!r} must be an integer, got {type
- Offload server returned a non-object response.
- Offload server returned an invalid operation response.
AI-assisted analysis of langchain-ai/deepagents@a1af029e6e (2026-08-29).
Data as JSON: /api/errors/694581fcd8199b77.
Report an issue: GitHub.