recover_generated_image
Recover generated images from a Codex session and write them to disk, returning absolute paths for Discord replies. Solves Codex's preview-only output by decoding session logs to save actual files.
Instructions
Recover the most recently generated image(s) from the active Codex session rollout and write them to disk. Codex's built-in image_gen shows an inline preview but usually writes no file; this decodes the image from the session log and saves it to the generated-images dir, returning absolute path(s) ready to pass to the files array of reply/send_message. Optional count (default 1) and session_file (absolute rollout path; defaults to the newest session).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "recover_generated_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | ||
| session_file | No |