Skip to content

/goal auto-compaction still does not trigger after #3147 with strategy: context-full #3174

Description

@luceat-lux-vestra

Description

After updating to the release that includes #3147 , auto-compaction still does not trigger during /goal mode in my environment.
I am using compaction.strategy: context-full, not handoff.
The session exceeded the configured fixed threshold:
compaction:
enabled: true
strategy: context-full
thresholdTokens: 76384
thresholdPercent: -1
keepRecentTokens: 10000
reserveTokens: 16384
autoContinue: true
supersedeReads: true
dropUseless: true
idleEnabled: false
remoteEnabled: false
The visible context/token usage went over 90k tokens, which is higher than thresholdTokens: 76384, but auto-compaction did not run.
Manual compaction works, but threshold-based auto-compaction in /goal mode does not appear to trigger.
I also tried a local change to make the successful-yield branch always call #checkCompaction(...) before returning, but the issue still reproduced. So this may not be only the early-return path fixed by #3147.

Steps to Reproduce

Update to a release that includes #3147 .
Use the following config:
loop:
mode: compact

compaction:
enabled: true
strategy: context-full
thresholdTokens: 76384
thresholdPercent: -1
keepRecentTokens: 10000
reserveTokens: 16384
autoContinue: true
supersedeReads: true
dropUseless: true
idleEnabled: false
remoteEnabled: false
Start a long-running /goal session.
Let the session continue until the visible context/token usage exceeds 76384 tokens.
In my case, the session exceeded 90k tokens.
Observe whether threshold auto-compaction runs.

Expected Behavior

Once the active /goal session exceeds compaction.thresholdTokens, auto-compaction should run automatically.
With the config above, auto-compaction should become eligible once the session exceeds 76384 tokens.
Since the session reached over 90k tokens, I expected context-full auto-compaction to run before the goal continued further.

Actual Behavior
The /goal session continued past the configured threshold.
No automatic compaction appeared to run, even after the visible context/token usage exceeded 90k tokens.
Manual compaction still works.

Error Output

Platform

macOS

omp version

16.1.9

Bun version

1.3.14

Provider

None

Area

None

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    agentAgent runtime planning and orchestrationbugSomething isn't workingplatform:macosmacOS-specificprio:p1High: significant impact, near-term fixtriaged

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions