I have multiple Deep Research jobs stuck with status=in_progress. we are passing the multiple hour mark. Same prompt works in the chat interface. Not sure what to do. This is an amazing service, I really don’t want to have to write my own research agent. Any ideas?
Hi
Could you provide more details about this
- What model are you using ?
- Code snippet if possible
I am having the exact same issue all day, almost 100 queries have been stuck in progress
Looking into this , will keep you posted
Code snippet — run_deep_research() from workers/services/llm_client.py:
from google import genai
Agent and polling constants
_DEEP_RESEARCH_AGENT = “deep-research-pro-preview-12-2025”
_DEFAULT_POLL_INTERVAL = 10.0 # seconds between polls
_DEFAULT_MAX_WAIT = 3600.0 # 1 hour timeout
async def run_deep_research(
prompt: str,
*,
poll_interval_seconds: float = _DEFAULT_POLL_INTERVAL,
max_wait_seconds: float = _DEFAULT_MAX_WAIT,
resume_interaction_id: str | None = None,
) → DeepResearchResult:
client = genai.Client() # uses GOOGLE_API_KEY from env
# --- Create or resume interaction ---
if resume_interaction_id:
interaction_id = resume_interaction_id
else:
interaction = await client.aio.interactions.create(
agent=_DEEP_RESEARCH_AGENT,
input=prompt,
background=True,
store=True,
)
interaction_id = interaction.id
# --- Poll until completed, failed, or timeout ---
start = time.monotonic()
last_status = None
while True:
elapsed = time.monotonic() - start
if elapsed >= max_wait_seconds:
raise LLMServiceError(
f"Deep research timed out after {elapsed:.0f}s: "
f"id={interaction_id} last_status={last_status}"
)
interaction = await client.aio.interactions.get(interaction_id)
status = getattr(interaction, "status", None)
if status != last_status:
logger.info("Deep research poll: id=%s status=%s elapsed=%.0fs",
interaction_id, status, elapsed)
last_status = status
if status == "completed":
break
if status in ("failed", "cancelled"):
raise LLMServiceError(f"Deep research {status}: {interaction_id}")
await asyncio.sleep(poll_interval_seconds)
# --- Extract results ---
text = _extract_interaction_text(interaction)
sources = _extract_search_sources(interaction)
return DeepResearchResult(
text=text,
search_sources=sources,
interaction_id=interaction_id,
)
Observed behavior from worker logs:
-
Interaction is created successfully (gets an interaction_id)
-
Polling loop runs, status never transitions to “completed”
-
Agent model: deep-research-pro-preview-12-2025
-
SDK: google-genai (Python async client via client.aio.interactions)
-
API calls: client.aio.interactions.create() then client.aio.interactions.get() in a loop
I will dm you the prompt and the run ID.
actually I don’t see how to dm you