[PR #4290] [MERGED] docs: document conditional interrupts and FilesystemPermission interrupt mode #4274

Closed
opened 2026-06-05 19:13:20 -04:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/docs/pull/4290
Author: @nick-hollon-lc
Created: 6/3/2026
Status: Merged
Merged: 6/4/2026
Merged by: @nick-hollon-lc

Base: mainHead: nh/docs-hitl-conditional-fs-interrupts


📝 Commits (8)

  • 7edad28 docs(langchain): document conditional interrupts via the when predicate
  • 3885eb1 docs(deepagents): document FilesystemPermission interrupt mode
  • 59c9a08 docs(deepagents): document filesystem permission interrupts in HITL
  • 12d8dbd docs: address PR review feedback
  • 6432f7a docs(langchain): apply review suggestion on conditional interrupt wording
  • 487d7dc Merge remote-tracking branch 'origin/main' into nh/docs-hitl-conditional-fs-interrupts
  • 39ed40f fix(docs.json): correct dangling assistant-observability nav entry to chat-observability
  • df63630 Merge remote-tracking branch 'origin/main' into nh/docs-hitl-conditional-fs-interrupts

📊 Changes

3 files changed (+155 additions, -1 deletions)

View changed files

📝 src/oss/deepagents/human-in-the-loop.mdx (+57 -0)
📝 src/oss/deepagents/permissions.mdx (+39 -1)
📝 src/oss/langchain/human-in-the-loop.mdx (+59 -0)

📄 Description

Why

Two human-in-the-loop interrupt features shipped recently but weren't documented: the conditional when predicate in HumanInTheLoopMiddleware (LangChain) and mode="interrupt" on FilesystemPermission (Deep Agents). This PR documents both.

Changes

LangChain (oss/langchain/human-in-the-loop.mdx):

  • New "Conditional interrupts" section: a when predicate on a tool's InterruptOnConfig receives a ToolCallRequest and returns True to interrupt / False to auto-approve, gating interrupts on the call's arguments.
  • Added a when ParamField to the configuration accordion.

Deep Agents (oss/deepagents/permissions.mdx):

  • Added "interrupt" to the Python mode field and a "Pause for human approval" section. mode="interrupt" pauses the built-in write tools (write_file/edit_file) for HITL review on matching paths; create_deep_agent wires the middleware automatically and merges with any interrupt_on.

Deep Agents (oss/deepagents/human-in-the-loop.mdx):

  • New "Filesystem permission interrupts" section: interrupt-mode permission rules raise the same HITL interrupt as configured tools and are handled/resumed identically, cross-linking the permissions page.

Version & language scope (verified against released tags)

  • Conditional when: first released in langchain==1.3.3 (commit merged to master 2026-06-01). Confirmed present in the langchain==1.3.4 tag; absent from 1.3.2.
  • FilesystemPermission(mode="interrupt"): first released in deepagents==0.6.8. Confirmed absent from 0.6.7.
  • Both features are Python-only. Verified the latest JS releases lack them (langchainjs hitl.ts has no when; deepagentsjs PermissionMode is "allow" | "deny"). Version-added <Note>s and a "Python only" note reflect this. If JS parity lands later, the JS fences should be updated.

Verification

  • make lint_prose on the three files: 0 errors.
  • make broken-links: No broken links (new anchors #conditional-interrupts, #pause-for-human-approval, and the #handle-interrupts cross-link checked).
  • API surface (when/InterruptOnConfig/ToolCallRequest, FilesystemPermission.mode, auto-wiring via _build_interrupt_on_from_permissions) checked against the shipped 0.6.8 / 1.3.4 source. Snippets were not executed against a live model (needs API keys), so they are not runtime-tested end to end.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/docs/pull/4290 **Author:** [@nick-hollon-lc](https://github.com/nick-hollon-lc) **Created:** 6/3/2026 **Status:** ✅ Merged **Merged:** 6/4/2026 **Merged by:** [@nick-hollon-lc](https://github.com/nick-hollon-lc) **Base:** `main` ← **Head:** `nh/docs-hitl-conditional-fs-interrupts` --- ### 📝 Commits (8) - [`7edad28`](https://github.com/langchain-ai/docs/commit/7edad28bfb39ad355fe63dd60abf48aece39cbc7) docs(langchain): document conditional interrupts via the when predicate - [`3885eb1`](https://github.com/langchain-ai/docs/commit/3885eb1b4f6e61c4dfed9751d608c037ec0c687c) docs(deepagents): document FilesystemPermission interrupt mode - [`59c9a08`](https://github.com/langchain-ai/docs/commit/59c9a087c54570339ff3b434f6d47b57777e590f) docs(deepagents): document filesystem permission interrupts in HITL - [`12d8dbd`](https://github.com/langchain-ai/docs/commit/12d8dbd2049d0025309d0f5d5e9a818deda8380b) docs: address PR review feedback - [`6432f7a`](https://github.com/langchain-ai/docs/commit/6432f7a182083cb0f0f11e14f7e46731a4f72c7b) docs(langchain): apply review suggestion on conditional interrupt wording - [`487d7dc`](https://github.com/langchain-ai/docs/commit/487d7dc70f2b0bd718b5345d5247c6484f2ce9ed) Merge remote-tracking branch 'origin/main' into nh/docs-hitl-conditional-fs-interrupts - [`39ed40f`](https://github.com/langchain-ai/docs/commit/39ed40f559ee1a7ab1571fa3ba441a72a73f1b24) fix(docs.json): correct dangling assistant-observability nav entry to chat-observability - [`df63630`](https://github.com/langchain-ai/docs/commit/df636300cf593a35fd86f7c5bc06f22ed7b338f8) Merge remote-tracking branch 'origin/main' into nh/docs-hitl-conditional-fs-interrupts ### 📊 Changes **3 files changed** (+155 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/oss/deepagents/human-in-the-loop.mdx` (+57 -0) 📝 `src/oss/deepagents/permissions.mdx` (+39 -1) 📝 `src/oss/langchain/human-in-the-loop.mdx` (+59 -0) </details> ### 📄 Description ## Why Two human-in-the-loop interrupt features shipped recently but weren't documented: the conditional `when` predicate in `HumanInTheLoopMiddleware` (LangChain) and `mode="interrupt"` on `FilesystemPermission` (Deep Agents). This PR documents both. ## Changes **LangChain** (`oss/langchain/human-in-the-loop.mdx`): - New "Conditional interrupts" section: a `when` predicate on a tool's `InterruptOnConfig` receives a `ToolCallRequest` and returns `True` to interrupt / `False` to auto-approve, gating interrupts on the call's arguments. - Added a `when` `ParamField` to the configuration accordion. **Deep Agents** (`oss/deepagents/permissions.mdx`): - Added `"interrupt"` to the Python `mode` field and a "Pause for human approval" section. `mode="interrupt"` pauses the built-in write tools (`write_file`/`edit_file`) for HITL review on matching paths; `create_deep_agent` wires the middleware automatically and merges with any `interrupt_on`. **Deep Agents** (`oss/deepagents/human-in-the-loop.mdx`): - New "Filesystem permission interrupts" section: interrupt-mode permission rules raise the same HITL interrupt as configured tools and are handled/resumed identically, cross-linking the permissions page. ## Version & language scope (verified against released tags) - Conditional `when`: first released in **`langchain==1.3.3`** (commit merged to master 2026-06-01). Confirmed present in the `langchain==1.3.4` tag; absent from `1.3.2`. - `FilesystemPermission(mode="interrupt")`: first released in **`deepagents==0.6.8`**. Confirmed absent from `0.6.7`. - **Both features are Python-only.** Verified the latest JS releases lack them (langchainjs `hitl.ts` has no `when`; deepagentsjs `PermissionMode` is `"allow" | "deny"`). Version-added `<Note>`s and a "Python only" note reflect this. If JS parity lands later, the JS fences should be updated. ## Verification - `make lint_prose` on the three files: 0 errors. - `make broken-links`: ✅ No broken links (new anchors `#conditional-interrupts`, `#pause-for-human-approval`, and the `#handle-interrupts` cross-link checked). - API surface (`when`/`InterruptOnConfig`/`ToolCallRequest`, `FilesystemPermission.mode`, auto-wiring via `_build_interrupt_on_from_permissions`) checked against the shipped 0.6.8 / 1.3.4 source. Snippets were **not** executed against a live model (needs API keys), so they are not runtime-tested end to end. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-06-05 19:13:20 -04:00
yindo closed this issue 2026-06-05 19:13:21 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/docs#4274