npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@rontian/opencode-likecodex

v0.1.0

Published

An OpenCode plugin that reduces noisy intermediate output and keeps user-facing responses concise.

Readme

opencode-likecodex

opencode-likecodex is an OpenCode plugin that makes CLI sessions cleaner and more concise:

  • less noisy final/tool output
  • fewer raw tool logs
  • tighter session compaction
  • concise user-facing final answers

What it can do today

Based on the OpenCode plugin hooks currently documented and typed in @opencode-ai/plugin, this plugin can reliably intercept and influence:

  • chat system prompt construction
  • chat message history before the model call
  • session compaction prompt generation
  • tool execution output after a tool finishes
  • event notifications for messages, tools, and session lifecycle

That gives us strong control over:

  • reducing visible verbosity by policy
  • shrinking tool output before it propagates
  • keeping future turns focused by compacting the right context

Important boundary

OpenCode's current plugin surface appears to provide strong request-side and tool-side hooks, but not a documented "rewrite the already-streaming assistant answer" hook.

In practice, this plugin can:

  • strongly steer the model away from exposed chain-of-thought
  • compress tool noise
  • improve compacted memory
  • improve concise execution and final output quality

It cannot reliably hide CLI/TUI Thinking blocks or other UI-layer narration after they start rendering.

Current behavior

The current version implements these controls:

  1. Appends a strict visible-output policy to the system prompt.
  2. Caps overly long model outputs through chat.params.
  3. Removes reasoning parts from assistant history before future model calls.
  4. Optionally drops synthetic or ignored assistant text from reused history.
  5. Truncates oversized tool outputs after execution.
  6. Truncates stored assistant/tool text before it is reused in later turns.
  7. Refines session compaction so it preserves only goals, decisions, validation, and pending work.
  8. Optionally disables automatic post-compaction continue in strict mode.

Modes

Two modes are built in:

  • balanced Keeps more context and is safer as a default for daily use.
  • strict Compresses harder, drops more intermediate text, and is better when you want the cleanest visible UX.

Configuration

You can pass plugin options through opencode.json when using the npm-installed variant:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": [
    [
      "@rontian/opencode-likecodex",
      {
        "mode": "strict",
        "maxToolChars": 1200,
        "maxToolLines": 18,
        "dropSyntheticAssistantText": true,
        "disableAutocontinueOnOverflow": true
      }
    ]
  ]
}

Supported options:

  • mode: balanced or strict
  • maxToolChars
  • maxToolLines
  • maxHistoryTextChars
  • maxHistoryTextLines
  • maxCommandChars
  • maxCommandLines
  • capMaxOutputTokens
  • dropReasoningHistory
  • dropSyntheticAssistantText
  • dropIgnoredText
  • disableAutocontinueOnOverflow
  • debugSummaries

Install locally

Build the package:

npm install
npm run build

Preview the current summarization behavior locally:

npm run demo

Replay the message-history transforms locally:

npm run replay

Then use one of these approaches:

Local plugin directory

Place the built plugin where OpenCode loads local plugins, such as:

  • .opencode/plugins/
  • ~/.config/opencode/plugins/

npm plugin

Publish this package to npm, then reference it in opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["@rontian/opencode-likecodex"]
}

OpenCode should install it automatically on startup using Bun.

Project-local testing

This repository already includes a project-local plugin entrypoint:

  • .opencode/plugins/opencode-likecodex.js

That file re-exports the built plugin from dist/index.js, so for local testing you only need:

npm install
npm run build

Then start OpenCode from this project directory.

Load marker

When the plugin is active, it injects these environment variables into shell tool execution:

  • OPENCODE_LIKECODEX_ACTIVE=1
  • OPENCODE_LIKECODEX_MODE=balanced or strict

That gives you a lightweight way to confirm the plugin is loaded during local testing.

Recommended use with oh-my-openagent

If you run OpenCode with an additional agent/profile layer such as oh-my-openagent, this plugin works best as a helper layer:

  • use it to compress tool output
  • use it to keep final answers shorter
  • use it to clean history before later turns

Do not expect it to fully suppress:

  • top-of-screen mode banners
  • CLI/TUI Thinking blocks
  • narration emitted directly by the active agent profile

Publish

npm login
npm publish

Recommended before publishing:

  • verify the package builds cleanly
  • test it in a local OpenCode install
  • document the exact OpenCode version you validated against

Status

This repository is currently best treated as a practical CLI output-polish plugin, not a full Codex-style UI replacement.

It is a good fit when you want:

  • shorter final answers
  • less noisy tool output
  • cleaner reused history in later turns

It is not a full fit when you want:

  • hidden CLI/TUI Thinking blocks
  • hidden top-of-screen agent/profile banners
  • full control over narration emitted by another agent layer