# template: scripts/codex_exec.sh fills @WS@ (the codex workspace), @REMAKE_HOME@ and @MCP@ (the viggle-remake-mcp # executable) and writes it to $CODEX_HOME/config.toml. To use it by hand, replace the three yourself. approval_policy = "never" sandbox_mode = "workspace-write" tool_output_token_limit = 30000 # compact well before the 272K long-context price tier (a request over it is billed whole at the long price) model_auto_compact_token_limit = 200000 # codex_exec.sh appends the prompt-writing guide and examples to AGENTS.md (~60 KB); the default 32 KiB cuts it silently project_doc_max_bytes = 65536 suppress_unstable_features_warning = true # codex copies each picture image_gen made into the session's inbox/: the sessions dir must be writable [sandbox_workspace_write] writable_roots = ["@REMAKE_HOME@/sessions"] # no curated plugins / apps / bundled system skills: they only add SKILL.md noise to the prompt [features] plugins = false remote_plugin = false apps = false # code mode: an exec cell still running (an MCP `wait`, `finish`, an image_gen) yields after this long and the model # polls it with `wait`; every poll is a full-context request. A long yield lets the cell just finish. [features.code_mode] enabled = true default_exec_yield_time_ms = 600000 [skills.bundled] enabled = false # `wait` blocks up to 30 min, finish a few minutes [mcp_servers.viggle-remake] required = true command = "@MCP@" args = [] startup_timeout_sec = 120.0 tool_timeout_sec = 4200.0 supports_parallel_tool_calls = false # with approval_policy = "never", a tool that needs approval is refused, and codex asks for every tool not annotated # read-only: approve this server's tools default_tools_approval_mode = "approve" # pool image mode: sheet/paint/epaint start a helper codex per picture (its own home under pool/, removed after); no # image API, no spend; paint_many runs 8 at once. NUMPY_MADVISE_HUGEPAGE=0: finish builds a multi-GB frame array, and # with THP defrag=madvise its page faults can stall in kernel compaction (finish measured 78 s alone, 590 s in a job). # optional, add to env: REMAKE_FACE_PY = a python with onnxruntime + opencv; paint then flags a keyframe that kept the source # face (facecheck.py; needs the insightface buffalo_l models, which are licensed for non-commercial research only) # REMAKE_GUIDE_IN_AGENTS=1: the guide is in AGENTS.md (codex_exec.sh puts it there); drop it if you copy AGENTS.md by hand env = { REMAKE_PAINT = "pool", REMAKE_LLM_MODEL = "codex-pool", REMAKE_POOL_DIR = "@CODEX_HOME@/../pool", REMAKE_POOL_N = "8", REMAKE_HOME = "@REMAKE_HOME@", NUMPY_MADVISE_HUGEPAGE = "0", REMAKE_GUIDE_IN_AGENTS = "1", REMAKE_CODEX_IMAGES = "@CODEX_HOME@/generated_images", REMAKE_RUN_SIDS = "@CODEX_HOME@/run_sids" } [projects."@WS@"] trust_level = "trusted"