feat: hooks for Deep Agents Code - #4956
Conversation
Document the planned hooks redesign (MVP events, matchers, I/O contract, architecture) while preserving the current fire-and-forget behavior as a clearly labeled interim section. Co-authored-by: Cursor <cursoragent@cursor.com>
…e-compatible' into docs/deepagents-code-hooks-claude-compatible
Adds the parts of Hooks v2 the draft did not cover: plugin hook consent and path variables, project trust outcomes, the sanitized handler environment, transcript projections, matcher-field constraints, and where hook feedback appears in a session. Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
|
Pushed the Hooks v2 details the draft did not cover, checked against
One thing to drop when the flag goes away: I added a |
The flag is removed before hooks go live, so the note would ship stale. Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
|
Thanks for opening a docs PR, Johannes du Plessis (@johannes117)! When it's ready for review, please add the relevant reviewers:
|
|
Mintlify preview branch generated: Site preview: https://langchain-5e9cc07a-preview-docsde-1785862016-990fd26.mintlify.site Important Preview links may take a few minutes to start working while the deployment finishes. Changed documentation pages (preview deep links): |
|
|
||
| <ResponseField name="command" type="list[str]" required> | ||
| Command and arguments to run. No shell expansion: use `["bash", "-c", "..."]` if needed. | ||
| Quote these variables in a `command` handler, because installation paths can contain spaces: `"command": "\"${CLAUDE_PLUGIN_ROOT}/scripts/format.sh\""`. An `argv` handler resolves them before launch, which avoids shell quoting entirely. |
There was a problem hiding this comment.
this is a bit odd, will update in a separate PR
| <ResponseField name="thread_id" type="string" required> | ||
| The session thread identifier. | ||
| </ResponseField> | ||
| The following compatibility fields are recognized but not applied. Deep Agents Code emits a diagnostic and falls back to the behavior shown: |
There was a problem hiding this comment.
what's the behavior shown?
Documents Hooks v2 as implemented, including lifecycle events, command I/O, project trust, reload behavior, legacy migration, and plugin-contributed hooks.
Updates the Hooks reference and Plugins page to match Deep Agents Code.
Test plan
valeon both changed pagesgit diff --check