APP-4344: Add first-party Oz lifecycle hooks - #15832
Draft
warp-agent-staging[bot] wants to merge 11 commits into
Draft
APP-4344: Add first-party Oz lifecycle hooks#15832warp-agent-staging[bot] wants to merge 11 commits into
warp-agent-staging[bot] wants to merge 11 commits into
Conversation
Contributor
Author
|
This PR was generated with Warp. Comment |
This was referenced Sep 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Implements the approved APP-4344 first-party Oz lifecycle-hook contract behind
OzLifecycleHooks.RunOzHookactions using the pinnedwarp-proto-apiscontract.SessionStart { source: resume }before inference and publishes failed/blocked terminal status only after exactly one matchingStopcompletes.Linked Issue
specs/APP-4344/PRODUCT.mdandspecs/APP-4344/TECH.mdcontract.Testing
cargo test -p warp oz_hooks_runtime --no-fail-fast— 10 passed.Focused resume, shared stop-claim, failed-stop ordering, and blocked-stop ordering tests — all passed.
./script/format— passed.cargo clippy -p warp --all-targets --tests -- -D warnings— passed.CARGO_INCREMENTAL=0 ./script/presubmit— format, inline-test policy, workspace Clippy, clang-format, factory-files checks, and WGSL formatting passed. The workspace nextest phase was blocked only by the unrelated Linux X11 recording testrecords_window_target_via_native_x11grab_after_raise, which cannot foreground/capture its target in this sandbox and fails independently when rerun.I have manually tested my changes locally with
./script/run(not run: this is non-UI runtime behavior and computer-use verification was explicitly excluded).Agent Mode
CHANGELOG-OZ: Added first-party Oz lifecycle hooks for session, prompt, tool, compaction, and stop events.