Run allowlisted executor plugin stop hooks (#40009)

## What changed

- Discover inline hooks from executor-provided plugin manifests and accept only
  the bundled Computer Use `Stop` hook for `node_repl.turn_ended`.
- Add the accepted hook to the current step's hook engine with
  executor-scoped provenance.
- Run executor-scoped hooks in the background after regular stop-hook
  decisions, without delaying turn completion, applying control effects, or
  exposing them in hook summaries. Skip them when regular hooks only block
  continuation.

## Testing

- Added coverage for manifest filtering and option preservation.
- Added coverage for background execution, interaction with regular stop
  hooks, and non-blocking turn completion.

GitOrigin-RevId: c0f75f83a23ba8a83bb3a5d5997c4882aacc32d6
This commit is contained in:
Krish Chainani authored and copyberry committed 2026-08-21 21:01:59 +00:00
1 parent e77c2a90af
commit 8b61c50ebe
25 files changed
+898 -63

No files matched your search

+1 -1
View File
@@ -501,7 +501,7 @@ pub(crate) async fn run_turn(
last_agent_message = sampling_request_last_agent_message;
let stop_outcome = run_turn_stop_hooks(
&sess,
&turn_context,
&step_context,
stop_hook_active,
last_agent_message.clone(),
)