Skip to content

APP-4344: Add first-party Oz lifecycle hooks - #15832

Draft
warp-agent-staging[bot] wants to merge 11 commits into
masterfrom
factory/app-4344-oz-lifecycle-hooks-spec
Draft

APP-4344: Add first-party Oz lifecycle hooks#15832
warp-agent-staging[bot] wants to merge 11 commits into
masterfrom
factory/app-4344-oz-lifecycle-hooks-spec

Conversation

@warp-agent-staging

@warp-agent-staging warp-agent-staging Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Description

Implements the approved APP-4344 first-party Oz lifecycle-hook contract behind OzLifecycleHooks.

  • Adds strict user/project config discovery and composition, exact-byte SHA-256 trust, deterministic matching, and protected-path handling.
  • Adds typed, bounded, redacted payloads for all seven v1 events and a FIFO subprocess runtime with allowlisted environment, timeouts, cancellation, output bounds, and deny-only parsing.
  • Wires local and AgentDriver session, prompt, tool, compact, and terminal lifecycle behavior without changing third-party harness-native hooks.
  • Negotiates and handles MAA RunOzHook actions using the pinned warp-proto-apis contract.
  • Restores local conversations with SessionStart { source: resume } before inference and publishes failed/blocked terminal status only after exactly one matching Stop completes.

Linked Issue

  • APP-4344
  • Implementation follows the approved specs/APP-4344/PRODUCT.md and specs/APP-4344/TECH.md contract.
  • No UI changes; screenshots and video are not applicable.

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 test records_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

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

CHANGELOG-OZ: Added first-party Oz lifecycle hooks for session, prompt, tool, compaction, and stop events.

@warp-agent-staging

Copy link
Copy Markdown
Contributor Author

This PR was generated with Warp.

Comment @warp-staging-factory on this PR to send it follow-up work.

View run View conversation View on Slack

@warp-agent-staging warp-agent-staging Bot changed the title APP-4344: Specify Oz lifecycle hooks APP-4344: Add first-party Oz lifecycle hooks Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants