Skip to main content
Glama

List background jobs (free)

codex_job_list
Read-only

Recover lost job IDs after context compaction or interruption by listing background jobs newest first. Filter by status or limit to inspect each job's outcome and expiry without a model call.

Instructions

List the background jobs known for this workspace, newest first.

Free — no model call. Use to recover job_ids lost across context compaction or interruption. Returns each job's id, kind, status, start time, result_available, result_ok (a done job's outcome — true/false/null; see codex_job_status), and expiry, so a stored failure is triageable without fetching each result.

Returns every retained job by default; pass limit (1-1000) or status to narrow. They narrow independently — omitting limit returns every job matching status, not every job. Only an explicit limit truncates: when more jobs match, the response sets truncated: true with a truncation_hint — the extra rows are dropped, not paged, so omit limit to get them all rather than looking for a cursor.

Read a job's result promptly — a finished record can silently drop off. This list is not permanent storage: terminal records expire after the TTL (default 24h), and a per-workspace soft cap (default 50, clamped 1-1000) evicts the oldest terminal records as new jobs start, so a finished job can disappear even before its expires_at. Running jobs are never evicted, so a busy workspace can hold more than the cap — and more than limit's 1000 ceiling. Includes sync-originated records (any sync consult/review/delegate call); the cap/TTL eviction covers both.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum jobs to return, newest first (1-1000). Omit (or pass null) to return every retained job that matches — the default; it caps nothing, and does not override `status`. Only an explicit limit truncates: then the response sets truncated=true and the extra rows are dropped.
statusNoReturn only jobs in this lifecycle state ('running', 'done', 'failed', 'cancelled', 'timeout'); omit for all states.
workspace_rootNoAbsolute path to the target repo root — pass it (or an MCP root) to target the intended repo; otherwise the call falls back to the server's own cwd and sets meta.workspace_warning. On an active call it selects where Codex works, not what it can read — it is not a read boundary.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed1 schema field changedv0.19.0
    • changedInput schema / properties / workspace_root / description
      Previous value: -"Absolute path to the target repo root — pass it (or an MCP root) to target the intended repo; otherwise the call falls back to the server's own cwd and sets meta.workspace_warning."New value: +"Absolute path to the target repo root — pass it (or an MCP root) to target the intended repo; otherwise the call falls back to the server's own cwd and sets meta.workspace_warning. On an active call it selects where Codex works, not what it can read — it is not a read boundary."
  2. Changed4 schema fields changedv0.17.0
    • addedInput schema / properties / limit
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maximum": 1000,
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Maximum jobs to return, newest first (1-1000). Omit (or pass null) to return every retained job that matches — the default; it caps nothing, and does not override `status`. Only an explicit limit truncates: then the response sets truncated=true and the extra rows are dropped."
      +}
    • addedInput schema / properties / status
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "running",
      +        "done",
      +        "failed",
      +        "cancelled",
      +        "timeout"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Return only jobs in this lifecycle state ('running', 'done', 'failed', 'cancelled', 'timeout'); omit for all states."
      +}
    • changedInput schema / properties / workspace_root / description
      Previous value: -"Absolute path to the target repository root. Pass it (or rely on an MCP root) so the call targets the intended repo; otherwise it falls back to the server's own cwd and meta.workspace_warning is set."New value: +"Absolute path to the target repo root — pass it (or an MCP root) to target the intended repo; otherwise the call falls back to the server's own cwd and sets meta.workspace_warning."
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "fingerprint": {
      -        "type": "string"
      -      },
      -      "jobs": {
      -        "items": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "elapsed_ms": {
      -              "type": "integer"
      -            },
      -            "expires_at": {
      -              "anyOf": [
      -                {
      -                  "type": "string"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ]
      -            },
      -            "job_id": {
      -              "type": "string"
      -            },
      -            "kind": {
      -              "type": "string"
      -            },
      -            "result_available": {
      -              "type": "boolean"
      -            },
      -            "started_at": {
      -              "type": "string"
      -            },
      -            "status": {
      -              "enum": [
      -                "running",
      -                "done",
      -                "failed",
      -                "cancelled",
      -                "timeout"
      -              ],
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "job_id",
      -            "kind",
      -            "status",
      -            "started_at",
      -            "elapsed_ms"
      -          ],
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "ok": {
      -        "const": true,
      -        "type": "boolean"
      -      },
      -      "server_version": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "workspace": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "cwd": {
      -            "type": "string"
      -          },
      -          "workspace_source": {
      -            "anyOf": [
      -              {
      -                "type": "string"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "workspace_warning": {
      -            "anyOf": [
      -              {
      -                "type": "string"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          }
      -        },
      -        "required": [
      -          "cwd"
      -        ],
      -        "type": "object"
      -      }
      -    },
      -    "required": [
      -      "workspace"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "error": {
      -        "description": "Populated error envelope; full schema at resource codex://error-envelope",
      -        "type": "object"
      -      },
      -      "meta": {
      -        "type": "object"
      -      },
      -      "ok": {
      -        "const": false
      -      }
      -    },
      -    "required": [
      -      "ok",
      -      "error",
      -      "meta"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "fingerprint": {
      +        "type": "string"
      +      },
      +      "jobs": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "elapsed_ms": {
      +              "type": "integer"
      +            },
      +            "expires_at": {
      +              "anyOf": [
      +                {
      +                  "type": "string"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ]
      +            },
      +            "job_id": {
      +              "type": "string"
      +            },
      +            "kind": {
      +              "type": "string"
      +            },
      +            "result_available": {
      +              "type": "boolean"
      +            },
      +            "result_ok": {
      +              "anyOf": [
      +                {
      +                  "type": "boolean"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ]
      +            },
      +            "started_at": {
      +              "type": "string"
      +            },
      +            "status": {
      +              "enum": [
      +                "running",
      +                "done",
      +                "failed",
      +                "cancelled",
      +                "timeout"
      +              ],
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "job_id",
      +            "kind",
      +            "status",
      +            "started_at",
      +            "elapsed_ms",
      +            "result_ok"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "ok": {
      +        "const": true,
      +        "type": "boolean"
      +      },
      +      "server_version": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "truncated": {
      +        "type": "boolean"
      +      },
      +      "truncation_hint": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "workspace": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "cwd": {
      +            "type": "string"
      +          },
      +          "workspace_source": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "workspace_warning": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          }
      +        },
      +        "required": [
      +          "cwd"
      +        ],
      +        "type": "object"
      +      }
      +    },
      +    "required": [
      +      "workspace"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "error": {
      +        "description": "Populated error envelope; full schema at resource codex://error-envelope",
      +        "type": "object"
      +      },
      +      "meta": {
      +        "type": "object"
      +      },
      +      "ok": {
      +        "const": false
      +      }
      +    },
      +    "required": [
      +      "ok",
      +      "error",
      +      "meta"
      +    ],
      +    "type": "object"
      +  }
      +]
  3. Changed1 schema field changedv0.11.0
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "fingerprint": {
      -        "type": "string"
      -      },
      -      "jobs": {
      -        "items": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "elapsed_ms": {
      -              "type": "integer"
      -            },
      -            "expires_at": {
      -              "anyOf": [
      -                {
      -                  "type": "string"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ]
      -            },
      -            "job_id": {
      -              "type": "string"
      -            },
      -            "kind": {
      -              "type": "string"
      -            },
      -            "result_available": {
      -              "type": "boolean"
      -            },
      -            "started_at": {
      -              "type": "string"
      -            },
      -            "status": {
      -              "enum": [
      -                "running",
      -                "done",
      -                "failed",
      -                "cancelled",
      -                "timeout"
      -              ],
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "job_id",
      -            "kind",
      -            "status",
      -            "started_at",
      -            "elapsed_ms"
      -          ],
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "ok": {
      -        "const": true,
      -        "type": "boolean"
      -      },
      -      "workspace": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "cwd": {
      -            "type": "string"
      -          },
      -          "workspace_source": {
      -            "anyOf": [
      -              {
      -                "type": "string"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "workspace_warning": {
      -            "anyOf": [
      -              {
      -                "type": "string"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          }
      -        },
      -        "required": [
      -          "cwd"
      -        ],
      -        "type": "object"
      -      }
      -    },
      -    "required": [
      -      "workspace"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "error": {
      -        "description": "Populated error envelope; full schema at resource codex://error-envelope",
      -        "type": "object"
      -      },
      -      "meta": {
      -        "type": "object"
      -      },
      -      "ok": {
      -        "const": false
      -      }
      -    },
      -    "required": [
      -      "ok",
      -      "error",
      -      "meta"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "fingerprint": {
      +        "type": "string"
      +      },
      +      "jobs": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "elapsed_ms": {
      +              "type": "integer"
      +            },
      +            "expires_at": {
      +              "anyOf": [
      +                {
      +                  "type": "string"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ]
      +            },
      +            "job_id": {
      +              "type": "string"
      +            },
      +            "kind": {
      +              "type": "string"
      +            },
      +            "result_available": {
      +              "type": "boolean"
      +            },
      +            "started_at": {
      +              "type": "string"
      +            },
      +            "status": {
      +              "enum": [
      +                "running",
      +                "done",
      +                "failed",
      +                "cancelled",
      +                "timeout"
      +              ],
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "job_id",
      +            "kind",
      +            "status",
      +            "started_at",
      +            "elapsed_ms"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "ok": {
      +        "const": true,
      +        "type": "boolean"
      +      },
      +      "server_version": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "workspace": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "cwd": {
      +            "type": "string"
      +          },
      +          "workspace_source": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "workspace_warning": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          }
      +        },
      +        "required": [
      +          "cwd"
      +        ],
      +        "type": "object"
      +      }
      +    },
      +    "required": [
      +      "workspace"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "error": {
      +        "description": "Populated error envelope; full schema at resource codex://error-envelope",
      +        "type": "object"
      +      },
      +      "meta": {
      +        "type": "object"
      +      },
      +      "ok": {
      +        "const": false
      +      }
      +    },
      +    "required": [
      +      "ok",
      +      "error",
      +      "meta"
      +    ],
      +    "type": "object"
      +  }
      +]
  4. Changed1 schema field changedv0.8.0
    • addedOutput schema / $schema
      Added value: +"https://json-schema.org/draft/2020-12/schema"
  5. First observedv0.5.0

TDQS

A4.3/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the readOnlyHint annotation, the description reveals the tool is free (no model call), describes retry/eviction behavior (TTL and cap), and notes workspace_root fallback with meta.workspace_warning. These details are not in annotations and add significant transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is verbose, with three paragraphs that repeat the same ideas (e.g., 'omit limit to get them all' appears multiple times). It could be condensed to two sentences without losing essential guidance, making it less efficient for agents to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the return fields (id, kind, status, start time, result_available, result_ok, expiry) and explains edge cases like eviction, workspace fallback, and the distinction between sync and async records. It is comprehensive but redundant in places, so not a perfect score.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already provides detailed descriptions for every parameter (limit, status, workspace_root), and the description largely repeats them without adding new meaning. It reinforces the default behavior but does not elevate understanding beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool lists background jobs, newest first, and distinguishes it from siblings like codex_job_status and codex_job_result by focusing on enumeration rather than individual job details.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly states the primary use case—recovering job_ids lost across context compaction or interruption—and clarifies that it is free (no model call). It also explains how limit and status work, giving practical guidance on when to omit or set them.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/briandconnelly/codex-in-claude'

If you have feedback or need assistance with the MCP directory API, please join our Discord server