#755 CRITICAL: HITL approval bypassed for 2nd+ approval in one task (request_approval wait checkpoint keyed by task id)
Description
Editenterprise/tools/approval_tool.py request_approval used step_name=_current_task_id (the DSL task id) for ctx.wait_for_event. In an agent loop the body task is always 'agent_turn', so the durable wait checkpoint collides across loop turns: the 2nd+ approval's wait returns the 1st approval's CACHED 'approved' checkpoint and the gated command executes WITHOUT its own approval. Reproduced on demo run 7ad484d8: t0_c0 (ls /tmp) approved, t1_c0 (ls /tmp | wc -l) STILL PENDING yet that command executed and the workflow completed. Security/compliance impact: human approval can be skipped. Fix: scope wait checkpoint to approval_key (step_name=f'approval_wait_{approval_key}'). Affects ALL workflows that request >1 approval per task. Relates #749.
Comments
Loading comments...
Context
Loading context...
Audit History
View AllLoading audit history...