Skip to content

armgit / sie

Public Imported from GitHub
0

Open-source inference server and production cluster for all the models your agent needs.

80.3 KB
Raw Blame
{
  "description": "Requests Codex CLI sent to POST /v1/responses in headless runs (codex exec) against a local stub that answered canned Responses streams; no model was called. Developer instructions and the environment context are placeholders with their original length, ids, UUIDs, client_metadata values and local paths are replaced, and headers are dropped. Tool definitions and input_image data URIs are as captured. expect.refused is the refusal; expect.chat summarizes the translated chat body.",
  "client": "codex-cli 0.167.0",
  "requests": [
    {
      "name": "default config",
      "config": "Codex defaults with only the SIE provider block (wire_api = \"responses\"): web search, multi-agent and goal tools are on",
      "body": {
        "model": "zai-org/GLM-5.3-Flash",
        "stream": true,
        "input": [
          {
            "type": "message",
            "id": "msg_1",
            "role": "developer",
            "content": [
              {
                "type": "input_text",
                "text": "<codex developer instructions, 16979 characters>"
              }
            ]
          },
          {
            "type": "message",
            "id": "msg_2",
            "role": "developer",
            "content": [
              {
                "type": "input_text",
                "text": "<codex developer instructions, 7893 characters>"
              },
              {
                "type": "input_text",
                "text": "<codex developer instructions, 341 characters>"
              }
            ]
          },
          {
            "type": "message",
            "id": "msg_3",
            "role": "user",
            "content": [
              {
                "type": "input_text",
                "text": "<codex environment context, 764 characters>"
              }
            ]
          },
          {
            "type": "message",
            "id": "msg_4",
            "role": "user",
            "content": [
              {
                "type": "input_text",
                "text": "Say hello."
              }
            ]
          }
        ],
        "tools": [
          {
            "type": "function",
            "name": "exec_command",
            "description": "Runs a command in a PTY, returning output or a session ID for ongoing interaction.",
            "strict": false,
            "parameters": {
              "type": "object",
              "properties": {
                "cmd": {
                  "type": "string",
                  "description": "Shell command to execute."
                },
                "justification": {
                  "type": "string",
                  "description": "User-facing approval question for `require_escalated`; omit otherwise."
                },
                "login": {
                  "type": "boolean",
                  "description": "True runs the shell with -l/-i semantics; false disables them. Defaults to true."
                },
                "max_output_tokens": {
                  "type": "number",
                  "description": "Output token budget. Defaults to 10000 tokens; larger requests may be capped by policy."
                },
                "prefix_rule": {
                  "type": "array",
                  "description": "Reusable approval prefix for `cmd`, only with `sandbox_permissions: \"require_escalated\"`; for example [\"git\", \"pull\"].",
                  "items": {
                    "type": "string"
                  }
                },
                "sandbox_permissions": {
                  "type": "string",
                  "description": "Per-command sandbox override. Defaults to `use_default`; use `require_escalated` for unsandboxed execution.",
                  "enum": [
                    "use_default",
                    "require_escalated"
                  ]
                },
                "shell": {
                  "type": "string",
                  "description": "Shell binary to launch. Defaults to the user's default shell."
                },
                "tty": {
                  "type": "boolean",
                  "description": "True allocates a PTY for the command; false or omitted uses plain pipes."
                },
                "workdir": {
                  "type": "string",
                  "description": "Working directory for the command. Defaults to the turn cwd."
                },
                "yield_time_ms": {
                  "type": "number",
                  "description": "Wait before yielding output. Defaults to 10000 ms; effective range is 250-30000 ms."
                }
              },
              "required": [
                "cmd"
              ],
              "additionalProperties": false
            }
          },
          {
            "type": "function",
            "name": "write_stdin",
            "description": "Writes characters to an existing unified exec session and returns recent output.",
            "strict": false,
            "parameters": {
              "type": "object",
              "properties": {
                "chars": {
                  "type": "string",
                  "description": "Bytes to write to stdin. Defaults to empty, which polls without writing."
                },
                "max_output_tokens": {
                  "type": "number",
                  "description": "Output token budget. Defaults to 10000 tokens; larger requests may be capped by policy."
                },
                "session_id": {
                  "type": "number",
                  "description": "Identifier of the running unified exec session."
                },
                "yield_time_ms": {
                  "type": "number",
                  "description": "Wait before yielding output. Non-empty writes default to 250 ms and cap at 30000 ms; empty polls wait 5000-300000 ms by default."
                }
              },
              "required": [
                "session_id"
              ],
              "additionalProperties": false
            }
          },
          {
            "type": "function",
            "name": "request_user_input",
            "description": "Request user input for one to three short questions and wait for the response. This tool is only available in Plan mode.",
            "strict": false,
            "parameters": {
              "type": "object",
              "properties": {
                "questions": {
                  "type": "array",
                  "description": "Questions to show the user. Prefer 1 and do not exceed 3",
                  "items": {
                    "type": "object",
                    "properties": {
                      "header": {
                        "type": "string",
                        "description": "Short header label shown in the UI (12 or fewer chars)."
                      },
                      "id": {
                        "type": "string",
                        "description": "Stable identifier for mapping answers (snake_case)."
                      },
                      "options": {
                        "type": "array",
                        "description": "Provide 2-3 mutually exclusive choices. Put the recommended option first and suffix its label with \"(Recommended)\". Do not include an \"Other\" option in this list; the client will add a free-form \"Other\" option automatically.",
                        "items": {
                          "type": "object",
                          "properties": {
                            "description": {
                              "type": "string",
                              "description": "One short sentence explaining impact/tradeoff if selected."
                            },
                            "label": {
                              "type": "string",
                              "description": "User-facing label (1-5 words)."
                            }
                          },
                          "required": [
                            "label",
                            "description"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "question": {
                        "type": "string",
                        "description": "Single-sentence prompt shown to the user."
                      }
                    },
                    "required": [
                      "id",
                      "header",
                      "question",
                      "options"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "questions"
              ],
              "additionalProperties": false
            }
          },
          {
            "type": "function",
            "name": "view_image",
            "description": "View a local image file from the filesystem when visual inspection is needed. Use this for images already available on disk.",
            "strict": false,
            "parameters": {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string",
                  "description": "Local filesystem path to an image file."
                }
              },
              "required": [
                "path"
              ],
              "additionalProperties": false
            }
          },
          {
            "type": "namespace",
            "name": "multi_agent_v1",
            "description": "Tools for spawning and managing sub-agents.",
            "tools": [
              {
                "type": "function",
                "name": "close_agent",
                "description": "Close an agent and any open descendants when they are no longer needed, and return the target agent's previous status before shutdown was requested. Completed agents remain open and count toward the concurrency limit until closed. Don't keep agents open for too long if they are not needed anymore.",
                "strict": false,
                "parameters": {
                  "type": "object",
                  "properties": {
                    "target": {
                      "type": "string",
                      "description": "Agent id to close (from spawn_agent)."
                    }
                  },
                  "required": [
                    "target"
                  ],
                  "additionalProperties": false
                }
              },
              {
                "type": "function",
                "name": "resume_agent",
                "description": "Resume a previously closed agent by id so it can receive send_input and wait_agent calls.",
                "strict": false,
                "parameters": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Agent id to resume."
                    }
                  },
                  "required": [
                    "id"
                  ],
                  "additionalProperties": false
                }
              },
              {
                "type": "function",
                "name": "send_input",
                "description": "Send a message to an existing agent. Use interrupt=true to redirect work immediately. You should reuse the agent by send_input if you believe your assigned task is highly dependent on the context of a previous task.",
                "strict": false,
                "parameters": {
                  "type": "object",
                  "properties": {
                    "interrupt": {
                      "type": "boolean",
                      "description": "True interrupts the current task and handles this message immediately; false or omitted queues it."
                    },
                    "items": {
                      "type": "array",
                      "description": "Structured input items. Use this to pass explicit mentions (for example app:// connector paths).",
                      "items": {
                        "type": "object",
                        "properties": {
                          "audio_url": {
                            "type": "string",
                            "description": "Audio data URL when type is audio."
                          },
                          "image_url": {
                            "type": "string",
                            "description": "Image URL when type is image."
                          },
                          "name": {
                            "type": "string",
                            "description": "Display name when type is skill or mention."
                          },
                          "path": {
                            "type": "string",
                            "description": "Path when type is local_image/local_audio/skill, or structured mention target such as app://<connector-id> or plugin://<plugin-name>@<marketplace-name> when type is mention."
                          },
                          "text": {
                            "type": "string",
                            "description": "Text content when type is text."
                          },
                          "type": {
                            "type": "string",
                            "description": "Input item type: text, image, local_image, audio, local_audio, skill, or mention."
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "message": {
                      "type": "string",
                      "description": "Legacy plain-text message to send to the agent. Use either message or items."
                    },
                    "target": {
                      "type": "string",
                      "description": "Agent id to message (from spawn_agent)."
                    }
                  },
                  "required": [
                    "target"
                  ],
                  "additionalProperties": false
                }
              },
              {
                "type": "function",
                "name": "spawn_agent",
                "description": "\n        \n        Available model overrides (optional; inherited parent model is preferred):\n- `gpt-6.1-sol`: Latest workhorse model for coding and everyday work. Reasoning efforts: low (default), medium, high, xhigh, max, ultra. Service tiers: priority.\n- `gpt-6-astra`: Frontier intelligence for the most demanding work. Reasoning efforts: low (default), medium, high, xhigh, max, ultra. Service tiers: priority.\n- `gpt-6-sol`: Previous generation workhorse model. Reasoning efforts: low, medium (default), high, xhigh, max, ultra. Service tiers: priority.\n- `gpt-6-luna`: Fast and affordable model for easier tasks. Reasoning efforts: low, medium (default), high, xhigh, max. Service tiers: priority.\n- `gpt-5.6-sol`: Older generation workhorse model. Reasoning efforts: low (default), medium, high, xhigh, max, ultra. Service tiers: priority.\n        Spawn a sub-agent for a well-scoped task. Returns the spawned agent id plus the user-facing nickname when available. Spawned agents inherit your current model by default. Omit `model` to use that preferred default; set `model` only when an explicit override is needed.\nThis spawn_agent tool provides you access to sub-agents that inherit your current model by default. Do not set the `model` field unless the user explicitly asks for a different model. You should follow the rules and guidelines below to use this tool.\n\nDo not spawn sub-agents unless the user or applicable AGENTS.md/skill instructions explicitly ask for sub-agents, delegation, or parallel agent work.\nRequests for depth, thoroughness, research, investigation, or detailed codebase analysis do not count as permission to spawn.\nAgent-role guidance below only helps choose which agent to use after spawning is already authorized; it never authorizes spawning by itself.\n\n### When to delegate vs. do the subtask yourself\n- First, quickly analyze the overall user task and form a succinct high-level plan. Identify which tasks are immediate blockers on the critical path, and which tasks are sidecar tasks that are needed but can run in parallel without blocking the next local step. As part of that plan, explicitly decide what immediate task you should do locally right now. Do this planning step before delegating to agents so you do not hand off the immediate blocking task to a submodel and then waste time waiting on it.\n- Use a subagent when a subtask is easy enough for it to handle and can run in parallel with your local work. Prefer delegating concrete, bounded sidecar tasks that materially advance the main task without blocking your immediate next local step.\n- Do not delegate urgent blocking work when your immediate next step depends on that result. If the very next action is blocked on that task, the main rollout should usually do it locally to keep the critical path moving.\n- Keep work local when the subtask is too difficult to delegate well and when it is tightly coupled, urgent, or likely to block your immediate next step.\n\n### Designing delegated subtasks\n- Subtasks must be concrete, well-defined, and self-contained.\n- Delegated subtasks must materially advance the main task.\n- Do not duplicate work between the main rollout and delegated subtasks.\n- Avoid issuing multiple delegate calls on the same unresolved thread unless the new delegated task is genuinely different and necessary.\n- Narrow the delegated ask to the concrete output you need next.\n- For coding tasks, prefer delegating concrete code-change worker subtasks over read-only explorer analysis when the subagent can make a bounded patch in a clear write scope.\n- When delegating coding work, instruct the submodel to edit files directly in its forked workspace and list the file paths it changed in the final answer.\n- For code-edit subtasks, decompose work so each delegated task has a disjoint write set.\n\n### After you delegate\n- Call wait_agent very sparingly. Only call wait_agent when you need the result immediately for the next critical-path step and you are blocked until it returns.\n- Do not redo delegated subagent tasks yourself; focus on integrating results or tackling non-overlapping work.\n- While the subagent is running in the background, do meaningful non-overlapping work immediately.\n- Do not repeatedly wait by reflex.\n- When a delegated coding task returns, quickly review the uploaded changes, then integrate or refine them.\n\n### Parallel delegation patterns\n- Run multiple independent information-seeking subtasks in parallel when you have distinct questions that can be answered independently.\n- Split implementation into disjoint codebase slices and spawn multiple agents for them in parallel when the write scopes do not overlap.\n- Delegate verification only when it can run in parallel with ongoing implementation and is likely to catch a concrete risk before final integration.\n- The key is to find opportunities to spawn multiple independent subtasks in parallel within the same round, while ensuring each subtask is well-defined, self-contained, and materially advances the main task.",
                "strict": false,
                "parameters": {
                  "type": "object",
                  "properties": {
                    "fork_context": {
                      "type": "boolean",
                      "description": "True forks the current thread history into the new agent; false or omitted starts with only the initial prompt."
                    },
                    "items": {
                      "type": "array",
                      "description": "Structured input items. Use this to pass explicit mentions (for example app:// connector paths).",
                      "items": {
                        "type": "object",
                        "properties": {
                          "audio_url": {
                            "type": "string",
                            "description": "Audio data URL when type is audio."
                          },
                          "image_url": {
                            "type": "string",
                            "description": "Image URL when type is image."
                          },
                          "name": {
                            "type": "string",
                            "description": "Display name when type is skill or mention."
                          },
                          "path": {
                            "type": "string",
                            "description": "Path when type is local_image/local_audio/skill, or structured mention target such as app://<connector-id> or plugin://<plugin-name>@<marketplace-name> when type is mention."
                          },
                          "text": {
                            "type": "string",
                            "description": "Text content when type is text."
                          },
                          "type": {
                            "type": "string",
                            "description": "Input item type: text, image, local_image, audio, local_audio, skill, or mention."
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "message": {
                      "type": "string",
                      "description": "Initial plain-text task for the new agent. Use either message or items."
                    },
                    "model": {
                      "type": "string",
                      "description": "Model override for the new agent. Omit unless an explicit override is needed."
                    },
                    "reasoning_effort": {
                      "type": "string",
                      "description": "Reasoning effort override for the new agent. Omit to inherit the parent effort."
                    }
                  },
                  "additionalProperties": false
                }
              },
              {
                "type": "function",
                "name": "wait_agent",
                "description": "Wait for agents to reach a final status. Completed statuses may include the agent's final message. Returns empty status when timed out. Once the agent reaches a final status, a notification message will be received containing the same completed status.",
                "strict": false,
                "parameters": {
                  "type": "object",
                  "properties": {
                    "targets": {
                      "type": "array",
                      "description": "Agent ids to wait on. Pass multiple ids to wait for whichever finishes first.",
                      "items": {
                        "type": "string"
                      }
                    },
                    "timeout_ms": {
                      "type": "number",
                      "description": "Timeout in milliseconds. Defaults to 30000, min 10000, max 3600000. Prefer longer waits (minutes) to avoid busy polling."
                    }
                  },
                  "required": [
                    "targets"
                  ],
                  "additionalProperties": false
                }
              }
            ]
          },
          {
            "type": "function",
            "name": "get_goal",
            "description": "Get the current goal for this thread, including status, budgets, token and elapsed-time usage, and remaining token budget.",
            "strict": false,
            "parameters": {
              "type": "object",
              "properties": {},
              "required": [],
              "additionalProperties": false
            }
          },
          {
            "type": "function",
            "name": "create_goal",
            "description": "Create a goal only when explicitly requested by the user or system/developer instructions; do not infer goals from ordinary tasks.\nSet token_budget only when an explicit token budget is requested. Fails if an unfinished goal exists; use update_goal only for status.",
            "strict": false,
            "parameters": {
              "type": "object",
              "properties": {
                "objective": {
                  "type": "string",
                  "description": "Required. The concrete objective to start pursuing. This starts a new active goal when no goal exists or replaces the current goal when it is complete."
                },
                "token_budget": {
                  "type": "integer",
                  "description": "Positive token budget for the new goal. Omit unless explicitly requested."
                }
              },
              "required": [
                "objective"
              ],
              "additionalProperties": false
            }
          },
          {
            "type": "function",
            "name": "update_goal",
            "description": "Update the existing goal.\nSet status to `paused` only at the user's explicit request to pause this goal, never on your own initiative. Ask if unclear; a later resume revokes that request. Report the returned status and stop goal work. Budget limits take precedence over pausing.\nSet status to `complete` only when the objective has actually been achieved and no required work remains.\nSet status to `blocked` only when the same blocking condition has repeated for at least three consecutive goal turns, counting the original/user-triggered turn and any automatic continuations, and the agent cannot make meaningful progress without user input or an external-state change.\nIf the user resumes a goal that was previously marked `blocked`, treat the resumed run as a fresh blocked audit. If the same blocking condition then repeats for at least three consecutive resumed goal turns, set status to `blocked` again.\nOnce the blocked threshold is satisfied, do not keep reporting that you are still blocked while leaving the goal active; set status to `blocked`.\nDo not use `blocked` merely because the work is hard, slow, uncertain, incomplete, or would benefit from clarification.\nDo not mark a goal complete merely because its budget is nearly exhausted or because you are stopping work.\nYou cannot use this tool to resume, budget-limit, or usage-limit a goal; those status changes are controlled by the user or system.\nWhen marking a budgeted goal achieved with status `complete`, report the final token usage from the tool result to the user.",
            "strict": false,
            "parameters": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string",
                  "description": "Required. `paused` requires an explicit user request. Set to `complete` only when the objective is achieved and no required work remains. Set to `blocked` only after the same blocking condition has recurred for at least three consecutive goal turns and the agent is at an impasse. After a previously blocked goal is resumed, the resumed run starts a fresh blocked audit.",
                  "enum": [
                    "complete",
                    "blocked",
                    "paused"
                  ]
                }
              },
              "required": [
                "status"
              ],
              "additionalProperties": false
            }
          },
          {
            "type": "web_search",
            "external_web_access": false
          }
        ],
        "tool_choice": "auto",
        "parallel_tool_calls": true,
        "reasoning": {
          "summary": "auto"
        },
        "store": false,
        "include": [
          "reasoning.encrypted_content"
        ],
        "prompt_cache_key": "00000000-0000-4000-8000-000000000001",
        "client_metadata": {
          "session_id": "00000000-0000-4000-8000-000000000001",
          "x-codex-installation-id": "00000000-0000-4000-8000-000000000002",
          "thread_id": "00000000-0000-4000-8000-000000000001",
          "turn_id": "00000000-0000-4000-8000-000000000003",
          "x-codex-turn-metadata": "<codex turn metadata, 978 characters>",
          "root_turn_id": "00000000-0000-4000-8000-000000000003",
          "x-codex-window-id": "00000000-0000-4000-8000-000000000001:0"
        }
      },
      "expect": {
        "refused": {
          "status": 400,
          "type": "invalid_request_error",
          "code": "unsupported_field",
          "param": "tools[4].type",
          "message": "tools[4].type: 'namespace' tools are not supported; send function or custom tools"
        }
      }
    },
    {
      "name": "recommended config",
      "config": "the SIE provider block with web search, multi-agent and goal tools turned off",
      "body": {
        "model": "zai-org/GLM-5.3-Flash",
        "stream": true,
        "input": [
          {
            "type": "message",
            "id": "msg_5",
            "role": "developer",
            "content": [
              {
                "type": "input_text",
                "text": "<codex developer instructions, 16979 characters>"
              }
            ]
          },
          {
            "type": "message",
            "id": "msg_6",
            "role": "developer",
            "content": [
              {
                "type": "input_text",
                "text": "<codex developer instructions, 7893 characters>"
              },
              {
                "type": "input_text",
                "text": "<codex developer instructions, 341 characters>"
              }
            ]
          },
          {
            "type": "message",
            "id": "msg_7",
            "role": "user",
            "content": [
              {
                "type": "input_text",
                "text": "<codex environment context, 764 characters>"
              }
            ]
          },
          {
            "type": "message",
            "id": "msg_8",
            "role": "user",
            "content": [
              {
                "type": "input_text",
                "text": "Say hello."
              }
            ]
          }
        ],
        "tools": [
          {
            "type": "function",
            "name": "exec_command",
            "description": "Runs a command in a PTY, returning output or a session ID for ongoing interaction.",
            "strict": false,
            "parameters": {
              "type": "object",
              "properties": {
                "cmd": {
                  "type": "string",
                  "description": "Shell command to execute."
                },
                "justification": {
                  "type": "string",
                  "description": "User-facing approval question for `require_escalated`; omit otherwise."
                },
                "login": {
                  "type": "boolean",
                  "description": "True runs the shell with -l/-i semantics; false disables them. Defaults to true."
                },
                "max_output_tokens": {
                  "type": "number",
                  "description": "Output token budget. Defaults to 10000 tokens; larger requests may be capped by policy."
                },
                "prefix_rule": {
                  "type": "array",
                  "description": "Reusable approval prefix for `cmd`, only with `sandbox_permissions: \"require_escalated\"`; for example [\"git\", \"pull\"].",
                  "items": {
                    "type": "string"
                  }
                },
                "sandbox_permissions": {
                  "type": "string",
                  "description": "Per-command sandbox override. Defaults to `use_default`; use `require_escalated` for unsandboxed execution.",
                  "enum": [
                    "use_default",
                    "require_escalated"
                  ]
                },
                "shell": {
                  "type": "string",
                  "description": "Shell binary to launch. Defaults to the user's default shell."
                },
                "tty": {
                  "type": "boolean",
                  "description": "True allocates a PTY for the command; false or omitted uses plain pipes."
                },
                "workdir": {
                  "type": "string",
                  "description": "Working directory for the command. Defaults to the turn cwd."
                },
                "yield_time_ms": {
                  "type": "number",
                  "description": "Wait before yielding output. Defaults to 10000 ms; effective range is 250-30000 ms."
                }
              },
              "required": [
                "cmd"
              ],
              "additionalProperties": false
            }
          },
          {
            "type": "function",
            "name": "write_stdin",
            "description": "Writes characters to an existing unified exec session and returns recent output.",
            "strict": false,
            "parameters": {
              "type": "object",
              "properties": {
                "chars": {
                  "type": "string",
                  "description": "Bytes to write to stdin. Defaults to empty, which polls without writing."
                },
                "max_output_tokens": {
                  "type": "number",
                  "description": "Output token budget. Defaults to 10000 tokens; larger requests may be capped by policy."
                },
                "session_id": {
                  "type": "number",
                  "description": "Identifier of the running unified exec session."
                },
                "yield_time_ms": {
                  "type": "number",
                  "description": "Wait before yielding output. Non-empty writes default to 250 ms and cap at 30000 ms; empty polls wait 5000-300000 ms by default."
                }
              },
              "required": [
                "session_id"
              ],
              "additionalProperties": false
            }
          },
          {
            "type": "function",
            "name": "request_user_input",
            "description": "Request user input for one to three short questions and wait for the response. This tool is only available in Plan mode.",
            "strict": false,
            "parameters": {
              "type": "object",
              "properties": {
                "questions": {
                  "type": "array",
                  "description": "Questions to show the user. Prefer 1 and do not exceed 3",
                  "items": {
                    "type": "object",
                    "properties": {
                      "header": {
                        "type": "string",
                        "description": "Short header label shown in the UI (12 or fewer chars)."
                      },
                      "id": {
                        "type": "string",
                        "description": "Stable identifier for mapping answers (snake_case)."
                      },
                      "options": {
                        "type": "array",
                        "description": "Provide 2-3 mutually exclusive choices. Put the recommended option first and suffix its label with \"(Recommended)\". Do not include an \"Other\" option in this list; the client will add a free-form \"Other\" option automatically.",
                        "items": {
                          "type": "object",
                          "properties": {
                            "description": {
                              "type": "string",
                              "description": "One short sentence explaining impact/tradeoff if selected."
                            },
                            "label": {
                              "type": "string",
                              "description": "User-facing label (1-5 words)."
                            }
                          },
                          "required": [
                            "label",
                            "description"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "question": {
                        "type": "string",
                        "description": "Single-sentence prompt shown to the user."
                      }
                    },
                    "required": [
                      "id",
                      "header",
                      "question",
                      "options"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "questions"
              ],
              "additionalProperties": false
            }
          },
          {
            "type": "function",
            "name": "view_image",
            "description": "View a local image file from the filesystem when visual inspection is needed. Use this for images already available on disk.",
            "strict": false,
            "parameters": {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string",
                  "description": "Local filesystem path to an image file."
                }
              },
              "required": [
                "path"
              ],
              "additionalProperties": false
            }
          }
        ],
        "tool_choice": "auto",
        "parallel_tool_calls": true,
        "reasoning": {
          "summary": "auto"
        },
        "store": false,
        "include": [
          "reasoning.encrypted_content"
        ],
        "prompt_cache_key": "00000000-0000-4000-8000-000000000004",
        "client_metadata": {
          "x-codex-installation-id": "00000000-0000-4000-8000-000000000002",
          "thread_id": "00000000-0000-4000-8000-000000000004",
          "x-codex-window-id": "00000000-0000-4000-8000-000000000004:0",
          "turn_id": "00000000-0000-4000-8000-000000000005",
          "root_turn_id": "00000000-0000-4000-8000-000000000005",
          "x-codex-turn-metadata": "<codex turn metadata, 978 characters>",
          "session_id": "00000000-0000-4000-8000-000000000004"
        }
      },
      "expect": {
        "chat": {
          "roles": [
            "system",
            "user",
            "user"
          ],
          "stream": true,
          "tool_count": 4,
          "tool_choice": "auto",
          "parallel_tool_calls": true,
          "image_parts": 0,
          "include_reasoning": false
        }
      }
    },
    {
      "name": "tool loop turn 1",
      "config": "recommended config; the stub answered with an exec_command call",
      "body": {
        "model": "zai-org/GLM-5.3-Flash",
        "stream": true,
        "input": [
          {
            "type": "message",
            "id": "msg_9",
            "role": "developer",
            "content": [
              {
                "type": "input_text",
                "text": "<codex developer instructions, 16979 characters>"
              }
            ]
          },
          {
            "type": "message",
            "id": "msg_10",
            "role": "developer",
            "content": [
              {
                "type": "input_text",
                "text": "<codex developer instructions, 7893 characters>"
              },
              {
                "type": "input_text",
                "text": "<codex developer instructions, 341 characters>"
              }
            ]
          },
          {
            "type": "message",
            "id": "msg_11",
            "role": "user",
            "content": [
              {
                "type": "input_text",
                "text": "<codex environment context, 764 characters>"
              }
            ]
          },
          {
            "type": "message",
            "id": "msg_12",
            "role": "user",
            "content": [
              {
                "type": "input_text",
                "text": "List the files, then look at dot.png."
              }
            ]
          }
        ],
        "tools": [
          {
            "type": "function",
            "name": "exec_command",
            "description": "Runs a command in a PTY, returning output or a session ID for ongoing interaction.",
            "strict": false,
            "parameters": {
              "type": "object",
              "properties": {
                "cmd": {
                  "type": "string",
                  "description": "Shell command to execute."
                },
                "justification": {
                  "type": "string",
                  "description": "User-facing approval question for `require_escalated`; omit otherwise."
                },
                "login": {
                  "type": "boolean",
                  "description": "True runs the shell with -l/-i semantics; false disables them. Defaults to true."
                },
                "max_output_tokens": {
                  "type": "number",
                  "description": "Output token budget. Defaults to 10000 tokens; larger requests may be capped by policy."
                },
                "prefix_rule": {
                  "type": "array",
                  "description": "Reusable approval prefix for `cmd`, only with `sandbox_permissions: \"require_escalated\"`; for example [\"git\", \"pull\"].",
                  "items": {
                    "type": "string"
                  }
                },
                "sandbox_permissions": {
                  "type": "string",
                  "description": "Per-command sandbox override. Defaults to `use_default`; use `require_escalated` for unsandboxed execution.",
                  "enum": [
                    "use_default",
                    "require_escalated"
                  ]
                },
                "shell": {
                  "type": "string",
                  "description": "Shell binary to launch. Defaults to the user's default shell."
                },
                "tty": {
                  "type": "boolean",
                  "description": "True allocates a PTY for the command; false or omitted uses plain pipes."
                },
                "workdir": {
                  "type": "string",
                  "description": "Working directory for the command. Defaults to the turn cwd."
                },
                "yield_time_ms": {
                  "type": "number",
                  "description": "Wait before yielding output. Defaults to 10000 ms; effective range is 250-30000 ms."
                }
              },
              "required": [
                "cmd"
              ],
              "additionalProperties": false
            }
          },
          {
            "type": "function",
            "name": "write_stdin",
            "description": "Writes characters to an existing unified exec session and returns recent output.",
            "strict": false,
            "parameters": {
              "type": "object",
              "properties": {
                "chars": {
                  "type": "string",
                  "description": "Bytes to write to stdin. Defaults to empty, which polls without writing."
                },
                "max_output_tokens": {
                  "type": "number",
                  "description": "Output token budget. Defaults to 10000 tokens; larger requests may be capped by policy."
                },
                "session_id": {
                  "type": "number",
                  "description": "Identifier of the running unified exec session."
                },
                "yield_time_ms": {
                  "type": "number",
                  "description": "Wait before yielding output. Non-empty writes default to 250 ms and cap at 30000 ms; empty polls wait 5000-300000 ms by default."
                }
              },
              "required": [
                "session_id"
              ],
              "additionalProperties": false
            }
          },
          {
            "type": "function",
            "name": "request_user_input",
            "description": "Request user input for one to three short questions and wait for the response. This tool is only available in Plan mode.",
            "strict": false,
            "parameters": {
              "type": "object",
              "properties": {
                "questions": {
                  "type": "array",
                  "description": "Questions to show the user. Prefer 1 and do not exceed 3",
                  "items": {
                    "type": "object",
                    "properties": {
                      "header": {
                        "type": "string",
                        "description": "Short header label shown in the UI (12 or fewer chars)."
                      },
                      "id": {
                        "type": "string",
                        "description": "Stable identifier for mapping answers (snake_case)."
                      },
                      "options": {
                        "type": "array",
                        "description": "Provide 2-3 mutually exclusive choices. Put the recommended option first and suffix its label with \"(Recommended)\". Do not include an \"Other\" option in this list; the client will add a free-form \"Other\" option automatically.",
                        "items": {
                          "type": "object",
                          "properties": {
                            "description": {
                              "type": "string",
                              "description": "One short sentence explaining impact/tradeoff if selected."
                            },
                            "label": {
                              "type": "string",
                              "description": "User-facing label (1-5 words)."
                            }
                          },
                          "required": [
                            "label",
                            "description"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "question": {
                        "type": "string",
                        "description": "Single-sentence prompt shown to the user."
                      }
                    },
                    "required": [
                      "id",
                      "header",
                      "question",
                      "options"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "questions"
              ],
              "additionalProperties": false
            }
          },
          {
            "type": "function",
            "name": "view_image",
            "description": "View a local image file from the filesystem when visual inspection is needed. Use this for images already available on disk.",
            "strict": false,
            "parameters": {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string",
                  "description": "Local filesystem path to an image file."
                }
              },
              "required": [
                "path"
              ],
              "additionalProperties": false
            }
          }
        ],
        "tool_choice": "auto",
        "parallel_tool_calls": true,
        "reasoning": {
          "summary": "auto"
        },
        "store": false,
        "include": [
          "reasoning.encrypted_content"
        ],
        "prompt_cache_key": "00000000-0000-4000-8000-000000000006",
        "client_metadata": {
          "x-codex-installation-id": "00000000-0000-4000-8000-000000000002",
          "x-codex-window-id": "00000000-0000-4000-8000-000000000006:0",
          "root_turn_id": "00000000-0000-4000-8000-000000000007",
          "thread_id": "00000000-0000-4000-8000-000000000006",
          "x-codex-turn-metadata": "<codex turn metadata, 978 characters>",
          "turn_id": "00000000-0000-4000-8000-000000000007",
          "session_id": "00000000-0000-4000-8000-000000000006"
        }
      },
      "expect": {
        "chat": {
          "roles": [
            "system",
            "user",
            "user"
          ],
          "stream": true,
          "tool_count": 4,
          "tool_choice": "auto",
          "parallel_tool_calls": true,
          "image_parts": 0,
          "include_reasoning": false
        }
      }
    },
    {
      "name": "tool loop turn 2",
      "config": "recommended config; the stub answered with a view_image call",
      "body": {
        "model": "zai-org/GLM-5.3-Flash",
        "stream": true,
        "input": [
          {
            "type": "message",
            "id": "msg_9",
            "role": "developer",
            "content": [
              {
                "type": "input_text",
                "text": "<codex developer instructions, 16979 characters>"
              }
            ]
          },
          {
            "type": "message",
            "id": "msg_10",
            "role": "developer",
            "content": [
              {
                "type": "input_text",
                "text": "<codex developer instructions, 7893 characters>"
              },
              {
                "type": "input_text",
                "text": "<codex developer instructions, 341 characters>"
              }
            ]
          },
          {
            "type": "message",
            "id": "msg_11",
            "role": "user",
            "content": [
              {
                "type": "input_text",
                "text": "<codex environment context, 764 characters>"
              }
            ]
          },
          {
            "type": "message",
            "id": "msg_12",
            "role": "user",
            "content": [
              {
                "type": "input_text",
                "text": "List the files, then look at dot.png."
              }
            ]
          },
          {
            "type": "function_call",
            "status": "completed",
            "id": "fc_1",
            "name": "exec_command",
            "arguments": "{\"cmd\": \"ls\"}",
            "call_id": "call_1"
          },
          {
            "type": "function_call_output",
            "id": "fco_1",
            "call_id": "call_1",
            "output": "Chunk ID: d84674\nWall time: 0.0000 seconds\nProcess exited with code 0\nOriginal token count: 14\nOutput:\nREADME.md\ndot.png\ninvoice_totals\npyproject.toml\ntests\n"
          }
        ],
        "tools": [
          {
            "type": "function",
            "name": "exec_command",
            "description": "Runs a command in a PTY, returning output or a session ID for ongoing interaction.",
            "strict": false,
            "parameters": {
              "type": "object",
              "properties": {
                "cmd": {
                  "type": "string",
                  "description": "Shell command to execute."
                },
                "justification": {
                  "type": "string",
                  "description": "User-facing approval question for `require_escalated`; omit otherwise."
                },
                "login": {
                  "type": "boolean",
                  "description": "True runs the shell with -l/-i semantics; false disables them. Defaults to true."
                },
                "max_output_tokens": {
                  "type": "number",
                  "description": "Output token budget. Defaults to 10000 tokens; larger requests may be capped by policy."
                },
                "prefix_rule": {
                  "type": "array",
                  "description": "Reusable approval prefix for `cmd`, only with `sandbox_permissions: \"require_escalated\"`; for example [\"git\", \"pull\"].",
                  "items": {
                    "type": "string"
                  }
                },
                "sandbox_permissions": {
                  "type": "string",
                  "description": "Per-command sandbox override. Defaults to `use_default`; use `require_escalated` for unsandboxed execution.",
                  "enum": [
                    "use_default",
                    "require_escalated"
                  ]
                },
                "shell": {
                  "type": "string",
                  "description": "Shell binary to launch. Defaults to the user's default shell."
                },
                "tty": {
                  "type": "boolean",
                  "description": "True allocates a PTY for the command; false or omitted uses plain pipes."
                },
                "workdir": {
                  "type": "string",
                  "description": "Working directory for the command. Defaults to the turn cwd."
                },
                "yield_time_ms": {
                  "type": "number",
                  "description": "Wait before yielding output. Defaults to 10000 ms; effective range is 250-30000 ms."
                }
              },
              "required": [
                "cmd"
              ],
              "additionalProperties": false
            }
          },
          {
            "type": "function",
            "name": "write_stdin",
            "description": "Writes characters to an existing unified exec session and returns recent output.",
            "strict": false,
            "parameters": {
              "type": "object",
              "properties": {
                "chars": {
                  "type": "string",
                  "description": "Bytes to write to stdin. Defaults to empty, which polls without writing."
                },
                "max_output_tokens": {
                  "type": "number",
                  "description": "Output token budget. Defaults to 10000 tokens; larger requests may be capped by policy."
                },
                "session_id": {
                  "type": "number",
                  "description": "Identifier of the running unified exec session."
                },
                "yield_time_ms": {
                  "type": "number",
                  "description": "Wait before yielding output. Non-empty writes default to 250 ms and cap at 30000 ms; empty polls wait 5000-300000 ms by default."
                }
              },
              "required": [
                "session_id"
              ],
              "additionalProperties": false
            }
          },
          {
            "type": "function",
            "name": "request_user_input",
            "description": "Request user input for one to three short questions and wait for the response. This tool is only available in Plan mode.",
            "strict": false,
            "parameters": {
              "type": "object",
              "properties": {
                "questions": {
                  "type": "array",
                  "description": "Questions to show the user. Prefer 1 and do not exceed 3",
                  "items": {
                    "type": "object",
                    "properties": {
                      "header": {
                        "type": "string",
                        "description": "Short header label shown in the UI (12 or fewer chars)."
                      },
                      "id": {
                        "type": "string",
                        "description": "Stable identifier for mapping answers (snake_case)."
                      },
                      "options": {
                        "type": "array",
                        "description": "Provide 2-3 mutually exclusive choices. Put the recommended option first and suffix its label with \"(Recommended)\". Do not include an \"Other\" option in this list; the client will add a free-form \"Other\" option automatically.",
                        "items": {
                          "type": "object",
                          "properties": {
                            "description": {
                              "type": "string",
                              "description": "One short sentence explaining impact/tradeoff if selected."
                            },
                            "label": {
                              "type": "string",
                              "description": "User-facing label (1-5 words)."
                            }
                          },
                          "required": [
                            "label",
                            "description"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "question": {
                        "type": "string",
                        "description": "Single-sentence prompt shown to the user."
                      }
                    },
                    "required": [
                      "id",
                      "header",
                      "question",
                      "options"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "questions"
              ],
              "additionalProperties": false
            }
          },
          {
            "type": "function",
            "name": "view_image",
            "description": "View a local image file from the filesystem when visual inspection is needed. Use this for images already available on disk.",
            "strict": false,
            "parameters": {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string",
                  "description": "Local filesystem path to an image file."
                }
              },
              "required": [
                "path"
              ],
              "additionalProperties": false
            }
          }
        ],
        "tool_choice": "auto",
        "parallel_tool_calls": true,
        "reasoning": {
          "summary": "auto"
        },
        "store": false,
        "include": [
          "reasoning.encrypted_content"
        ],
        "prompt_cache_key": "00000000-0000-4000-8000-000000000006",
        "client_metadata": {
          "x-codex-turn-metadata": "<codex turn metadata, 978 characters>",
          "turn_id": "00000000-0000-4000-8000-000000000007",
          "x-codex-window-id": "00000000-0000-4000-8000-000000000006:0",
          "root_turn_id": "00000000-0000-4000-8000-000000000007",
          "x-codex-installation-id": "00000000-0000-4000-8000-000000000002",
          "thread_id": "00000000-0000-4000-8000-000000000006",
          "session_id": "00000000-0000-4000-8000-000000000006"
        }
      },
      "expect": {
        "chat": {
          "roles": [
            "system",
            "user",
            "user",
            "assistant",
            "tool"
          ],
          "stream": true,
          "tool_count": 4,
          "tool_choice": "auto",
          "parallel_tool_calls": true,
          "image_parts": 0,
          "include_reasoning": false
        }
      }
    },
    {
      "name": "tool loop turn 3",
      "config": "recommended config; the view_image output is an input_image",
      "body": {
        "model": "zai-org/GLM-5.3-Flash",
        "stream": true,
        "input": [
          {
            "type": "message",
            "id": "msg_9",
            "role": "developer",
            "content": [
              {
                "type": "input_text",
                "text": "<codex developer instructions, 16979 characters>"
              }
            ]
          },
          {
            "type": "message",
            "id": "msg_10",
            "role": "developer",
            "content": [
              {
                "type": "input_text",
                "text": "<codex developer instructions, 7893 characters>"
              },
              {
                "type": "input_text",
                "text": "<codex developer instructions, 341 characters>"
              }
            ]
          },
          {
            "type": "message",
            "id": "msg_11",
            "role": "user",
            "content": [
              {
                "type": "input_text",
                "text": "<codex environment context, 764 characters>"
              }
            ]
          },
          {
            "type": "message",
            "id": "msg_12",
            "role": "user",
            "content": [
              {
                "type": "input_text",
                "text": "List the files, then look at dot.png."
              }
            ]
          },
          {
            "type": "function_call",
            "status": "completed",
            "id": "fc_1",
            "name": "exec_command",
            "arguments": "{\"cmd\": \"ls\"}",
            "call_id": "call_1"
          },
          {
            "type": "function_call_output",
            "id": "fco_1",
            "call_id": "call_1",
            "output": "Chunk ID: d84674\nWall time: 0.0000 seconds\nProcess exited with code 0\nOriginal token count: 14\nOutput:\nREADME.md\ndot.png\ninvoice_totals\npyproject.toml\ntests\n"
          },
          {
            "type": "function_call",
            "status": "completed",
            "id": "fc_2",
            "name": "view_image",
            "arguments": "{\"path\": \"/workspace/dot.png\"}",
            "call_id": "call_2"
          },
          {
            "type": "function_call_output",
            "id": "fco_2",
            "call_id": "call_2",
            "output": [
              {
                "type": "input_image",
                "image_url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==",
                "detail": "high"
              }
            ]
          }
        ],
        "tools": [
          {
            "type": "function",
            "name": "exec_command",
            "description": "Runs a command in a PTY, returning output or a session ID for ongoing interaction.",
            "strict": false,
            "parameters": {
              "type": "object",
              "properties": {
                "cmd": {
                  "type": "string",
                  "description": "Shell command to execute."
                },
                "justification": {
                  "type": "string",
                  "description": "User-facing approval question for `require_escalated`; omit otherwise."
                },
                "login": {
                  "type": "boolean",
                  "description": "True runs the shell with -l/-i semantics; false disables them. Defaults to true."
                },
                "max_output_tokens": {
                  "type": "number",
                  "description": "Output token budget. Defaults to 10000 tokens; larger requests may be capped by policy."
                },
                "prefix_rule": {
                  "type": "array",
                  "description": "Reusable approval prefix for `cmd`, only with `sandbox_permissions: \"require_escalated\"`; for example [\"git\", \"pull\"].",
                  "items": {
                    "type": "string"
                  }
                },
                "sandbox_permissions": {
                  "type": "string",
                  "description": "Per-command sandbox override. Defaults to `use_default`; use `require_escalated` for unsandboxed execution.",
                  "enum": [
                    "use_default",
                    "require_escalated"
                  ]
                },
                "shell": {
                  "type": "string",
                  "description": "Shell binary to launch. Defaults to the user's default shell."
                },
                "tty": {
                  "type": "boolean",
                  "description": "True allocates a PTY for the command; false or omitted uses plain pipes."
                },
                "workdir": {
                  "type": "string",
                  "description": "Working directory for the command. Defaults to the turn cwd."
                },
                "yield_time_ms": {
                  "type": "number",
                  "description": "Wait before yielding output. Defaults to 10000 ms; effective range is 250-30000 ms."
                }
              },
              "required": [
                "cmd"
              ],
              "additionalProperties": false
            }
          },
          {
            "type": "function",
            "name": "write_stdin",
            "description": "Writes characters to an existing unified exec session and returns recent output.",
            "strict": false,
            "parameters": {
              "type": "object",
              "properties": {
                "chars": {
                  "type": "string",
                  "description": "Bytes to write to stdin. Defaults to empty, which polls without writing."
                },
                "max_output_tokens": {
                  "type": "number",
                  "description": "Output token budget. Defaults to 10000 tokens; larger requests may be capped by policy."
                },
                "session_id": {
                  "type": "number",
                  "description": "Identifier of the running unified exec session."
                },
                "yield_time_ms": {
                  "type": "number",
                  "description": "Wait before yielding output. Non-empty writes default to 250 ms and cap at 30000 ms; empty polls wait 5000-300000 ms by default."
                }
              },
              "required": [
                "session_id"
              ],
              "additionalProperties": false
            }
          },
          {
            "type": "function",
            "name": "request_user_input",
            "description": "Request user input for one to three short questions and wait for the response. This tool is only available in Plan mode.",
            "strict": false,
            "parameters": {
              "type": "object",
              "properties": {
                "questions": {
                  "type": "array",
                  "description": "Questions to show the user. Prefer 1 and do not exceed 3",
                  "items": {
                    "type": "object",
                    "properties": {
                      "header": {
                        "type": "string",
                        "description": "Short header label shown in the UI (12 or fewer chars)."
                      },
                      "id": {
                        "type": "string",
                        "description": "Stable identifier for mapping answers (snake_case)."
                      },
                      "options": {
                        "type": "array",
                        "description": "Provide 2-3 mutually exclusive choices. Put the recommended option first and suffix its label with \"(Recommended)\". Do not include an \"Other\" option in this list; the client will add a free-form \"Other\" option automatically.",
                        "items": {
                          "type": "object",
                          "properties": {
                            "description": {
                              "type": "string",
                              "description": "One short sentence explaining impact/tradeoff if selected."
                            },
                            "label": {
                              "type": "string",
                              "description": "User-facing label (1-5 words)."
                            }
                          },
                          "required": [
                            "label",
                            "description"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "question": {
                        "type": "string",
                        "description": "Single-sentence prompt shown to the user."
                      }
                    },
                    "required": [
                      "id",
                      "header",
                      "question",
                      "options"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "questions"
              ],
              "additionalProperties": false
            }
          },
          {
            "type": "function",
            "name": "view_image",
            "description": "View a local image file from the filesystem when visual inspection is needed. Use this for images already available on disk.",
            "strict": false,
            "parameters": {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string",
                  "description": "Local filesystem path to an image file."
                }
              },
              "required": [
                "path"
              ],
              "additionalProperties": false
            }
          }
        ],
        "tool_choice": "auto",
        "parallel_tool_calls": true,
        "reasoning": {
          "summary": "auto"
        },
        "store": false,
        "include": [
          "reasoning.encrypted_content"
        ],
        "prompt_cache_key": "00000000-0000-4000-8000-000000000006",
        "client_metadata": {
          "x-codex-window-id": "00000000-0000-4000-8000-000000000006:0",
          "turn_id": "00000000-0000-4000-8000-000000000007",
          "thread_id": "00000000-0000-4000-8000-000000000006",
          "session_id": "00000000-0000-4000-8000-000000000006",
          "x-codex-installation-id": "00000000-0000-4000-8000-000000000002",
          "root_turn_id": "00000000-0000-4000-8000-000000000007",
          "x-codex-turn-metadata": "<codex turn metadata, 978 characters>"
        }
      },
      "expect": {
        "chat": {
          "roles": [
            "system",
            "user",
            "user",
            "assistant",
            "tool",
            "assistant",
            "tool",
            "user"
          ],
          "stream": true,
          "tool_count": 4,
          "tool_choice": "auto",
          "parallel_tool_calls": true,
          "image_parts": 1,
          "include_reasoning": false
        }
      }
    },
    {
      "name": "reasoning effort high",
      "config": "recommended config with reasoning effort high",
      "body": {
        "model": "zai-org/GLM-5.3-Flash",
        "stream": true,
        "input": [
          {
            "type": "message",
            "id": "msg_13",
            "role": "developer",
            "content": [
              {
                "type": "input_text",
                "text": "<codex developer instructions, 16979 characters>"
              }
            ]
          },
          {
            "type": "message",
            "id": "msg_14",
            "role": "developer",
            "content": [
              {
                "type": "input_text",
                "text": "<codex developer instructions, 7893 characters>"
              },
              {
                "type": "input_text",
                "text": "<codex developer instructions, 341 characters>"
              }
            ]
          },
          {
            "type": "message",
            "id": "msg_15",
            "role": "user",
            "content": [
              {
                "type": "input_text",
                "text": "<codex environment context, 764 characters>"
              }
            ]
          },
          {
            "type": "message",
            "id": "msg_16",
            "role": "user",
            "content": [
              {
                "type": "input_text",
                "text": "Say hello."
              }
            ]
          }
        ],
        "tools": [
          {
            "type": "function",
            "name": "exec_command",
            "description": "Runs a command in a PTY, returning output or a session ID for ongoing interaction.",
            "strict": false,
            "parameters": {
              "type": "object",
              "properties": {
                "cmd": {
                  "type": "string",
                  "description": "Shell command to execute."
                },
                "justification": {
                  "type": "string",
                  "description": "User-facing approval question for `require_escalated`; omit otherwise."
                },
                "login": {
                  "type": "boolean",
                  "description": "True runs the shell with -l/-i semantics; false disables them. Defaults to true."
                },
                "max_output_tokens": {
                  "type": "number",
                  "description": "Output token budget. Defaults to 10000 tokens; larger requests may be capped by policy."
                },
                "prefix_rule": {
                  "type": "array",
                  "description": "Reusable approval prefix for `cmd`, only with `sandbox_permissions: \"require_escalated\"`; for example [\"git\", \"pull\"].",
                  "items": {
                    "type": "string"
                  }
                },
                "sandbox_permissions": {
                  "type": "string",
                  "description": "Per-command sandbox override. Defaults to `use_default`; use `require_escalated` for unsandboxed execution.",
                  "enum": [
                    "use_default",
                    "require_escalated"
                  ]
                },
                "shell": {
                  "type": "string",
                  "description": "Shell binary to launch. Defaults to the user's default shell."
                },
                "tty": {
                  "type": "boolean",
                  "description": "True allocates a PTY for the command; false or omitted uses plain pipes."
                },
                "workdir": {
                  "type": "string",
                  "description": "Working directory for the command. Defaults to the turn cwd."
                },
                "yield_time_ms": {
                  "type": "number",
                  "description": "Wait before yielding output. Defaults to 10000 ms; effective range is 250-30000 ms."
                }
              },
              "required": [
                "cmd"
              ],
              "additionalProperties": false
            }
          },
          {
            "type": "function",
            "name": "write_stdin",
            "description": "Writes characters to an existing unified exec session and returns recent output.",
            "strict": false,
            "parameters": {
              "type": "object",
              "properties": {
                "chars": {
                  "type": "string",
                  "description": "Bytes to write to stdin. Defaults to empty, which polls without writing."
                },
                "max_output_tokens": {
                  "type": "number",
                  "description": "Output token budget. Defaults to 10000 tokens; larger requests may be capped by policy."
                },
                "session_id": {
                  "type": "number",
                  "description": "Identifier of the running unified exec session."
                },
                "yield_time_ms": {
                  "type": "number",
                  "description": "Wait before yielding output. Non-empty writes default to 250 ms and cap at 30000 ms; empty polls wait 5000-300000 ms by default."
                }
              },
              "required": [
                "session_id"
              ],
              "additionalProperties": false
            }
          },
          {
            "type": "function",
            "name": "request_user_input",
            "description": "Request user input for one to three short questions and wait for the response. This tool is only available in Plan mode.",
            "strict": false,
            "parameters": {
              "type": "object",
              "properties": {
                "questions": {
                  "type": "array",
                  "description": "Questions to show the user. Prefer 1 and do not exceed 3",
                  "items": {
                    "type": "object",
                    "properties": {
                      "header": {
                        "type": "string",
                        "description": "Short header label shown in the UI (12 or fewer chars)."
                      },
                      "id": {
                        "type": "string",
                        "description": "Stable identifier for mapping answers (snake_case)."
                      },
                      "options": {
                        "type": "array",
                        "description": "Provide 2-3 mutually exclusive choices. Put the recommended option first and suffix its label with \"(Recommended)\". Do not include an \"Other\" option in this list; the client will add a free-form \"Other\" option automatically.",
                        "items": {
                          "type": "object",
                          "properties": {
                            "description": {
                              "type": "string",
                              "description": "One short sentence explaining impact/tradeoff if selected."
                            },
                            "label": {
                              "type": "string",
                              "description": "User-facing label (1-5 words)."
                            }
                          },
                          "required": [
                            "label",
                            "description"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "question": {
                        "type": "string",
                        "description": "Single-sentence prompt shown to the user."
                      }
                    },
                    "required": [
                      "id",
                      "header",
                      "question",
                      "options"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "questions"
              ],
              "additionalProperties": false
            }
          },
          {
            "type": "function",
            "name": "view_image",
            "description": "View a local image file from the filesystem when visual inspection is needed. Use this for images already available on disk.",
            "strict": false,
            "parameters": {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string",
                  "description": "Local filesystem path to an image file."
                }
              },
              "required": [
                "path"
              ],
              "additionalProperties": false
            }
          }
        ],
        "tool_choice": "auto",
        "parallel_tool_calls": true,
        "reasoning": {
          "effort": "high"
        },
        "store": false,
        "include": [
          "reasoning.encrypted_content"
        ],
        "prompt_cache_key": "00000000-0000-4000-8000-000000000009",
        "client_metadata": {
          "session_id": "00000000-0000-4000-8000-000000000009",
          "thread_id": "00000000-0000-4000-8000-000000000009",
          "root_turn_id": "00000000-0000-4000-8000-000000000010",
          "turn_id": "00000000-0000-4000-8000-000000000010",
          "x-codex-turn-metadata": "<codex turn metadata, 1004 characters>",
          "x-codex-installation-id": "00000000-0000-4000-8000-000000000002",
          "x-codex-window-id": "00000000-0000-4000-8000-000000000009:0"
        }
      },
      "expect": {
        "chat": {
          "roles": [
            "system",
            "user",
            "user"
          ],
          "stream": true,
          "tool_count": 4,
          "tool_choice": "auto",
          "parallel_tool_calls": true,
          "image_parts": 0,
          "include_reasoning": false,
          "reasoning_effort": "high"
        }
      }
    }
  ]
}