Skip to content

Interactions API: September Antigravity background jobs return 200/in_progress then persistent GET 404; foreground works #2985

Description

@richddr

Summary

Gemini Developer API accepts antigravity-preview-09-2026 background interactions (200, in_progress) but GET of the exact returned interaction ID repeatedly returns 404 not_found. This reproduces with direct REST, independently of the Python SDK. Filing here for Interactions API triage, where related API issue #1971 is tracked; please redirect if there is a more appropriate tracker.

Observed September 17–18, 2026. The May-based custom agent remains retrievable using the same credentials. The September predefined agent and September-based custom agents both reproduce the failure. This blocks migration ahead of the documented October 5 retirement of the May harness.

Environment

  • Python 3.13 / requests 2.32.5 on Linux ARM64; no google-genai SDK or IDE involved.
  • https://generativelanguage.googleapis.com/v1beta/interactions
  • API-key authentication; Api-Revision: 2026-05-20.
  • environment: "remote", tools: [], store: true.
  • Minimal connectivity prompt, no user data, files, MCP or custom credentials.
  • GET was tested with and without Api-Revision, with the same result.

Results

Invocation Result Subsequent GET
September predefined, background=true POST 200/in_progress Repeated 404
September custom, background=true POST 200/in_progress Repeated 404
May custom, background=true, same key/model POST 200/in_progress 200; separate normal-input control completed
September predefined, background=false Completed with expected JSON 200
September predefined, background=false, stream=true Completed with expected JSON 200
September custom quantitative role, background=false Completed; application schema/reference validation passed 200
September predefined, background=true, stream=true, stream kept open Completed with expected JSON 200
September custom discovery role, background=true, stream=true, closed after created/in_progress event Five subsequent polls All 404

The last two rows use different agent definitions, so they do not isolate disconnect as the sole cause. Foreground custom output validation covered one role, not an entire production workflow.

Polling included successive delays 0/2/5/10 seconds; an earlier separate probe used 1/2/4/8/16 seconds (31 seconds plus request latency). The disconnected custom job used 0/2/3/5/10 seconds. No polls were made after cancellation/deletion when measuring the failure. Diagnostic interactions were subsequently deleted successfully.

GET error:

{"error":{"code":"not_found","message":"Requested entity was not found."}}

For affected jobs POST /interactions/{id}/cancel returned 400 invalid_request: "There was a problem processing your request. You will not be charged." DELETE returned 200. We have not independently verified billing. This is distinct from the cancellation endpoint issue #1971.

Minimal reproduction

Requires Python and requests. Set GEMINI_API_KEY privately in the environment;
do not paste it into the script or an issue. This creates one remote interaction
and may incur usage. It attempts cancellation and deletion in finally.

import os
import time
import requests

root = "https://generativelanguage.googleapis.com/v1beta"
headers = {
    "x-goog-api-key": os.environ["GEMINI_API_KEY"],
    "Content-Type": "application/json",
    "Api-Revision": "2026-05-20",
}
interaction_id = None

with requests.Session() as session:
    try:
        created = session.post(
            f"{root}/interactions",
            headers=headers,
            json={
                "agent": "antigravity-preview-09-2026",
                "input": 'Return only {"ok":true}. This is an API connectivity test; perform no research.',
                "environment": "remote",
                "tools": [],
                "background": True,
                "store": True,
            },
            timeout=45,
        )
        print("CREATE HTTP", created.status_code)
        created.raise_for_status()
        initial = created.json()
        interaction_id = initial["id"]
        print("ID", interaction_id, "INITIAL STATUS", initial.get("status"))

        for delay in (0, 2, 5, 10):
            time.sleep(delay)
            for include_revision in (True, False):
                poll_headers = dict(headers)
                if not include_revision:
                    poll_headers.pop("Api-Revision")
                fetched = session.get(
                    f"{root}/interactions/{interaction_id}",
                    headers=poll_headers,
                    timeout=20,
                )
                print("GET HTTP", fetched.status_code,
                      "revision_header", include_revision)
                if fetched.ok:
                    print("STATUS", fetched.json().get("status"))
    finally:
        if interaction_id:
            # Attempt deletion even if cancellation fails.
            for method, suffix in (("POST", "/cancel"), ("DELETE", "")):
                try:
                    result = session.request(
                        method,
                        f"{root}/interactions/{interaction_id}{suffix}",
                        headers=headers,
                        timeout=20,
                    )
                    print(method, suffix or "interaction", "HTTP", result.status_code)
                except requests.RequestException as exc:
                    print("Cleanup exception", type(exc).__name__)

For the tested control, replace the agent value with an existing registered
custom agent based on the May harness and configured with gemini-3.8-flash.
No retry creates a replacement job in this reproduction.

Example interaction IDs for backend investigation

Diagnostic resources were deleted after testing; these IDs are for backend logs, not currently retrievable resources.

  • September background predefined (Sept 18 ~22:31 Eastern): v1_ChZ4dk90YW9DOERyWG96N0lQdXJPOENBEhZ4dk90YW9DOERyWG96N0lQdXJPOENB
  • September background custom: v1_Chd4dk90YW9mLUdjR0txdHNQeExxUjZBRRIXeHZPdGFvZi1HY0dLcXRzUHhMcVI2QUU
  • Successful September synchronous: v1_ChdxUE90YXJMRUxKYnJ6N0lQaC1mb29BbxIXcVBPdGFyTEVMSmJyejdJUGgtZm9vQW8
  • Successful September custom synchronous: v1_ChctX090YXZEQUNKYWlxdHNQczVLQzJRSRIXLV9PdGF2REFDSmFpcXRzUHM1S0MyUUk
  • Background custom, stream disconnected while in_progress (Sept 19 ~02:50 UTC): v1_ChdDZml0YXVPbkNjTFV6N0lQekl2S3NRSRIXQ2ZpdGF1T25DY0xVejdJUHpJdktzUUk

Expected behavior

Once creation accepts a stored interaction, GET should return its state, including a structured terminal failure if initialization fails. It should not repeatedly report a missing entity. Please investigate whether this is a background execution/persistence regression, account-specific rollout issue, or an undocumented request requirement. We cannot establish the internal root cause from these responses.

Keeping a foreground stream open works in our bounded tests, but reliable background polling and reconnect are still needed for longer research jobs. Are there supported workarounds?

References:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions