{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/arxiv-2608-11775","title":"The Sleeping Agent: What Gist-Based Context Compression Loses and Why","arxiv_id":"2608.11775","date":"2026-08-12","proceeding":null,"authors":["Nicholas E. Kyrkewood"],"abstract":"Gist-based context compression---summarising older conversation history into compact representations---is a common approach in long-horizon language model agents, yet its effect on different types of memory retrieval is poorly understood. We use Salience-Weighted Consolidation (SWC), a biologically-inspired compression framework motivated by sleep-based memory consolidation, as a diagnostic probe to study when gist compression helps and when it hurts. SWC scores conversation history by salience, partitions it into priority tiers, and applies structured gist abstraction to mid-priority content. Evaluating four conditions on all ten LoCoMo conversations---1,935 matched text-only questions in total, 1,501 used in the primary aggregate after excluding Category 5 (adversarial) questions---at temperature 0, we find a consistent task-type interaction: gist compression substantially outperforms truncation on multi-hop reasoning and single-hop factual questions, but temporal questions remain substantially harder under compression, with compressed conditions scoring well below the full-context reference on the conversations where both are evaluated. We trace this failure to a specific mechanism: the gist abstraction prompt preserves relational and event structure while discarding dates and times. A preservation analysis across all ten conversations confirms the mechanism: an approximately 20-fold increase in temporal expression preservation (3.05% to 62.39%) with a one-sentence prompt modification, while named entity and event preservation rates barely change (x1.02 and x1.11), demonstrating that the fix is a precision instrument. The prompt modification recovers +0.314 [0.254, 0.375] judge accuracy on category-2 (temporal) questions in the matched set. Code and results: https://github.com/kyrkewood/sleeping-agent.","url_abs":"https://arxiv.org/abs/2608.11775","url_pdf":"https://arxiv.org/pdf/2608.11775","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":null,"mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2608.11775"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/kyrkewood/sleeping-agent","reach":null}],"summary":{"ran":12},"by_repo_kind":{"found_in_text":{"samples":12,"ran":12,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"b59e234b597bb369","entry":"aggregate_results","repo":"kyrkewood/sleeping-agent","repo_kind":"found_in_text","path":"src/scoring.py","file_url":"https://github.com/kyrkewood/sleeping-agent/blob/HEAD/src/scoring.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b59e234b597bb369"}},{"code_sha256_prefix":"b2bc687a414410e6","entry":"compute_f1","repo":"kyrkewood/sleeping-agent","repo_kind":"found_in_text","path":"src/scoring.py","file_url":"https://github.com/kyrkewood/sleeping-agent/blob/HEAD/src/scoring.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b2bc687a414410e6"}},{"code_sha256_prefix":"ad7db7e3f8b5a12e","entry":"f1_by_category","repo":"kyrkewood/sleeping-agent","repo_kind":"found_in_text","path":"src/scoring.py","file_url":"https://github.com/kyrkewood/sleeping-agent/blob/HEAD/src/scoring.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ad7db7e3f8b5a12e"}},{"code_sha256_prefix":"d20258d100d4f4e6","entry":"format_qa_user_message","repo":"kyrkewood/sleeping-agent","repo_kind":"found_in_text","path":"src/qa_prompt.py","file_url":"https://github.com/kyrkewood/sleeping-agent/blob/HEAD/src/qa_prompt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d20258d100d4f4e6"}},{"code_sha256_prefix":"8262fc4ce5c1e69f","entry":"is_multimodal_qa","repo":"kyrkewood/sleeping-agent","repo_kind":"found_in_text","path":"src/dataset.py","file_url":"https://github.com/kyrkewood/sleeping-agent/blob/HEAD/src/dataset.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8262fc4ce5c1e69f"}},{"code_sha256_prefix":"1b89278c4b21518c","entry":"min_evidence_session","repo":"kyrkewood/sleeping-agent","repo_kind":"found_in_text","path":"src/dataset.py","file_url":"https://github.com/kyrkewood/sleeping-agent/blob/HEAD/src/dataset.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1b89278c4b21518c"}},{"code_sha256_prefix":"01b7a6026e5e2bc4","entry":"parse_evidence_session","repo":"kyrkewood/sleeping-agent","repo_kind":"found_in_text","path":"src/dataset.py","file_url":"https://github.com/kyrkewood/sleeping-agent/blob/HEAD/src/dataset.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"01b7a6026e5e2bc4"}},{"code_sha256_prefix":"a1c7c0dc37ef0b5f","entry":"parse_yes_no","repo":"kyrkewood/sleeping-agent","repo_kind":"found_in_text","path":"src/judge.py","file_url":"https://github.com/kyrkewood/sleeping-agent/blob/HEAD/src/judge.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a1c7c0dc37ef0b5f"}},{"code_sha256_prefix":"b004b1ccc2da5306","entry":"rem_cache_get","repo":"kyrkewood/sleeping-agent","repo_kind":"found_in_text","path":"src/rem_cache.py","file_url":"https://github.com/kyrkewood/sleeping-agent/blob/HEAD/src/rem_cache.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b004b1ccc2da5306"}},{"code_sha256_prefix":"04171c79b5269391","entry":"rem_cache_path","repo":"kyrkewood/sleeping-agent","repo_kind":"found_in_text","path":"src/rem_cache.py","file_url":"https://github.com/kyrkewood/sleeping-agent/blob/HEAD/src/rem_cache.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"04171c79b5269391"}},{"code_sha256_prefix":"0d2abaefbf774fd7","entry":"truncate_for_debug","repo":"kyrkewood/sleeping-agent","repo_kind":"found_in_text","path":"src/diagnostics.py","file_url":"https://github.com/kyrkewood/sleeping-agent/blob/HEAD/src/diagnostics.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0d2abaefbf774fd7"}},{"code_sha256_prefix":"f1c2f575210e2fef","entry":"write_lightmem_stub","repo":"kyrkewood/sleeping-agent","repo_kind":"found_in_text","path":"src/lightmem_baseline.py","file_url":"https://github.com/kyrkewood/sleeping-agent/blob/HEAD/src/lightmem_baseline.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f1c2f575210e2fef"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.CL","source":"arxiv_2026.jsonl"},"syntology_extracted_results":null}