Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions packages/opencode/src/session/processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { Snapshot } from "@/snapshot"
import { Session } from "./session"
import { LLM } from "./llm"
import { MessageV2 } from "./message-v2"
import { isOverflow } from "./overflow"
import { PartID } from "./schema"
import type { SessionID } from "./schema"
import { SessionRetry } from "./retry"
Expand Down Expand Up @@ -474,12 +473,6 @@ const layer = Layer.effect(
messageID: ctx.assistantMessage.parentID,
})
.pipe(Effect.ignore, Effect.forkIn(scope))
if (
!ctx.assistantMessage.summary &&
isOverflow({ cfg: yield* config.get(), tokens: usage.tokens, model: ctx.model })
) {
ctx.needsCompaction = true
}
return
}

Expand Down
4 changes: 2 additions & 2 deletions packages/opencode/test/session/processor-effect.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ it.live("session.processor effect tests preserve text start time", () =>
),
)

it.live("session.processor effect tests stop after token overflow requests compaction", () =>
it.live("session.processor effect tests defer proactive compaction after token overflow", () =>
provideTmpdirServer(
({ dir, llm }) =>
Effect.gen(function* () {
Expand Down Expand Up @@ -410,7 +410,7 @@ it.live("session.processor effect tests stop after token overflow requests compa

const parts = yield* MessageV2.parts(msg.id)

expect(value).toBe("compact")
expect(value).toBe("continue")
expect(parts.some((part) => part.type === "text" && part.text === "after")).toBe(true)
expect(parts.some((part) => part.type === "step-finish")).toBe(true)
}),
Expand Down
Loading