Skip to content

feat: add ultrathink keyword and ultracode effort level (Claude Code CLI parity) #1551

@alfep

Description

@alfep

Summary

Add support for the ultrathink in-prompt keyword and the ultracode effort level, mirroring the behavior available in Claude Code CLI. These give users fine-grained control over reasoning depth without manually adjusting effort every session.

What exists in Claude Code CLI

1. ultrathink keyword

Users can write ultrathink anywhere in their prompt. Claude Code detects the keyword and injects an in-context instruction asking the model to reason more deeply on that turn only. The session effort level sent to the API is not changed — this is purely an in-context prompt augmentation.

  • Works as a one-off, per-turn override
  • Phrases like "think", "think hard", or "think more" are not detected — only the exact token ultrathink
  • Does not require any API-level support from the provider (it's just text in context)
  • Documented in official Claude Code docs: model-config#adjust-effort-level

2. ultracode effort level

Available in the /effort picker as one of the options. It is not an API effort level — it sends xhigh to the API and also grants the model standing permission to orchestrate dynamic multi-agent workflows. Session-only (not persisted).

Reference from official docs:

ultracode is not an additional API effort level. Ultracode pairs the xhigh effort level with standing permission for Claude Code to launch multi-agent workflows.

Effort levels in Claude Code CLI (for reference)

Level Behavior
low Fast, scoped tasks, latency-sensitive
medium Cost-sensitive, balanced
high Balanced speed + intelligence (default for most models)
xhigh Deeper reasoning, more tokens
max Maximum reasoning, risk of overthinking
ultracode xhigh + multi-agent orchestration permission (session-only)

Current OpenClaude effort picker appears to go up to high. Adding xhigh, max, and ultracode would achieve feature parity.

Proposed implementation

Ultrathink

  1. Scan user prompt for the exact token ultrathink (case-insensitive match recommended)
  2. When detected, inject an in-context system instruction to the model before the turn is sent, e.g.:

    "The user has requested deeper reasoning for this turn. Take extra care to think step by step, explore edge cases, and reason thoroughly before responding."

  3. No change to the API reasoning_effort or effort parameter — this works purely at the prompt level
  4. Works with any provider (Anthropic, OpenRouter, Ollama, 9Router, etc.) since it's just prompt text

Ultracode effort level

  1. Add ultracode as a selectable option in /effort picker (alongside xhigh and max if not already present)
  2. When selected, send xhigh as the reasoning_effort value in the API request
  3. Append a session-level permission instruction to the system prompt enabling multi-agent workflow orchestration
  4. Mark as session-only (do not persist across restarts, same as Claude Code CLI behavior)

Also missing: xhigh and max effort levels

The /effort picker should ideally include all levels: low, medium, high, xhigh, max, ultracode. Currently it seems to cap at high.

Motivation

Users who work on complex codebases, multi-step implementations, and agentic workflows benefit from being able to request deeper reasoning on demand without changing their global session effort. The ultrathink keyword is lightweight (no provider support needed) and ultracode enables the most demanding agentic use cases. Both are signature features of Claude Code CLI.

Environment

  • OpenClaude CLI
  • Provider: Gitlawb OpenGateway (also tested with 9Router)
  • Models: various (Qwen 3.7 Max, NVIDIA Nemotron, Xiaomi Mimo, etc.)
  • OS: Windows 11 IoT Enterprise LTSC

Relevant references

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions