Skip to content

[Upstream #136] /compact not working #108

@quangdang46

Description

@quangdang46

Mirrored from upstream 1jehuang/jcodeIssue #136 by @ritamgh
Original state: open
Created: 2026-05-05T22:18:40Z · Updated: 2026-05-05T22:18:40Z
This issue is an auto-mirrored copy. Comments and edits here are local to quangdang46/jcode — do not expect them to propagate upstream.


Issue

Manual /compact appears to start but never applies the summary.

Environment

  • jcode version: v0.11.15 (238fd6ed)
  • OS: macOS arm64
  • Provider/model seen in session: OpenRouter/Kimi, also tested with GPT model sessions
  • Config:
    • [compaction] mode = "reactive"
    • openai_native_compaction_mode = "auto"
    • openai_native_compaction_threshold_tokens = 200000

What I did

In an active TUI session, I ran:

/compact

The UI printed:

Requesting compaction…

Context Status:
• Messages: 150 (active), 0 (total history)
• Token usage: ~124k (estimate ~124k) / 200k (62.0%)
• Has summary: no
• Compacting: no

Compacting context (manual) — summarizing older messages in the background to stay within the context window.
The summary will be applied automatically when ready.

Expected behavior

After the background compaction finishes:

  • context status should show Has summary: yes, or token usage should drop
  • session metadata/journal should persist a non-null compaction summary
  • the UI should report completion or failure if compaction cannot be applied

Actual behavior

The command is acknowledged, but it never completes or applies.

After waiting, local inspection showed:

  • active session journal still had "compaction": null
  • session journal file stopped updating after the last normal assistant response
  • no obvious compaction completion/failure entry in ~/.jcode/logs/jcode-2026-05-06.log
  • no clear messages_for_provider (compaction) entry found in logs
  • /context still showed no summary and similar token usage

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions