You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "Astro-Han (via GitHub)" <gi...@apache.org> on 2026/08/23 02:12:49 UTC

[I] Manual context compaction skips a single long turn [maka]

Astro-Han opened a new issue, #3542:
URL: https://github.com/apache/maka/issues/3542

   ## What happened
   
   Manual Context Compaction does nothing when the completed Session history contains only one user Turn, even if that Turn contains a long Agent Loop with many completed assistant and tool steps.
   
   The result is `unchanged` with reason `insufficient_turns`. The summarizer is never called.
   
   A Turn can legitimately contain many Agent Loop steps, so Turn count should not decide whether its completed history can be compacted.
   
   ## How to reproduce
   
   1. Start a Session with one user Turn.
   2. Let the Agent Loop produce a substantial number of completed assistant and tool steps.
   3. Wait for the Turn to finish.
   4. Run manual Context Compaction.
   5. Observe `insufficient_turns` and no new checkpoint.
   
   With the same RuntimeEvents, `minRecentTurns: 1` reproduces the skip. Setting it to `0` selects a replaceable prefix and produces a checkpoint draft.
   
   ## Environment
   
   - Maka commit: `f19eede03a829c226be39f001b2684860a3aa1d5`
   - OS: macOS
   - Surface: Desktop / Runtime Host
   
   ## Logs, screenshots, or additional context
   
   The guard is in `packages/runtime/src/history-compact.ts`: histories with at most one Turn are rejected unless `minRecentTurns === 0`.
   
   Manual compaction defaults this value to `1`. Oversized-turn recovery already overrides it to `0`.
   
   The fix should also remove the duplicated manual policy construction. Manual, pre-turn, mid-turn, and overflow compaction should use the same checkpoint path, with trigger-specific retention expressed as explicit input. The change should cut over atomically and remove the superseded production path in the same PR.
   
   The separate, default-off `semanticCompact` experiment is out of scope and is being discussed separately in #3541.
   
   Drafted with Codex. I reproduced the behavior and reviewed the report.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [I] Manual context compaction skips a single long turn [maka]

Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han commented on issue #3542:
URL: https://github.com/apache/maka/issues/3542#issuecomment-5383746246

   I’d like to take this one. I reproduced the single-Turn skip locally and confirmed that the same events become compactable when the manual path stops retaining the whole Turn.
   
   I’ll use this fix to consolidate the standard manual, pre-turn, mid-turn, and overflow cases onto one checkpoint path, with the old production path removed in the same PR. I’ll keep `semanticCompact` out of this change while its future is discussed separately.
   
   I’m using Codex for the implementation and will review the final diff and test evidence myself.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [I] Manual context compaction skips a single long turn [maka]

Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han closed issue #3542: Manual context compaction skips a single long turn
URL: https://github.com/apache/maka/issues/3542


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org