Skip to content

feat: Interrupt for low coded CAS agents [JAR-9208]#641

Open
JoshParkSJ wants to merge 3 commits intomainfrom
josh/cas-interrupt
Open

feat: Interrupt for low coded CAS agents [JAR-9208]#641
JoshParkSJ wants to merge 3 commits intomainfrom
josh/cas-interrupt

Conversation

@JoshParkSJ
Copy link
Contributor

@JoshParkSJ JoshParkSJ commented Feb 26, 2026

changes

  • skipping startToolCall
  • providing metadata in the tool response for HITL tools because there was a bug where the agent would think it mistakenly called the wrong tool even though the user intentionally modified the arguments (see discussion here)

notes

@JoshParkSJ JoshParkSJ changed the title use hitl for low coded cas agents [JAR-9208] feat: Interrupt for low coded CAS agents [JAR-9208] Feb 26, 2026
@JoshParkSJ JoshParkSJ force-pushed the josh/cas-interrupt branch from 1431778 to ebbf522 Compare March 6, 2026 01:41
approved_args: dict[str, Any] | None = None

def annotate_result(self, output: dict[str, Any] | Any) -> None:
"""Apply confirmation metadata to a tool result message."""
Copy link
Contributor Author

@JoshParkSJ JoshParkSJ Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding metadata to tool response to fix a bug where the agent kept retrying the tool - see discussion here with applied sciences team / @bai-uipath

confirmation.annotate_result(output)
return output
except GraphBubbleUp:
raise
Copy link
Contributor Author

@JoshParkSJ JoshParkSJ Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes durable_interrupt tools like RPA tools (durable_interrupt was introduced 2w ago). This only broke for conversational agents because convo agents set handle_tool_errors=True which catches generic exceptions (like GraphInterrupt/GraphBubbleUp) and converts it into an error ToolMessage (since we want to convey to user something went wrong instead of just crashing on exceptions)

By raising GraphBubbleUp before the generic handler, the interrupt properly bubbles up to Langgraph, pauses execution, saves the checkpoint - and allows the tool to resume

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant