Skip to content

[Bug]: streamMode field in 3.x config blocks upgrade to 6.x (schema rejects unknown field) #92406

Closed

Description

@ayeshachohan

Summary

Upgrading OpenClaw from 2026.3.x to 2026.6.5 with an existing ~/.openclaw/openclaw.json that contains channels.googlechat.streamMode causes openclaw config validate and openclaw-gateway.service startup to fail with channels.googlechat.streamMode: Unknown field. The field was valid in 3.x. The 6.5 schema is strict and rejects unknown keys instead of stripping or warning.

Steps to reproduce

  1. On a host that ran OpenClaw 2026.3.x with channels.googlechat.enabled: true and channels.googlechat.streamMode: "replace" written into ~/.openclaw/openclaw.json.
  2. Upgrade: npm install -g openclaw@2026.6.5
  3. Run openclaw config validate

Expected behavior

Either:

  • The unknown streamMode field is stripped silently on first 6.5 read, or
  • A openclaw config migrate command exists that performs the strip, or
  • A clear deprecation/removal note in the upgrade changelog lists the fields to remove pre-upgrade

Any of the three would have prevented the failure.

Actual behavior

$ openclaw config validate
Error: channels.googlechat.streamMode: Unknown field

The gateway service refuses to start until the field is manually removed from ~/.openclaw/openclaw.json. The upgrade silently breaks production for anyone whose 3.x config still has the field.

OpenClaw version

2026.6.5

Operating system

Ubuntu 22.04 LTS (Linux 5.15)

Install method

npm global (npm install -g openclaw@2026.6.5)

Model

Not applicable — fails before any model call.

Additional context

Confirmed three workarounds, but each is a workaround, not a fix:

  1. Pre-upgrade strip via a small Python snippet:
    import json, pathlib
    p = pathlib.Path("/home/ubuntu/.openclaw/openclaw.json")
    cfg = json.loads(p.read_text())
    cfg.get("channels", {}).get("googlechat", {}).pop("streamMode", None)
    p.write_text(json.dumps(cfg, indent=2))
  2. Post-upgrade manual JSON edit (same result, manual).
  3. Restore the previous OpenClaw version, do the strip, then upgrade.

Suggested upstream remedies (in order of how invasive each is to the codebase):

  1. Migration command: add openclaw config migrate that strips/renames deprecated fields based on a versioned migration table. Auto-run on first 6.x boot when last-seen version is older.
  2. Strip-unknown policy: change the zod schema for channels.googlechat to use .strip() instead of .strict(). Friendly to upgrades but loses typo detection.
  3. Documented breaking changes: at minimum, list streamMode as a removed field in 6.x upgrade docs and add it to a deprecation-keys list checked at config validate time with a message like "channels.googlechat.streamMode" was removed in 4.x. Remove it from your config to continue. Cheapest fix; the user still has to act, but the failure becomes actionable instead of opaque.

Happy to send a PR for option (3) if a maintainer agrees that's the right shape.

Activity

  1. clawsweeper commented on Jun 12, 2026

    @clawsweeper
    Contributor

    Thanks for the context here. I did a careful shell check against current main, and this is already implemented.

    Current main and v2026.6.6 now provide the repository-prescribed Google Chat migration for legacy streamMode, focused regression coverage, and an actionable openclaw doctor --fix recovery hint when strict validation blocks startup.

    So I’m closing this as already implemented rather than keeping a duplicate issue open.

    Review details

    Best possible solution:

    Keep the shipped plugin-owned doctor migration and strict current schema; affected upgrades should run openclaw doctor --fix and then retry validation or gateway startup.

    Do we have a high-confidence way to reproduce the issue?

    Yes. The tagged legacy shape, current strict schema, and focused doctor migration fixture provide a high-confidence source reproduction of the upgrade failure and its repair path.

    Is this the best way to solve the issue?

    Yes. A Google Chat-owned doctor migration is the narrowest maintainable solution because it preserves strict typo detection and rewrites shipped legacy configuration into the canonical current shape.

    Security review:

    Security review: This is issue triage without a proposed patch or security-sensitive report.

    AGENTS.md: found and applied where relevant.

    What I checked:

    Likely related people:

    • Peter Steinberger: Git shortlog shows the largest historical contribution count across the central Google Chat schema, channel, and migration files. (role: long-term feature contributor; confidence: medium; files: extensions/googlechat/src/types.config.ts, extensions/googlechat/src/channel.ts, extensions/googlechat/src/doctor-contract.ts)
    • openclaw-clownfish[bot]: Git blame and file history tie the current Google Chat doctor migration and regression test to snapshot commit 99d0bdc. (role: introduced current migration snapshot; confidence: high; commits: 99d0bdc23ab3; files: extensions/googlechat/src/doctor-contract.ts, extensions/googlechat/src/doctor-contract.test.ts)
    • Vincent Koc: The v2026.6.6 release commit contains the shipped migration blob, and repository history shows recent Google Chat area contributions. (role: release commit author and recent area contributor; confidence: medium; commits: 8c802aa68351; files: extensions/googlechat/src/doctor-contract.ts, extensions/googlechat/src/types.config.ts)

    Codex review notes: model internal, reasoning high; reviewed against 1bd04ac98389; fix evidence: release v2026.6.6, commit 8c802aa68351.

  2. ayeshachohan commented on Jun 12, 2026

    @ayeshachohan
    Author

    Provenance for the regression claim, since the automated review flagged it:

    streamMode was a first-class, schema-validated field on Google Chat in the tagged 2026.3.x line. In GoogleChatAccountSchema it was defined as:

    streamMode: z.enum(["replace", "status_final", "append"]).optional().default("replace"),

    inside a .strict() object — so channels.googlechat.streamMode: "replace" was not only valid, "replace" was its default value. This was not a hand-added or silently-ignored key.

    In current main, the field has been removed from GoogleChatAccountSchema, the schema is still .strict(), and the legacy streamMode → streaming.mode normalization is registered only for Discord/Telegram/Slack (via their doctor-contract.ts); Google Chat has no equivalent migration, and that normalization runs in the doctor path rather than config validate / gateway startup. So a legacy Google Chat config reaches the strict schema unmigrated and is rejected:

    GoogleChatAccountSchema.safeParse({ enabled: true, streamMode: "replace" })
    → success: false — Unrecognized key: "streamMode"
    

    That confirms the upgrade-regression classification: a value that was the schema default in 3.x hard-fails validation after upgrade, with no migration path for this channel.

  3. ayeshachohan commented on Jun 12, 2026

    @ayeshachohan
    Author

    @clawsweeper re-review

  4. clawsweeper commented on Jun 12, 2026

    @clawsweeper
    Contributor

    🦞🧹
    ClawSweeper re-review requested.

    I asked ClawSweeper to review this item again.
    Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
    Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

    Re-review progress:

  5. added
    P1High-priority user-facing bug, regression, or broken workflow.
    impact:crash-loopCrash, hang, restart loop, or process-level availability failure.
    on Jun 12, 2026
  6. ayeshachohan commented on Jun 12, 2026

    @ayeshachohan
    Author

    Thanks for the review confirmed on my end too. Current main (v2026.6.6) adds extensions/googlechat/src/doctor-contract.ts which handles legacy streamMode migration via openclaw doctor --fix. That's exactly what was needed. Happy to close this as already implemented.

  7. locked as resolved and limited conversation to collaborators on Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority user-facing bug, regression, or broken workflow.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions