@@ -269,7 +269,22 @@ def _run_cycle(
269269 autopilot_status = "skipped"
270270 if enable_autopilot and client is not None :
271271 if queue_result .last_status in _AUTOPILOT_BLOCKED_QUEUE_STATUSES :
272- print (f" autopilot: skipped (queue_status={ queue_result .last_status } )" )
272+ # Queue needs human/LLM attention — drive the actual ticket
273+ # content instead of the generic drive_prompt so the IDE's LLM
274+ # knows exactly what to work on.
275+ ticket_prompt = queue_result .last_message .strip () if queue_result .last_message else ""
276+ if ticket_prompt :
277+ reply = client .drive (ticket_prompt , submit = submit , ide = autopilot_ide )
278+ ok = bool (reply .get ("ok" , True ))
279+ autopilot_status = "ok" if ok else "failed"
280+ if ok :
281+ backend = reply .get ("backend" , "?" )
282+ print (f" autopilot: ok (ticket={ queue_result .ticket_id } , ide={ autopilot_ide } , backend={ backend } )" )
283+ else :
284+ message = reply .get ("message" , "unknown error" )
285+ print (f" autopilot: failed ({ message } )" )
286+ else :
287+ print (f" autopilot: skipped (queue_status={ queue_result .last_status } , empty message)" )
273288 else :
274289 reply = client .drive (drive_prompt , submit = submit , ide = autopilot_ide )
275290 ok = bool (reply .get ("ok" , True ))
0 commit comments