Skip to content

gut: remove dead Thinking and Reasoning session settings #373

@alexey-pelykh

Description

@alexey-pelykh

Context

The Sessions UI (and cron job forms) expose Thinking, Verbose, and Reasoning dropdowns per session. These are upstream OpenClaw features from when the execution engine called model APIs directly and could pass thinking budgets / reasoning parameters.

RemoteClaw replaced the execution engine with AgentRuntime — CLI-only agents (Claude, Gemini, Codex, OpenCode). Two of the three settings are now dead:

Thinking — dead, gut it

  • thinkingLevel is resolved per-session and stored, but never reaches the middleware runtimes
  • AgentExecuteParams (the interface runtimes receive) doesn't include thinkLevel
  • CLI agents self-select thinking behavior — there's no CLI flag to control it
  • The entire resolution/validation pipeline (resolveThinkLevelDisplay, resolveThinkLevelOptions, binary vs granular provider detection) is waste

Reasoning — dead, gut it

  • All four runtimes explicitly discard reasoning/thinking events:
    • Claude (src/middleware/runtimes/claude.ts:157): // thinking_delta and other delta types are skipped → returns null
    • OpenCode (src/middleware/runtimes/opencode.ts:106-107): case "reasoning": return null;
    • Codex: lists reasoning as item type but doesn't handle it
    • Gemini: no mention at all
  • The Telegram reasoning lane infrastructure (reasoning-lane-coordinator.ts, splitTelegramReasoningText()) parses <thinking> tags from text, but since runtimes never emit reasoning content as text, there's nothing to parse
  • reasoningLevel session setting has no effect

Verbose — keep

  • verboseLevel controls post-processing delivery (whether tool results/output are relayed to the messaging channel)
  • This works correctly with AgentRuntime — it gates what gets forwarded from agent events to the channel
  • No changes needed

Scope

  • Remove Thinking and Reasoning columns from Sessions UI table
  • Remove Thinking and Reasoning dropdowns from cron job forms
  • Remove thinkingLevel and reasoningLevel from session config types and patch endpoints
  • Gut thinking resolution pipeline (resolveThinkLevelDisplay, resolveThinkLevelOptions, binary provider detection, etc.)
  • Gut reasoning lane infrastructure (Telegram reasoning-lane-coordinator, splitTelegramReasoningText, reasoning status reactions)
  • Remove /think and /reasoning directive handling
  • Clean up reasoning-tags.ts strip utilities if no longer needed (verbose may still use tag stripping)
  • Remove associated tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions