> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/openai/codex-plugin-cc/llms.txt
> Use this file to discover all available pages before exploring further.

# /codex:rescue

> Delegate a bug investigation, fix request, or coding task to Codex.

Hand a task to Codex through the `codex:codex-rescue` subagent. Codex runs with write access by default, so it can investigate, propose fixes, and apply changes to your repository. Use this command when you want Codex to investigate a bug, try a fix, continue a previous task, or take a faster pass with a smaller model.

## Syntax

```
/codex:rescue [--background|--wait] [--resume|--fresh] [--model <model|spark>] [--effort <none|minimal|low|medium|high|xhigh>] [what Codex should investigate, solve, or continue]
```

## Flags

<ParamField path="--background" type="boolean">
  Run the task as a background job. Use `/codex:status` to check progress.
</ParamField>

<ParamField path="--wait" type="boolean">
  Run in the foreground and wait for Codex to finish before returning.
</ParamField>

<ParamField path="--resume" type="boolean">
  Continue the latest Codex task thread for this repository. Skips the resume prompt.
</ParamField>

<ParamField path="--fresh" type="boolean">
  Force a new thread even if a resumable one exists. Skips the resume prompt.
</ParamField>

<ParamField path="--model" type="string">
  Specify a model. Use `spark` as a shorthand for `gpt-5.3-codex-spark`. If omitted, Codex uses its own default.
</ParamField>

<ParamField path="--effort" type="string">
  Set the reasoning effort level. Accepted values: `none`, `minimal`, `low`, `medium`, `high`, `xhigh`. If omitted, Codex uses its own default.
</ParamField>

## Examples

```bash theme={null}
/codex:rescue investigate why the tests started failing
/codex:rescue fix the failing test with the smallest safe patch
/codex:rescue --resume apply the top fix from the last run
/codex:rescue --model gpt-5.4-mini --effort medium investigate the flaky integration test
/codex:rescue --model spark fix the issue quickly
/codex:rescue --background investigate the regression
```

## Natural language delegation

You can also describe the task conversationally rather than using the slash command directly:

```text theme={null}
Ask Codex to redesign the database connection to be more resilient.
```

Claude Code will route the request to Codex through the `codex:codex-rescue` subagent.

## Resume behavior

If you omit both `--resume` and `--fresh`, the plugin checks whether a resumable thread exists from the current Claude session:

* If a resumable thread is found, it asks once whether to continue the existing thread or start a new one.
* If your request sounds like a follow-up — for example, "continue", "keep going", "apply the top fix", or "dig deeper" — the plugin puts **Continue current Codex thread** as the recommended choice.
* Otherwise, **Start a new Codex thread** is recommended.
* If no resumable thread is found, the plugin starts a fresh run without asking.

<Note>
  Tasks using larger models or `xhigh` effort may run for a long time. For these, background mode is recommended. You can check progress with `/codex:status` and retrieve the output with `/codex:result`.
</Note>

## Related

For more on thread resumption and continuing prior Codex work, see [Resuming sessions](/guides/resuming-sessions).
