GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Is there any way to debug compaction/token usage/prompts? · Issue #4113 · anomalyco/opencode

Is there any way to debug compaction/token usage/prompts? #4113

New issue
Copy link
New issue
Copy link
Closed
Closed
Is there any way to debug compaction/token usage/prompts?#4113
Copy link

Description

@oafx
oafx
opened on Nov 9, 2025
Issue body actions

Question

I feel like compaction is not working correctly currently.. i have 'limited' token budget (~130k) for my models and compaction runs like, every second message, even if it's just "wait a sec" and the agent returns "yeah sure" i see increases of token budgets by like 40k tokens.. then we'll spiral in auto compaction which only reduces the token usage down to like 90k.. and of course, if this wasn't strange enough, the compaction leads to pretty annoying memory loss/shift of objectives, which i can understand but it just feels off if it happens every few messages..

any hints on how to deliver more useful insights/bug reports to you guys? thanks!

Reacted by 0x01

Activity

  1. Aureatus commented on Nov 9, 2025

    @Aureatus
    Aureatus
    on Nov 9, 2025
    More actions

    In ~/.local/share/opencode/log you can find the opencode logs - by default the compaction logs don't have much info - just stuff like: INFO 2025-11-04T20:38:02 +0ms service=session.compaction pruning but per the docs - if you ran opencode with debug logging (opencode --log-level DEBUG) you might see more interesting info in there.

    Other than that - can you share the opencode config you're using? (your repo level opencode.json and your global config at ~/.config/opencode/opencode.json

  2. oafx commented on Nov 9, 2025

    @oafx
    oafx
    on Nov 9, 2025
    Author
    More actions

    thanks! will give this a try. currently it looks like there haven't been any logs written for 2 days. in regards to your request, sure but it's pretty much standard, just tested the openai oauth codex plugin.. but i'm using primarily github copilot as agents

    /* cat ~/.config/opencode/opencode.json */
    {
      "$schema": "https://opencode.ai/config.json",
      "plugin": [
        "opencode-openai-codex-auth"
      ],
      "provider": {
        "openai": {
          "options": {
            "reasoningEffort": "medium",
            "reasoningSummary": "auto",
            "textVerbosity": "medium",
            "include": [
              "reasoning.encrypted_content"
            ],
            "store": false
          },
          "models": {
            "gpt-5-codex-low": {
              "name": "GPT 5 Codex Low (OAuth)",
              "options": {
                "reasoningEffort": "low",
                "reasoningSummary": "auto",
                "textVerbosity": "medium",
                "include": [
                  "reasoning.encrypted_content"
                ],
                "store": false
              }
            },
            "gpt-5-codex-medium": {
              "name": "GPT 5 Codex Medium (OAuth)",
              "options": {
                "reasoningEffort": "medium",
                "reasoningSummary": "auto",
                "textVerbosity": "medium",
                "include": [
                  "reasoning.encrypted_content"
                ],
                "store": false
              }
            },
            "gpt-5-codex-high": {
              "name": "GPT 5 Codex High (OAuth)",
              "options": {
                "reasoningEffort": "high",
                "reasoningSummary": "detailed",
                "textVerbosity": "medium",
                "include": [
                  "reasoning.encrypted_content"
                ],
                "store": false
              }
            },
            "gpt-5-minimal": {
              "name": "GPT 5 Minimal (OAuth)",
              "options": {
                "reasoningEffort": "minimal",
                "reasoningSummary": "auto",
                "textVerbosity": "low",
                "include": [
                  "reasoning.encrypted_content"
                ],
                "store": false
              }
            },
            "gpt-5-low": {
              "name": "GPT 5 Low (OAuth)",
              "options": {
                "reasoningEffort": "low",
                "reasoningSummary": "auto",
                "textVerbosity": "low",
                "include": [
                  "reasoning.encrypted_content"
                ],
                "store": false
              }
            },
            "gpt-5-medium": {
              "name": "GPT 5 Medium (OAuth)",
              "options": {
                "reasoningEffort": "medium",
                "reasoningSummary": "auto",
                "textVerbosity": "medium",
                "include": [
                  "reasoning.encrypted_content"
                ],
                "store": false
              }
            },
            "gpt-5-high": {
              "name": "GPT 5 High (OAuth)",
              "options": {
                "reasoningEffort": "high",
                "reasoningSummary": "detailed",
                "textVerbosity": "high",
                "include": [
                  "reasoning.encrypted_content"
                ],
                "store": false
              }
            },
            "gpt-5-mini": {
              "name": "GPT 5 Mini (OAuth)",
              "options": {
                "reasoningEffort": "low",
                "reasoningSummary": "auto",
                "textVerbosity": "low",
                "include": [
                  "reasoning.encrypted_content"
                ],
                "store": false
              }
            },
            "gpt-5-nano": {
              "name": "GPT 5 Nano (OAuth)",
              "options": {
                "reasoningEffort": "minimal",
                "reasoningSummary": "auto",
                "textVerbosity": "low",
                "include": [
                  "reasoning.encrypted_content"
                ],
                "store": false
              }
            }
          }
        }
      }
    }

    and no project specific opencode.json

  3. rekram1-node commented on Nov 9, 2025

    @rekram1-node
    rekram1-node
    on Nov 9, 2025
    Member
    More actions

    @oafx u can export any session to json:

    opencode export > out.json (if u dont redirect then it goes to stdout)

    It will open a list to select a session from

    Reacted by Alex
  4. thdxr
    closed this as completedon Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.