Skip to content

fix(hooks): preserve prompt payloads and release evaluation timers - #121

Merged
vincentkoc merged 2 commits into
mainfrom
fix/prompt-hook-evaluation
Nov 20, 2026
Merged

vincentkoc merged 2 commits into
mainfrom
fix/prompt-hook-evaluation

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

Summary

Claude prompt hooks now receive literal event JSON at every $ARGUMENTS placeholder. JavaScript replacement strings previously rewrote dollar sequences inside event values. The host evaluation timer also stays scoped to an actual model call and is cleared if the provider throws synchronously.

Compatibility

The existing OpenClaw agent and model override permissions, active-context requirement, decision mapping, warning behavior and model-call timeout still apply. This change affects prompt hooks only.

Verification

  • A registered Stop hook checks both replacements against the original event values, including literal dollar sequences. This failed on the parent revision.
  • The same fixture verifies that missing context skips the model call and that timers are cleared for success and a synchronous provider failure. The old implementation scheduled three deadlines for two model calls.
  • npm run check and the offline npm run pack:check passed, including installed CLI, runtime, MCP, declaration and rollback checks.

@clawsweeper

clawsweeper Bot commented Nov 20, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@vincentkoc
vincentkoc marked this pull request as ready for review November 20, 2026 15:57
@vincentkoc
vincentkoc merged commit 8cb034f into main Nov 20, 2026
9 checks passed
@vincentkoc
vincentkoc deleted the fix/prompt-hook-evaluation branch November 20, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant