Shell + Skills + Compaction: Tips for long-running agents that do real work | OpenAI Developers

This post introduces and elaborates on three new agentic primitives: Skills (reusable, versioned instructions for agents), an upgraded Shell tool (a hosted container with controlled internet access for installing dependencies, running scripts, and writing outputs), and Server-side Compaction (automatic context window management for long agentic runs). It provides practical tips and patterns for using these primitives, including writing effective skill descriptions with negative examples, embedding templates within skills, designing for long runs with container reuse and compaction, ensuring determinism by explicitly invoking skills, treating skills with networking as high-risk and designing for containment with strict allowlists, using `/mnt/data` for artifact handoff, understanding the two-layer allowlist system for networking, and utilizing `domain_secrets` for authenticated calls. It also outlines three build patterns: Install -> Fetch -> Write Artifact, Skills + Shell for repeatable workflows, and Skills as enterprise workflow carriers, emphasizing the combination of skills for procedures and shell for execution.
More from the Agentic Execution Environment trail
- Bringing my LED display to life with GPT-Live-1 and Codex | OpenAI Developers
- Rethinking skills and prompts for GPT-6 Astra | OpenAI Developers
- Meet Rosalind Workbench: Empowering every scientist to be their own research team | OpenAI Developers
- Automating repetitive work at OpenAI with Codex
- Codex as a platform: build on the open agent harness | OpenAI Developers