Meta's facebookresearch organization published agent-write-then-execute in December 2026 as a verified replay bundle for security research on deferred cross-principal execution in agent-written file workflows. The README titles the package A2: recorded-data replay for GitHub. It recomputes detection counts on a pinned corpus and regenerates study tables; it does not relaunch original model services or host exploits.
Problem: write now, execute later, different principal
Instruction card with a hook at the edge, illustrating cross-principal agent file handoffs
Coding agents increasingly author files—scripts, configs, CI snippets—that another identity runs later: a human sudo, a deployment bot, or a second agent with broader tokens. If validation happens only at write time, content drift or second-hop malice can slip past.
That pattern shows up in agentic attack detection guidance and in Perplexity Cairn SSRF attempts, but Meta's repo is measurement-focused: it quantifies how often detectors flag unsafe joins under defined execution semantics.
What the export contains
Key files per README:
| Artifact | Role |
|---|---|
| EXPORT_MANIFEST.json | Every file path, size, mode, SHA-256 |
| PROVENANCE.json | Input and source pins |
| data_analysis/data/corpus_flags.json | Per-case outcomes for three execution definitions |
| data_analysis/expected/tables.md | Golden aggregate table |
| safe_replay.py | Public entry with integrity checks |
| verify_export.py | Manifest validation, optional external SHA pin |
The manifest rejects symlink tricks, unexpected .git members, and bytecode caches so reviewers can trust the tarball.
How to run a clean replay
The README specifies Linux, CPython 3.12, and no network during analysis:
python3 -B verify_export.py
python3 -B safe_replay.py --profile data-analysis --out /tmp/a2-replay-new
PYTHONDONTWRITEBYTECODE=1 python3 -B -m unittest discover -s tests -p 'test_*.py' -v
python3 -B verify_export.py
safe_replay.py verifies the export before and after delegating to an internal replay.py engine. The README warns not to call that lower engine alone; it lacks the same input-root directory guards.
Successful replay writes tables.md, corpus_counts.json, and replay_report.json with duration and memory stats. full_paper_reproduction stays false because raw event logs and live harnesses are omitted.
Scientific scope and honest limits
Meta's documentation is explicit about boundaries:
- Only corpus counts recompute from per-case flags; other tables render recorded aggregates without repeating underlying measurements.
- No acquisition command ships for omitted raw telemetry.
- Historical docs mention
./run.sh regenerate; that script is not in the export—usesafe_replay.pyinstead.
Researchers comparing to Anthropic logic-bug agent reviews should note NightFalcon-style harnesses find bugs, while A2 audits a fixed dataset about cross-principal joins.
Integrity: INPUTS.sha256 rules
data_analysis/INPUTS.sha256 begins with a fixed Meta copyright notice, a blank line, then exactly four ordered checksum rows. The verifier rejects reordered paths, extra comments, or changed digests. That pattern is useful for any team publishing agent eval artifacts without letting consumers silently swap corpora.
Custodians can pass --manifest-sha256 to verify_export.py when they publish an external pin; without it, verification only proves internal consistency, not publisher identity.
Connect to Meta's other December 2026 releases
Meta also shipped Fuxi unified multimodal code and ongoing Instagram AI labeling debates in the same week. agent-write-then-execute belongs in security engineering roadmaps, not in model leaderboard threads.
For skills lockfiles and reproducible agent behavior in repos, compare skills-lock.json primer—different problem (dependency pins) but same theme: agents need contracts.
Defender takeaways
- Split write and execute principals in CI: the identity that merges code should not be the identity that deploys without a second checksum gate.
- Store replay manifests beside agent benchmarks so regressions show up when someone edits golden JSON quietly.
- Log deferred execution paths in products using Claude Cage-style isolation where network and FS boundaries matter.
- Read Meta SECURITY.md before filing issues; the repo is a candidate release per README.
What is not in the tarball
The export excludes generated caches, virtual environments, manuscripts, and full-system launchers. A real .git directory may exist locally but is not counted as an export member. That keeps GitHub-sized drops reviewable for security researchers and academic reproducers.
If you need live agent offensive data, follow CISA agentic framework alerts and FBI ARTEX guidance instead—orthogonal datasets.
Building policies around write-then-execute
Platform owners should ask:
- Which tools let agents schedule
atjobs, systemd units, or Kubernetes apply steps? - Does the executor re-parse file contents or trust signatures from the writer principal?
- Are temporary directories shared between users on the same host?
Meta's corpus encodes those joins abstractly. Your production mapping belongs in threat models next to Microsoft freehand agent harness discussions about tool graphs.
Research ethics and licensing caution
README states license and hosting were not approved at export time. Enterprises mirroring the tarball into internal registries should wait for Meta legal clearance on the proposed LICENSE text before treating it as Apache-2.0 production code.
Contributors must follow CONTRIBUTING.md and CODE_OF_CONDUCT.md. Sensitive issues go through SECURITY.md, consistent with other facebookresearch drops.
Extended comparison table
| Question | agent-write-then-execute | NightFalcon | ARTEX |
|---|---|---|---|
| Goal | Reproduce paper tables | Find workflow vulns | Offensive pentest automation |
| Network | Disabled in tests | Uses model APIs via client | Active scanning |
| Output | tables.md, corpus JSON | SARIF, HTML | Exploit chains |
| Audience | Researchers | AppSec engineers | Red teams (authorized) |
Future work Meta flags
Changelog and NOTICE files mark the drop as prepared release candidate. Watch the repository for approved license, public dataset links, and possible harness code if Meta open-sources more than the replay layer.
Walking through safe_replay outcomes
When safe_replay.py succeeds, operators receive three artifacts under the chosen output directory:
- tables.md — human-readable summary aligned with the paper-style aggregate table.
- corpus_counts.json — machine-readable detection and false-join counts for each execution definition.
- replay_report.json — metadata including measured runtime and peak child RSS, helping you compare hardware when reproducing on laptops versus CI runners.
If comparison against data_analysis/expected/tables.md fails, the tool returns exit code 1 without creating the output directory, preventing partial artifacts from masquerading as success. That fail-closed behavior is what security reviewers want when agent evals gate releases.
Unsupported --profile full exits 2 and writes nothing, signaling that whole-paper reproduction was intentionally omitted from this GitHub drop.
Test suite intent
The tests/ package includes malformed-input controls and a baseline successful replay before edge cases. README notes child processes inherit PYTHONDONTWRITEBYTECODE=1 so __pycache__ never pollutes the strict manifest.
For teams porting the pattern internally, copy the double verify_export sandwich: checksum at start catches tampered trees; checksum at end catches accidental artifact writes inside the repository root.
Three execution definitions (conceptual)
While the JSON flags file holds authoritative labels, the README structure implies each corpus case is evaluated under three execution definitions—think of them as policies for when a deferred execution counts as a violation. Positive cases should trigger detections; negatives should not produce false joins.
Security architects can mirror that structure in production:
- Definition A — same user writes and executes within one session.
- Definition B — writer is low privilege; executor is elevated automation.
- Definition C — cross-tenant writer with shared temporary storage.
Map your SOAR playbooks to which definition you simulate in purple-team exercises.
Why Meta exported without live harness code
Shipping recorded-data replay only reduces dual-use risk while still letting academics validate statistics in the paper. It follows the same ethos as opting not to ship exploit chains in defender post-mortems: publish enough to learn, not enough to arm script kiddies.
The README's full_paper_reproduction: false flag makes that boundary explicit for citation databases and journalism.
Connection to agent sandbox products
Vendors marketing sandboxed agents will cite deferred execution when selling separate writer and runner VMs. Meta's corpus gives them peer-reviewed style numbers once the paper lands; until then, cite replayed counts, not marketing extrapolations.
Compare architectural controls in Claude Cage network isolation and AgentBeam-adjacent felony bench tracking for incidents where agents already harmed third parties.
Engineering checklist after cloning
- Read DATA.md for denominator definitions before quoting percentages.
- Pin manifest SHA-256 out-of-band if you fork for internal compliance archives.
- Run replay in CI on every change to
corpus_flags.json. - Do not commit
/tmp/a2-replay-newoutputs into the Git tree; README forbids overlap paths. - Open GitHub Issues only after reading SUPPORT.md escalation paths.
Academic citation guidance
When referencing this repository in papers, note release candidate status and unapproved license language from NOTICE.md. Reviewers may ask whether results depend on Meta-internal data excluded from the export; answer honestly using README limitations section.
Historical parallel: reproducibility in security ML
Other fields moved from table-only supplements to dockerized replay. Meta's approach is lighter: no container, no pip installs beyond stdlib, deterministic unittest. That lowers friction for undergrad labs teaching agent safety measurement.
Contrast FrontierCS agent benchmarks where live tasks delete papers—opposite philosophy, both valuable.
When this repo is the wrong tool
- You need live LLM red teaming → use authorized pentest harnesses with legal approval.
- You need dependency CVE scanning → use OSV or vendor scanners.
- You need workflow authorization logic → try NightFalcon instead.
Choosing the right harness saves weeks of misapplied automation.
Glossary for readers new to cross-principal joins
Writer principal — identity that creates or edits a file. Executor principal — identity that runs or applies it. Deferred — time gap or privilege gap between those steps. Meta's corpus encodes detection outcomes when policies disagree on whether that join is safe.
