Skip to content

feat(hooks): add cleanup option for webhook hook sessions#4094

Closed
tmchow wants to merge 11 commits into
openclaw:mainfrom
tmchow:feat/session-cleanup
Closed

feat(hooks): add cleanup option for webhook hook sessions#4094
tmchow wants to merge 11 commits into
openclaw:mainfrom
tmchow:feat/session-cleanup

Conversation

@tmchow

@tmchow tmchow commented Jan 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add cleanup and cleanupDelayMinutes options to webhook hook mappings for automatic session cleanup
  • Sessions with cleanup: "delete" are automatically removed after hook completion
  • Configurable delay allows debugging/auditing before cleanup
  • Registry-based cleanup with sweeper pattern (60s interval) for reliability

Fixes #3890 #2725

Test plan

  • Verify cleanup: "delete" deletes session after hook completes
  • Verify cleanup: "keep" (default) preserves session
  • Verify cleanupDelayMinutes delays cleanup appropriately
  • Verify failed cleanups retry on next sweep
  • Verify crash recovery restores pending cleanups

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime labels Jan 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation gateway Gateway runtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Add cleanup option for webhook hook mappings

1 participant