openclaw - 💡(How to fix) Fix feat: Generic tool-call interrupt primitive for HITL workflows

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Fix Action

Fix / Workaround

Current Workaround (Fragile)

LLM outputs specific JSON, regex parser detects it:

{"action": "request_human_input", "question": "Deploy to production?"}

Code Example

Pipeline: Deploy to Production
Node 1: Build (auto)
Node 2: Test (auto)
Node 3: Deploy (NEEDS HUMAN APPROVAL) ← pause here
Node 4: Notify (auto)

---

{"action": "request_human_input", "question": "Deploy to production?"}

---

from langgraph.types import interrupt
value = interrupt("Should I deploy?")  # Suspends, resumes on human input
RAW_BUFFERClick to expand / collapse

Feature Request: Generic Tool-Call Interrupt Primitive

Problem

OpenClaw lacks a runtime primitive for pausing agent execution and waiting for human input during tool calls. This is critical for Human-In-The-Loop (HITL) workflows in agent orchestration frameworks.

Current State

  • #55289 (merged) implemented CLIENT_TOOL_INTERRUPT_REASON for client-hosted tool calls — this proves the interrupt mechanism exists
  • #48778 proposed preemptive task interruption via in-channel message
  • Plugin API has before_tool_call hook with requireApproval — but this is for tool approval, not for "agent asks human a question and waits for response"

Use Case: Xstack Pipeline HITL

We're building an agent orchestration framework (Xstack) that runs multi-step pipelines. A critical requirement is pausing pipeline execution to wait for human input before proceeding with sensitive operations:

Pipeline: Deploy to Production
  → Node 1: Build (auto)
  → Node 2: Test (auto)
  → Node 3: Deploy (NEEDS HUMAN APPROVAL) ← pause here
  → Node 4: Notify (auto)

Current Workaround (Fragile)

LLM outputs specific JSON, regex parser detects it:

{"action": "request_human_input", "question": "Deploy to production?"}

Problems: LLM may hallucinate, format varies across models, no runtime enforcement.

Proposal

Extend the existing CLIENT_TOOL_INTERRUPT_REASON mechanism:

  1. TrustedToolPolicy.evaluate() can return { action: 'pause', reason: '...', question: '...' }
  2. Gateway suspends the agent turn (like client tool interrupt)
  3. Plugin sends notification (Feishu/Slack/webhook)
  4. Human responds → Gateway resumes with the response as tool result

Industry Reference

LangGraph (LangChain) has native interrupt() primitive:

from langgraph.types import interrupt
value = interrupt("Should I deploy?")  # Suspends, resumes on human input

Impact

  • Enables reliable HITL workflows without LLM cooperation
  • Makes OpenClaw a first-class platform for agent orchestration
  • Builds on existing infrastructure (#55289)

Related

  • #55289 (CLIENT_TOOL_INTERRUPT_REASON)
  • #48778 (preemptive task interruption)
  • Plugin API: registerTrustedToolPolicy, before_tool_call hook

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING