Skip to content

fix: remove hardcoded disableBlockStreaming to honor agent config for TUI#19693

Merged
gumadeiras merged 6 commits intoopenclaw:mainfrom
neipor:fix/19643-tui-block-streaming
Feb 18, 2026
Merged

fix: remove hardcoded disableBlockStreaming to honor agent config for TUI#19693
gumadeiras merged 6 commits intoopenclaw:mainfrom
neipor:fix/19643-tui-block-streaming

Conversation

@neipor
Copy link
Contributor

@neipor neipor commented Feb 18, 2026

Summary

The chat.send handler was hardcoding disableBlockStreaming: true, which overrode the agents.defaults.blockStreamingDefault config setting. This caused TUI to ignore the blockStreamingDefault config and always stream token-by-token, overwriting previous content.

Root Cause

In src/gateway/server-methods/chat.ts at line 901, the webchat dispatch was setting:

disableBlockStreaming: true,

This hardcoded value prevented users from using blockStreamingDefault: on to get complete response blocks in TUI, unlike Telegram which respects this config.

Fix

Remove the hardcoded disableBlockStreaming: true so that the agent configuration agents.defaults.blockStreamingDefault is respected for TUI/webchat just like other channels.

Now users can set blockStreamingDefault: on in their config to get complete response blocks instead of streaming token-by-token.

Fixes

Greptile Summary

This PR makes three distinct changes:

  1. Removes hardcoded disableBlockStreaming: true from the TUI/webchat chat handler (chat.ts), allowing the blockStreamingDefault agent config to take effect for webchat — consistent with how other channels (e.g., Telegram) already behave.

  2. Removes dynamic timestamp generation from system prompt params (system-prompt-params.ts), removing imports of formatUserTime/resolveUserTimeFormat and no longer returning userTime/userTimeFormat. This is done intentionally to avoid breaking Anthropic prompt caching. The SystemPromptRuntimeParams type still declares these as optional, and all callers gracefully handle undefined, so this is safe. Agents can use session_status to get the current time instead.

  3. Changes the elevatedDefault fallback from "on" to "off" in get-reply-directives.ts. This is a behavioral change that means elevated mode will default to off when no explicit config is set.

  • The elevatedDefault fallback change introduces an inconsistency: directive-handling.persist.ts:73 and status.ts:391 still fall back to "on", which may cause the status display to report a different elevated level than what is actually applied at runtime.

Confidence Score: 3/5

  • The core disableBlockStreaming fix is straightforward and safe, but the elevatedDefault fallback change introduces inconsistency with other code paths.
  • The main fix (removing disableBlockStreaming: true) and the prompt caching improvement (removing userTime) are clean and correct. However, changing the elevatedDefault fallback from "on" to "off" in only one of three locations that resolve this value creates a behavioral inconsistency where status reporting and change-detection logic disagree with the actual runtime behavior.
  • Pay close attention to src/auto-reply/reply/get-reply-directives.ts — the elevatedDefault fallback change has inconsistencies with src/auto-reply/reply/directive-handling.persist.ts and src/auto-reply/status.ts.

Last reviewed commit: 32d64a4

(5/5) You can turn off certain types of comments like style here!

@openclaw-barnacle openclaw-barnacle bot added app: web-ui App: web-ui gateway Gateway runtime agents Agent runtime and tooling size: XS labels Feb 18, 2026
@arosstale
Copy link
Contributor

The webchat disableBlockStreaming: true removal looks correct — it was hardcoded and couldn't be overridden by config. This unblocks #19643 (TUI blockStreamingDefault having no effect).

Note: this PR bundles 3 unrelated changes (timestamp removal, elevatedDefault fix, blockStreaming removal). VISION.md prefers one PR = one issue. Consider splitting:

The blockStreaming change alone is clean and mergeable 👍

@david-kirk
Copy link

This PR would fix #19643, which I filed. I can confirm that blockStreamingDefault: "on" works correctly for Telegram but has no effect on TUI — the hardcoded disableBlockStreaming: true identified here is consistent with what I observed. Looking forward to this being merged.

@neipor neipor closed this Feb 18, 2026
@neipor neipor reopened this Feb 18, 2026
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 18, 2026

Additional Comments (1)

src/auto-reply/reply/get-reply-directives.ts
Inconsistent elevatedDefault fallback across codebase

The fallback here was changed from "on" to "off", but other locations that resolve the same elevated default still fall back to "on":

  • directive-handling.persist.ts:73: (elevatedAllowed ? ("on" as ElevatedLevel) : ("off" as ElevatedLevel))
  • status.ts:391: args.agent?.elevatedDefault ?? "on"

This means the status display (e.g. /status) will report elevated as "on" while the actual runtime behavior resolves to "off" when no explicit elevatedDefault is configured. If the intent is to change the default to "off", these other locations should be updated as well to keep the behavior consistent.

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/auto-reply/reply/get-reply-directives.ts
Line: 352-356

Comment:
**Inconsistent `elevatedDefault` fallback across codebase**

The fallback here was changed from `"on"` to `"off"`, but other locations that resolve the same elevated default still fall back to `"on"`:

- `directive-handling.persist.ts:73`: `(elevatedAllowed ? ("on" as ElevatedLevel) : ("off" as ElevatedLevel))`
- `status.ts:391`: `args.agent?.elevatedDefault ?? "on"`

This means the status display (e.g. `/status`) will report elevated as `"on"` while the actual runtime behavior resolves to `"off"` when no explicit `elevatedDefault` is configured. If the intent is to change the default to `"off"`, these other locations should be updated as well to keep the behavior consistent.

How can I resolve this? If you propose a fix, please make it concise.

@gumadeiras gumadeiras self-assigned this Feb 18, 2026
@gumadeiras gumadeiras force-pushed the fix/19643-tui-block-streaming branch from 32d64a4 to 90e5cbf Compare February 18, 2026 20:53
@openclaw-barnacle openclaw-barnacle bot removed the agents Agent runtime and tooling label Feb 18, 2026
hu and others added 3 commits February 18, 2026 16:09
… TUI

The chat.send handler was hardcoding disableBlockStreaming: true, which
overrode the agents.defaults.blockStreamingDefault config setting. This
caused TUI to ignore the blockStreamingDefault config and always stream
token-by-token, overwriting previous content.

Now the blockStreamingDefault config is respected for TUI/webchat just
like other channels.

Fixes openclaw#19643
@gumadeiras gumadeiras force-pushed the fix/19643-tui-block-streaming branch from d338b7b to 0e45297 Compare February 18, 2026 21:12
@gumadeiras gumadeiras merged commit b62bd29 into openclaw:main Feb 18, 2026
22 of 23 checks passed
@gumadeiras
Copy link
Member

Merged via squash.

Thanks @neipor!

jun-planfit pushed a commit to planfit/openclaw that referenced this pull request Feb 19, 2026
… TUI (openclaw#19693)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 710d449
Co-authored-by: neipor <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
anschmieg pushed a commit to anschmieg/openclaw that referenced this pull request Feb 19, 2026
… TUI (openclaw#19693)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 710d449
Co-authored-by: neipor <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
yneth-ray-openclaw pushed a commit to yneth-ray-openclaw/openclaw that referenced this pull request Feb 19, 2026
… TUI (openclaw#19693)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 710d449
Co-authored-by: neipor <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
HenryChenV pushed a commit to HenryChenV/openclaw that referenced this pull request Feb 20, 2026
… TUI (openclaw#19693)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 710d449
Co-authored-by: neipor <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui gateway Gateway runtime size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: TUI: blockStreamingDefault has no effect — assistant responses overwrite/wipe during streaming

4 participants

Comments