Problem
The client.session.summarize call in src/four-opencode-context-curator.ts is using the wrong arguments. This is likely why compact_now signals don't trigger the native /compact command — the internal SDK method is being called with an incorrect signature, causing the compaction to silently fail or never execute.
Expected Behavior
The call to client._session.client.session.summarize() should match the internal opencode SDK call signature. Based on the opencode source (packages/opencode/src/session/prompt.ts:1436 and packages/opencode/src/session/compaction.ts:384), the correct invocation needs to be verified against the actual method signature.
Impact
compact_now signals emitted by the context curator do not trigger real compaction
- Users may not realize their context is growing unbounded because the compaction signal appears to work but doesn't actually invoke
session.summarize()
Action Required
- Verify the correct call signature for
session.summarize() against packages/opencode/src/session/compaction.ts
- Fix the argument order / parameters in
four-opencode-context-curator.ts
- Test that a
compact_now signal actually triggers native opencode compaction
References
- opencode-src compaction agent:
packages/opencode/src/agent/prompt/compaction.txt
- opencode-src compaction call site:
packages/opencode/src/session/compaction.ts:384
session.summarize() entry point: packages/opencode/src/session/compaction.ts
Problem
The
client.session.summarizecall insrc/four-opencode-context-curator.tsis using the wrong arguments. This is likely whycompact_nowsignals don't trigger the native/compactcommand — the internal SDK method is being called with an incorrect signature, causing the compaction to silently fail or never execute.Expected Behavior
The call to
client._session.client.session.summarize()should match the internal opencode SDK call signature. Based on the opencode source (packages/opencode/src/session/prompt.ts:1436andpackages/opencode/src/session/compaction.ts:384), the correct invocation needs to be verified against the actual method signature.Impact
compact_nowsignals emitted by the context curator do not trigger real compactionsession.summarize()Action Required
session.summarize()againstpackages/opencode/src/session/compaction.tsfour-opencode-context-curator.tscompact_nowsignal actually triggers native opencode compactionReferences
packages/opencode/src/agent/prompt/compaction.txtpackages/opencode/src/session/compaction.ts:384session.summarize()entry point:packages/opencode/src/session/compaction.ts