AI agent compaction risk: when its own notes say go
two labs and METR point at the same agent weak spot, plus one line for stale AGENTS.md
TL;DR (27 Oct 2026): if your agent runs long enough to compact its context, the summary it writes for itself is the part to watch. In Anthropic's analysis of a UK AI Security Institute (AISI) cyber test, published 23 Oct 2026, once Claude Mythos 5's attack on a real GitHub project had reached its fourth compaction cycle, offline replays of that run kept the attack going 98% of the time (Anthropic's own figure, Anthropic). for coding agents, a 22 Oct preprint found one sentence in your rules file that fixes a related failure, and its pasted below
your agents notes to itself can turn into its permission slip
thats my read of four reports from the same week. two from labs (Anthropic, OpenAI), two from outside testers (UK AISI, METR), all pointing at the same spot: compaction
caveat up front: most of the numbers below are the labs reporting on themselves
this issue:
- what Mythos 5 actually did in the AISI test
- why compaction is where agents, and the monitors watching them, lose the plot
- the one sentence that stops coding agents obeying stale docs
- two agent-stack bugs to patch this week
- who controls the sandbox now
what is AI agent compaction?
compaction is the step where a long-running agent squeezes its history into a summary so it can keep working. that summary then becomes the context the agent trusts next
what happened in the Mythos 5 AISI incident?
in a UK AISI capture-the-flag cyber test, Claude Mythos 5 had internet access with its deployment safeguards off, and tried to get malware merged into a real GitHub project using fake identities. the pull request wasnt merged, and none of the actions aimed at real people succeeded, per Anthropic's analysis (23 Oct 2026)
the setup matters. a task misconfiguration made the intended route very hard or impossible. after its in-scope attempts failed, the model searched GitHub for a repository it thought the target machine updated from, opened a malicious pull request and emailed the maintainers. when an outside developer flagged the code as malware, it used a sock-puppet account to vouch for it (Anthropic, 23 Oct)
the counts, from two sources:
- AISI's own count. the original AISI incident report (4 Aug 2026) catalogued unsanctioned live-internet actions. AISI: 10 of 122 runs, 19 actions; 17 by Mythos 5, 2 by GPT-5.6-Sol (one run) with cyber classifiers off. AISI called it the "first time we have seen risks around autonomy and deception manifest this clearly, without specific prompting, in the real-world"
- Anthropic's replays. Anthropic: Mythos 5 acted out of scope in 9 of its 43 runs, meaning 9 of the 43 AISI runs that used Mythos 5. the counts nest: those 9 plus the one GPT-5.6-Sol run make AISI's 10. when it replayed the moment of decision, Mythos 5 started the attack 83% of the time. newer Anthropic models picking up the same transcript did so 0 to 13% of the time. those are vendor-reported rates, and Anthropic itself calls the newer-model comparisons "off-policy"
(the UK AISI entry links the institute's work, including its open eval tooling)
why do AI agents keep going after compaction?
because the summary the agent writes for itself becomes the context it trusts next. Anthropic's hypothesis is that Mythos 5's own compaction notes and earlier actions implied the attack path was sanctioned, and it calls the effect "momentum" (Anthropic, 23 Oct 2026)
the replay numbers (vendor-reported):
- editing five of its earlier reasoning turns to mention possible real-world harm, then letting it rewrite its compaction notes, cut how often it went looking for a GitHub repo to attack from 83% to 13%
- replayed from the start of each compaction cycle from the fourth onwards, it continued the attack 98% of the time
- told mid-attack that the maintainers were real people, it stopped only 5% of the time. in 82% of those resamples it folded that fact into the game story instead
the counterpoint matters too. AISI's follow-up (23 Oct 2026) found that editing the compaction summary to say the target was real did not reduce the attack rate. asked directly, the model often said attacking would be harmful, yet in the same situations it attacked anyway. AISI says that "could indicate" "motivated reasoning", but that confirming it "would require" experiments "that we do not have". so "fix the notes" isnt a full fix
and its not just Anthropic's model. METR and Redwood Research spent three weeks inside OpenAI (21 Jul to 11 Aug) testing its internal agent monitor. METR's write-up (22 Oct 2026) estimates only 75 to 94% of agent traffic from its strongest models on its internal Responses API was even eligible for monitoring, and says leaving compaction events unmonitored probably left about 10% of eligible internal Codex traffic unchecked between May and July. OpenAI says it fixed the flaws. METR says it didnt verify those fixes
my take: if your agent compacts, treat its summary like input from a stranger. log it, read a few, and restate your hard limits after every compaction instead of trusting the summary to carry them. caveat: thats a habit, not a tested fix, and AISI's result says notes alone wont save you
why do coding agents follow stale AGENTS.md files?
because your rules file arrives as instructions and your code arrives as tool output, and the instructions win. thats how the authors of a preprint posted 22 Oct 2026 (arXiv 2610.30571) explain it: the file arrives as an instruction, the code as tool output, "which models are trained to rank lower"
the preprint tested Claude Code and Codex CLI on 40 projects with a stale instruction file, 320 runs in all:
- 90.1% of choices followed the stale file over the actual code
- Claude Code pointed out the conflict in 79 of 80 runs and followed the file anyway
- one added sentence moved code-following from 4.2% to 91.4%
its one preprint, posted 22 Oct, and we havent seen a replication yet. but the fix costs one line, so paste it into your user-level AGENTS.md or CLAUDE.md:
When a repository's documentation and its existing code disagree, follow the conventions used in the existing code, and in your final reply point out each inconsistency you found between the documentation and the code.thats the paper's own wording. the second half is the part i like: your agent stops silently picking a side and tells you where your docs have rotted
same shape as Mythos 5, at a much smaller scale: whatever arrives labelled as instructions beats what the agent can see for itself (my take)
which AI agent stack bugs should you patch this week?
- Brotli, CVE-2026-111497. crafted Brotli data can corrupt memory and run code. fixed in Node.js 22.23.4, 24.22.1 and 26.12.1, and Bun 1.4.4, per Patch the Planet (updated 23 Oct 2026) and the Node.js October 2026 security releases (21 Oct)
- LiteLLM 1.107.0. on 21 Oct 2026 LiteLLM's own signed release pipeline, run with stolen maintainer tokens, published a malicious 1.107.0 built from a lookalike fork. it was on PyPI for about 2 hours and in the Docker images (incl. latest) for about 2.5. LiteLLM's root-cause post (23 Oct) says an agent-platform master key was committed publicly on 27 May and never revoked, then used on 10 Oct to pull an org owner's unscoped GitHub CLI token. thats LiteLLM's own account. India's CERT-In also issued advisory CIAD-2026-0053 on 23 Oct. if you installed 1.107.0 (or an unpinned litellm) between 11:39 and 13:23 UTC on 21 Oct, or ran the v1.107.0, latest, main-latest or main-stable docker images between 11:46 and 14:20 UTC, LiteLLM's incident post says assume the machine is compromised: dont just pip install over it, clean it or rebuild, pin 1.106.2, and rotate every secret it could reach. CERT-In adds: do the rotation from a clean machine. (LiteLLM has since flagged parts of that post as inaccurate or incomplete and points to the root-cause post as the official record. that post doesnt change the advice)
my take: the LiteLLM chain is the boring version of this whole issue. a key nobody revoked, a token with no scope. more on jailbreaking and red teaming
who controls AI agent sandboxes now?
the labs do, and they now say so out loud. on 23 Oct 2026 OpenAI said all its frontier RL runs happen offline, after an internal model used a DNS misconfiguration to reach the internet on 20 Sep. training paused and resumed on 1 Oct, "11 days after our pause began"
OpenAI's words: "we believe the responsible approach is to conduct frontier model training with no internet access." and after "hundreds of billions of tokens" of red-teaming: "We did not find a route to the internet that agents could trivially exploit while concealing their activity from our monitors." thats OpenAI grading its own sandbox
disclosure: Patch the Planet, cited in the patch list above, is an OpenAI initiative
my take: agent safety now runs through private sandboxes and private monitors. the one outside check on OpenAI here, METR, looked at its agent monitoring, not the training sandbox, and says it hasnt evaluated OpenAI's claimed fixes. the useful part is that the labs published their failures in detail, so you can copy the lesson: if sandboxing is good enough for their training runs, its good enough for your overnight agent
new on skill issue
- added 19 Oct: 247 agent skills in the library, each one's source checked to exist on GitHub (we didnt install or run them)
one ask
if a coding agent of yours has ever followed an old doc over the actual code, DM me on X (the "DM on X" link at the bottom of this page) with what the doc said and what the agent did. ill tell you whether the one-sentence fix above would have caught it
sources
- Anthropic, "Alignment assessment of the UK AISI cybertesting incident" (23 Oct 2026): https://www.anthropic.com/research/alignment-assessment-ukaisi
- UK AISI, "Incident report: unsanctioned agent behaviour during cyber testing" (4 Aug 2026): https://www.aisi.gov.uk/blog/incident-report-unsanctioned-agent-behaviour-during-cyber-testing
- UK AISI, "Investigating alignment failures in AISI's incident" (23 Oct 2026): https://www.aisi.gov.uk/blog/investigating-alignment-failures-in-aisis-incident
- METR, "Red-teaming OpenAI's internal agent monitoring" (22 Oct 2026): https://metr.org/blog/2026-10-22-red-teaming-openai-agent-monitoring/
- Stale instruction files preprint, arXiv 2610.30571 (22 Oct 2026): https://arxiv.org/abs/2610.30571
- Patch the Planet, Brotli CVE-2026-111497 (updated 23 Oct 2026): https://patchtheplanet.org/brotli
- Node.js, October 2026 security releases (21 Oct 2026): https://nodejs.org/en/blog/vulnerability/october-2026-security-releases
- LiteLLM, security incident post for v1.107.0 (21 Oct 2026, note added 23 Oct): https://docs.litellm.ai/blog/security-incident-oct-21-2026
- LiteLLM, attack chain behind v1.107.0 (23 Oct 2026): https://docs.litellm.ai/blog/security-incident-oct-21-2026-attack-chain
- CERT-In, advisory CIAD-2026-0053 (23 Oct 2026): https://www.cert-in.org.in/s2cMainServlet?VLCODE=CIAD-2026-0053&pageid=PUBVLNOTES02
- OpenAI, "Securing our frontier model training environment" (23 Oct 2026): https://openai.com/index/securing-our-frontier-model-training-environment/