Skip to content
    ↑↓ select↵ openesc close
    English中文
    old-mikser

    Occontext Thinking Trim

    v1.0.3Observability
    @old-mikser/occontext-thinking-trim

    OpenCode plugin to trim thinking/reasoning from context to reduce token usage

    Repository archivedNo commits in six months
    GitHub stars

    0

    Monthly installs

    28

    11 in 7 days

    Composite scoreSCORE

    6.7

    Multi-signal model

    Last commit

    6 months ago

    2026-02-18

    Install and configure

    opencode.json

    Writes to this project's opencode.json — applies to this repository only.

    opencode.json

    {
      "$schema": "https://opencode.ai/config.json",
      "plugin": ["@old-mikser/occontext-thinking-trim@1.0.3"]
    }

    opencode loads npm dependencies through its embedded runtime on startup and caches them locally — no manual global install needed.

    OpenCode plugin that trims thinking/reasoning from context while preserving display.

    Why?

    Models with extended thinking (Claude, DeepSeek, etc.) send reasoning back in context on each request. This can:

    • Increase token usage
    • Potentially influence model behavior in unwanted ways

    This plugin removes reasoning from the context sent to the model, while keeping it visible in the UI.

    Installation

    Add to your opencode.json:

    {
      "plugins": ["@old-mikser/occontext-thinking-trim"]
    }
    

    On first run, the plugin creates ~/.config/opencode/OCTT.jsonc with default settings.

    Configuration

    Edit ~/.config/opencode/OCTT.jsonc:

    {
      // Enable or disable thinking trim
      "enabled": true,
      
      // Number of recent turns to preserve thinking
      // 0 = trim all thinking from context
      // 2 = keep thinking in last 2 assistant messages
      "keepTurns": 0
    }
    

    Options

    Option Type Default Description
    enabled boolean true Enable/disable the plugin
    keepTurns number 0 Number of recent turns to preserve thinking. 0 = trim all

    Example

    With keepTurns: 2, the last 2 assistant messages will keep their reasoning intact, while older reasoning is removed.

    License

    MIT