openclaw - ✅(Solved) Fix Gmail hook sessions / Signal inbox notifications stop working after update to 2026.3.31 [1 pull requests, 1 comments, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#59002Fetched 2026-04-08 02:30:09
View on GitHub
Comments
1
Participants
1
Timeline
1
Reactions
0
Participants
Timeline (top)
cross-referenced ×1

After updating from OpenClaw 2026.3.28 to 2026.3.31, Gmail inbound/outbound mail still works, and the Gmail watch reports successful deliveries, but new Gmail hook sessions no longer appear and Signal notifications for inbound mail no longer fire.

Before the update, each new inbound email created a dashboard chat like:

  • hook:gmail:<long-id>

After the update, that behavior stopped.

Root Cause

After updating from OpenClaw 2026.3.28 to 2026.3.31, Gmail inbound/outbound mail still works, and the Gmail watch reports successful deliveries, but new Gmail hook sessions no longer appear and Signal notifications for inbound mail no longer fire.

Before the update, each new inbound email created a dashboard chat like:

  • hook:gmail:<long-id>

After the update, that behavior stopped.

Fix Action

Fix / Workaround

  • Gmail watch delivery is still healthy
  • Mailbox behavior is still healthy
  • Signal behavior is still healthy
  • But hook-session surfacing/dispatch appears broken or changed
  1. OpenClaw should create/dispatch the Gmail hook run
  2. a hook:gmail:<id> session should appear (as before)
  3. configured delivery logic should be able to notify Signal

PR fix notes

PR #60574: fix(hooks): remove hooks token from Tailscale Funnel push endpoint URL

Description (problem / solution / changelog)

Summary

  • Problem: ensureTailscaleEndpoint() in src/hooks/gmail-setup-utils.ts:315 appends the hooks token as ?token= to the Pub/Sub push endpoint URL
  • Why it matters: the token leaks to Tailscale relay logs and Google Pub/Sub subscription metadata. Also, server-http.ts:502 explicitly rejects requests with ?token= in query params (returns 400), which breaks Gmail push delivery
  • What changed: removed the token from the push endpoint URL. The gog serve process already receives the token via --token CLI arg and authenticates against the gateway via Authorization header
  • What did NOT change (scope boundary): no changes to the hooks auth flow, gog serve behavior, or gateway token validation

The rest of the codebase already follows the correct pattern. dashboard.ts:75, onboard-helpers.ts:146, and setup.finalize.ts:314 all use URL fragments (#token=) to avoid server-side log exposure.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

  • Related #58639
  • Related #59002
  • This PR fixes a bug or regression

Root Cause / Regression History (if applicable)

  • Root cause: ensureTailscaleEndpoint() was written to include the token in the URL for Pub/Sub push delivery, but the gateway hooks handler was later hardened to reject ?token= in query params (server-http.ts:502-508). The two code paths became inconsistent.
  • Missing detection / guardrail: no test validates that the push endpoint URL does not contain secrets in query parameters
  • Prior context: the ?token= rejection was added in a security hardening pass. The Tailscale endpoint builder was not updated to match.
  • Why this regressed now: the security hardening of server-http.ts created the inconsistency with the existing gmail-setup-utils code

Regression Test Plan (if applicable)

  • Coverage level that should have caught this:
    • Unit test
    • Seam / integration test
    • End-to-end test
    • Existing coverage already sufficient
  • Target test or file: src/hooks/gmail-setup-utils.test.ts
  • Scenario the test should lock in: ensureTailscaleEndpoint with a token param should NOT include ?token= in the returned URL
  • Why this is the smallest reliable guardrail: tests the exact function that constructs the URL
  • If no new test is added, why not: the existing 3 tests in gmail-setup-utils.test.ts pass. A dedicated test for token-not-in-URL could be added by the maintainers if desired. The fix removes the code path entirely rather than changing its behavior.

User-visible / Behavior Changes

Gmail push notifications via Tailscale Funnel may start working for users who had hooks token configured. Previously, Google Pub/Sub would POST to a URL with ?token=, which the gateway rejects with 400.

Diagram (if applicable)

Before:
[Google Pub/Sub] -> POST https://gw.ts.net/hooks/gmail?token=SECRET -> [Tailscale] -> [gog serve] -> [gateway rejects: 400 "query parameters are not allowed"]

After:
[Google Pub/Sub] -> POST https://gw.ts.net/hooks/gmail -> [Tailscale] -> [gog serve --token SECRET] -> [gateway via Authorization header] -> OK

Security Impact (required)

  • New permissions/capabilities? No
  • Secrets/tokens handling changed? Yes
  • New/changed network calls? No
  • Command/tool execution surface changed? No
  • Data access scope changed? No
  • If any Yes, explain risk + mitigation: the hooks token is no longer placed in the push endpoint URL. This eliminates token exposure in Tailscale relay logs and Google Pub/Sub subscription metadata. The gog serve process already receives the token via --token CLI argument and authenticates via Authorization: Bearer header or X-OpenClaw-Token header. No change in authentication behavior.

Repro + Verification

Environment

  • OS: macOS
  • Runtime/container: Node 25.2.1
  • Integration/channel: Gmail hooks via Tailscale Funnel

Steps

  1. Configure Gmail hooks with Tailscale Funnel mode and a hooks token
  2. Run openclaw hooks gmail setup
  3. Check the Pub/Sub subscription: gcloud pubsub subscriptions describe <sub> --format="value(pushConfig.pushEndpoint)"

Expected

Push endpoint URL should NOT contain the hooks token

Actual

Before fix: https://gw.ts.net/hooks/gmail?token=SECRET After fix: https://gw.ts.net/hooks/gmail

Evidence

  • Trace/log snippets

ensureTailscaleEndpoint() at gmail-setup-utils.ts:315:

// Before:
return params.token ? `${baseUrl}?token=${params.token}` : baseUrl;
// After:
return baseUrl;

Inconsistency with rest of codebase:

  • dashboard.ts:75 uses #token= (correct)
  • onboard-helpers.ts:146 uses #token= (correct)
  • setup.finalize.ts:314 uses #token= (correct)
  • server-http.ts:502 rejects ?token= with 400 (contradicts the old gmail-setup-utils code)

Human Verification (required)

  • Verified scenarios: existing tests pass (gmail-setup-utils.test.ts, 3/3 green), diff is a single code path removal
  • Edge cases checked: ensureTailscaleEndpoint called without token param still returns baseUrl (no change in behavior for that path)
  • What I did NOT verify: end-to-end Gmail push delivery with live Tailscale Funnel (no Tailscale setup in my environment)

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

Compatibility / Migration

  • Backward compatible? Yes
  • Config/env changes? No
  • Migration needed? No

Users who had broken Gmail push notifications due to the ?token= rejection may need to re-run openclaw hooks gmail setup to update the Pub/Sub subscription endpoint.

Risks and Mitigations

  • Risk: users who somehow relied on the ?token= in the Pub/Sub URL for custom middleware
    • Mitigation: this URL shape was rejected by the gateway anyway (400 error), so no working setup depends on it

AI-assisted: yes (analysis and PR preparation with Claude). Fix is a single line change, fully understood and manually verified. Tests run locally with vitest: 3/3 passing.

Changed files

  • src/hooks/gmail-setup-utils.ts (modified, +5/-1)
RAW_BUFFERClick to expand / collapse

Summary

After updating from OpenClaw 2026.3.28 to 2026.3.31, Gmail inbound/outbound mail still works, and the Gmail watch reports successful deliveries, but new Gmail hook sessions no longer appear and Signal notifications for inbound mail no longer fire.

Before the update, each new inbound email created a dashboard chat like:

  • hook:gmail:<long-id>

After the update, that behavior stopped.

Environment

  • OpenClaw: 2026.3.31
  • Previous known-good version: 2026.3.28
  • Host: Ubuntu/Linux x86_64
  • Node: v22.22.2
  • Gateway: local / loopback
  • Gmail account: [email protected]
  • Signal channel configured and working
  • Gmail watcher started by gateway using gog gmail watch serve

What still works

  • Gmail inbox receives new mail normally
  • Outbound Gmail sending works
  • Signal channel itself works
  • gog gmail watch status --account [email protected] reports healthy delivery

Example watch status output:

  • last_delivery_status ok
  • last_delivery_at 2026-04-01T12:16:00+02:00
  • last_push_message_id 19131248279997431

What broke after update

  • No new hook:gmail:<id> sessions appear in dashboard
  • No Signal notifications for inbound mail
  • This used to work before update on 2026.3.28

Observed runtime evidence

openclaw logs --follow shows:

  • Gmail watcher starts successfully
  • Gateway hooks subsystem starts successfully
  • Signal starts successfully

Examples:

  • gmail watcher started for [email protected]
  • starting gog gmail watch serve --account [email protected] --bind 127.0.0.1 --port 8788 --path / --token ... --hook-url http://127.0.0.1:18789/hooks/gmail --hook-token ... --include-body --max-bytes 20000
  • gateway/hooks gmail watcher started
  • loaded 4 internal hook handlers

But after sending fresh inbound emails:

  • no fresh hook:gmail:<id> sessions appear
  • no corresponding Signal notification is delivered

One relevant log clue seen during capture:

  • Log tail truncated (increase --max-bytes).

Config / experiments tried

The setup was customized to avoid notifying on self-sent outbound mail while still notifying on true inbound mail.

Tried all of the following after update:

  1. fixed stale memory/config drift around wrong Gmail address ([email protected] vs [email protected])
  2. added custom Gmail hook transform under:
    • ~/.openclaw/hooks/transforms/gmail-inbound-filter.js
  3. tested both:
    • transform-returned deliver/channel/to
    • mapping-level deliver/channel/to
  4. removed potential conflict from:
    • hooks.presets: ["gmail"]
  5. set:
    • hooks.gmail.includeBody = false to reduce payload size
  6. restarted gateway multiple times
  7. confirmed watcher health via:
    • gog gmail watch status

None of the above restored:

  • dashboard hook:gmail:<id> chat creation
  • Signal inbound-mail notifications

Why this looks like a regression

Before 2026.3.31, new inbound Gmail messages reliably created hook:gmail:<id> sessions and surfaced as expected.

After 2026.3.31:

  • Gmail watch delivery is still healthy
  • Mailbox behavior is still healthy
  • Signal behavior is still healthy
  • But hook-session surfacing/dispatch appears broken or changed

This suggests a regression or behavior change in:

  • Gmail hook ingestion
  • Hook mapping application
  • Or hook-driven session creation/delivery after watcher receipt

Expected behavior

When a new email arrives in [email protected]:

  1. OpenClaw should create/dispatch the Gmail hook run
  2. a hook:gmail:<id> session should appear (as before)
  3. configured delivery logic should be able to notify Signal

Actual behavior

  • new email arrives
  • watch delivery status is OK
  • but no new hook session appears
  • no Signal notification appears

Useful repro outline

  1. configure Gmail watch for a Gmail account
  2. verify inbound/outbound Gmail works
  3. update OpenClaw from 2026.3.28 to 2026.3.31
  4. send a fresh email to the watched inbox
  5. observe:
    • inbox receives mail
    • gog gmail watch status updates delivery timestamp
    • but no new hook:gmail:<id> session appears
    • no downstream notification fires

extent analysis

TL;DR

The issue is likely due to a regression in OpenClaw's Gmail hook ingestion or hook mapping application after updating from version 2026.3.28 to 2026.3.31, and a workaround may involve adjusting the --max-bytes parameter or investigating changes in hook handling.

Guidance

  • Investigate the --max-bytes parameter and consider increasing its value to prevent log truncation, as hinted by the log clue Log tail truncated (increase --max-bytes).
  • Review changes in hook handling between OpenClaw versions 2026.3.28 and 2026.3.31, focusing on Gmail hook ingestion and mapping application.
  • Verify that the custom Gmail hook transform and mapping-level deliver/channel/to configurations are correct and compatible with the updated OpenClaw version.
  • Test the setup with a minimal configuration to isolate the issue and identify potential conflicts.

Example

No code snippet is provided as the issue is more related to configuration and version changes.

Notes

The issue seems to be specific to the OpenClaw update, and the provided information suggests a regression or behavior change. However, without more detailed documentation on the changes between versions 2026.3.28 and 2026.3.31, it's challenging to provide a definitive solution.

Recommendation

Apply a workaround by adjusting the --max-bytes parameter and investigating changes in hook handling, as the root cause is likely related to the OpenClaw update.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

When a new email arrives in [email protected]:

  1. OpenClaw should create/dispatch the Gmail hook run
  2. a hook:gmail:<id> session should appear (as before)
  3. configured delivery logic should be able to notify Signal

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix Gmail hook sessions / Signal inbox notifications stop working after update to 2026.3.31 [1 pull requests, 1 comments, 1 participants]