Skip to content

[Feature]: add a hook to compact CLI outputs. #2415

@bxb1337

Description

@bxb1337

Prerequisites

  • I will write this issue in English (see our Language Policy)
  • I have searched existing issues and discussions to avoid duplicates
  • This feature request is specific to oh-my-opencode (not OpenCode core)
  • I have read the documentation or asked an AI coding agent with this project's GitHub URL loaded and couldn't find the answer

Problem Description

In LLM, excessive CLI output can waste your tokens and pollute the context window, preventing the LLM from focusing on the task at hand.

Proposed Solution

rtk does this in claude code. It does compact your session, avoid wasting your token, and let LLMs work better with less-polluted context (clear useless CLI outputs). So, it will be great if oh-my-opencode can integrate this or implement a similar solution.

Alternatives Considered

No response

Doctor Output (Optional)

Additional Context

No response

Feature Type

New Hook

Contribution

  • I'm willing to submit a PR for this feature
  • I can help with testing
  • I can help with documentation

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions