Skip to content

Commit 64ab445

Browse files
committed
fix: remove stale [Context Restoration] and [Working Directory] assertions from compaction test
The [Working Directory] section was removed from buildPostCompactContext since it's redundant with the system prompt's Primary working directory field. This means contextParts can be empty in test scenarios with no file reads/plan/skills/background tasks, so [Context Restoration] is never appended. Remove both assertions.
1 parent 4748c35 commit 64ab445

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

packages/agent-sdk/tests/agent/agent.compaction.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,8 +535,6 @@ describe("Agent Message Compaction Tests", () => {
535535
expect(compactBlock.content).toContain(
536536
"Compacted content: This contains summary information of previous multi-round conversations.",
537537
);
538-
expect(compactBlock.content).toContain("[Context Restoration]");
539-
expect(compactBlock.content).toContain("[Working Directory]");
540538

541539
// Reset messagesPassedToCallAgent to capture parameters for the second call
542540
messagesPassedToCallAgent = [];

0 commit comments

Comments
 (0)