SentinelLABS evaluated OpenAI's native context compaction feature against their automated malware analysis evaluation harness. Compaction reduced input tokens by ~86% with no measurable change to aggregate task quality scores, though domain object modeling showed a slight decline. The post explains the architectural distinction between working memory (handled by compaction) and durable storage (for exact artifacts), covers both server-side and standalone compaction API patterns with code examples, and offers practical guidance on when to use each approach. The broader takeaway is that context engineering — managing what the model sees across turns — is as important as model selection for long-running agentic security workflows.
Table of contents
Executive SummaryWhy Malware Analysis Is a Hard Problem for AgentsHow We Applied CompactionResultsImplementationHow to Use CompactionConclusionReferences703 Impressions1 Comment