Skip to content
HomeNewsDigestsConceptsGuidesToolbox
AboutSubscribeUA
Subscribe

AI Today Brief

The daily AI-engineering brief. Built in public. EN · UA.

XTelegramLinkedInYouTubeRSS

Follow AI Today Brief on LinkedIn for daily AI-engineering updates and the weekly “5 shifts that changed how developers work” PDF.

Explore

NewsDigestsConceptsGuides

Company

SubscribeAdvertiseAbout

Legal

Editorial policyAI disclosurePrivacyTerms

© 2026 AI Today Brief. All rights reserved.

  1. Home/
  2. News/
  3. Agents & MCP/
  4. Preserving Agent Code Artifacts Across Context Compaction in ChatGPT Work
Agents & MCP

Preserving Agent Code Artifacts Across Context Compaction in ChatGPT Work

Simon Willison tested ChatGPT Work with GPT-6 Astra to build OpenStreetMap running routes. While it successfully generated interactive D3 visualizations and GPX files over 27 minutes, context compaction erased the underlying Python scripts.

September 13, 2026· 6 min read
OKCurated by Oleksandr Kuzmenko, AI Product Engineer·Updated September 13, 2026·Sources cited on every story
AI-assisted · editor-reviewed·How we use AI
Preserving Agent Code Artifacts Across Context Compaction in ChatGPT Work

Impact: Medium

Why it matters

Configure long-running agents to write Python execution scripts to disk immediately so context compaction does not erase reproducibility.

TL;DR

  • 01ChatGPT Work runs multi-step data pipelines autonomously using Overpass and Nominatim APIs over long intervals.
  • 02Visualizations inside ChatGPT Work require CDN scripts restricted to allow-listed origins like jsDelivr, cdnjs, and unpkg.
  • 03Thread compaction erases executed Python code; agents must explicitly write logic to files to ensure reproducibility.

Key facts

27 minutesExecution Duration
D3 v7.9.0Visualization Engine
Execution Duration
27 minutes
Primary Model
GPT-6 Astra (Max)
Output Artifacts
GPX, GeoJSON, HTML visualization
Visualization Engine
D3 v7.9.0

Long-Horizon Execution with External APIs

Simon Willison evaluated ChatGPT Work powered by GPT-6 Astra (Max) on a complex geospatial generation prompt. The model was instructed to calculate 5K and 10K running loops starting from a residential address using OpenStreetMap data. Over a 27-minute execution window, the agent queried Nominatim to resolve location coordinates, used the Overpass API to fetch local road and trail geometry, and executed local graph calculations to generate closed-loop routes.

The system delivered downloadable GPX and GeoJSON files alongside an interactive web component saved to /workspace/el-granada-5k-share.html. The interactive route map utilized the platform's visualize skill to embed D3 (version 7.9.0) directly inside the interface.

Content Security Policy Constraints

The visualize skill operates under a strict Content Security Policy (CSP). External resources can only be retrieved from explicit allow-listed content delivery networks:

  • cdnjs.cloudflare.com
  • esm.sh
  • cdn.jsdelivr.net
  • unpkg.com
  • fonts.googleapis.com and fonts.gstatic.com
  • fonts.bunny.net

All unlisted origins are rejected silently, requiring agents to vendor assets or depend strictly on approved CDNs for data visualizations.

The Context Compaction Pitfall

The test highlighted an architectural problem with agent transparency: thread compaction. Because the ChatGPT interface hides raw code execution steps and later compacts older dialogue context, the Python script used to fetch Overpass data and calculate the routes became unrecoverable. For production agentic engineering, frameworks must persist pre-compacted tool calls and raw code blocks to disk artifacts before LLM compaction runs.

Try it in 2 minutes

You are generating a long-running data pipeline. Save all intermediate Python scripts to /workspace/scripts/ before executing them, and ensure all HTML visualizations import libraries exclusively from cdn.jsdelivr.net or cdnjs.cloudflare.com.

markdown

✓ When to use

  • When orchestrating autonomous agents that aggregate public APIs (Nominatim, Overpass) and export structured spatial data.
  • When rendering zero-install interactive D3 charts and maps directly inside the agent workspace.

✕ When NOT to use

  • Do not rely on chat history as a code repository for long-running workflows where thread compaction will be triggered.
  • Avoid using arbitrary third-party script sources in ChatGPT visualizer artifacts outside the CDN allowlist.

What to do today

  • →Add an explicit prompt instruction requiring agents to save all generated Python scripts as files in /workspace.
  • →Ensure all script dependencies injected into web visualizers use allowed CDN endpoints like jsdelivr or unpkg.
  • →Extract raw tool execution logs before agent dialogues hit token context limits and compact.
#ChatGPT Work#GPT-6 Astra#Nominatim#Overpass API#OpenStreetMap#D3

Sources

  • Generating running routes with GPT-6 Astra and ChatGPT Work - Simon Willison
ShareShare on XShare on LinkedIn
← Previous storyOffloading Git Maintenance and CI Diagnostics to Coding AgentsNext story →Rendly Enables Programmatic Developer Video Creation via Lightweight Domain-Specific Language

Related stories

  • Agents & MCPGoogle ToolGrad Generates Agent Datasets Answer-First Using Textual Gradients
  • Agents & MCPOpenAI Autonomous Agents Target RubyGems Package Registry in Undisclosed Attack
  • Agents & MCPAnthropic Agent Transcript Reveals Extreme CAPTCHA Friction During Sandbox Escape
  • Agents & MCPDesigning Permission Ladders and Blast Radius Guards for Autonomous Agents

Email digest

Get the morning AI brief

One email a day — the stories that matter for engineers, founders and tech leads. Human-edited, with links to primary sources.

  • ✓120+ sources scanned daily
  • ✓Edited by a human
  • ✓1 email per day
  • ✓EN + UA

By subscribing you agree to the privacy policy.