Skip to content

[CLI] All tools become unavailable after resuming a pre-upgrade session; /model restores them #41265

Description

@leo9344

What version of Codex CLI is running?

0.149.0 and 0.149.1

What subscription do you have?

Plus

Which model were you using?

gpt-5.6-sol

What platform is your computer?

Linux x86_64

What terminal emulator and version are you using (if applicable)?

No response

Codex doctor report

What issue are you seeing?

After upgrading Codex CLI from 0.149.0 to 0.149.1, resuming an existing session created before the upgrade can result in all tools becoming unavailable.

This includes:

  • shell / command execution
  • filesystem reading/editing
  • patch/application tools
  • web search
  • other normally available tools

The model may respond with messages such as:

I’m unable to apply the changes because filesystem execution/editing tools are still unavailable in this session. No files have been modified. Please start a new coding session with workspace tools enabled; the current session cannot perform repository edits.

This is not only a filesystem or sandbox issue. Web search is unavailable as well.

A completely new Codex session created after the upgrade works normally with the same installation and configuration.

I am also using a custom Responses-compatible endpoint/model provider configuration.

The interesting part is that I found a reliable workaround:

  1. Run /model.
  2. Switch from the current model to another model.
  3. Switch back to the original model.

After doing this, all tools immediately become available again, including filesystem editing, shell execution, and web search.

For example:

0.149.0 + existing gpt-5.6-sol session
    -> tools work

upgrade to 0.149.1

0.149.1 + resume same session/model
    -> all tools unavailable

new 0.149.1 session
    -> tools work

/model: gpt-5.6-sol -> gpt-5.6-terra
    -> tools immediately work

/model: gpt-5.6-terra -> gpt-5.6-sol
    -> tools continue to work

Changing sandbox settings, including workspace-write, did not restore the tools.

In at least some affected sessions, /status also does not show the normal Sandbox: entry.

I have also observed that using /fork from an affected old session can preserve the same tool-less state.

What steps can reproduce the bug?

Environment used in my reproduction:

Codex CLI before upgrade: 0.149.0
Codex CLI after upgrade:  0.149.1

Affected model: gpt-5.6-sol
Control model:  gpt-5.6-terra

Platform: Linux x86_64
Endpoint: custom Responses-compatible endpoint

Steps:

  1. Install/run Codex CLI 0.149.0.

  2. Start a new session using gpt-5.6-sol through the custom endpoint.

  3. Verify that normal tools are available, for example:

    • run a shell command;
    • edit/read a repository file;
    • use web search.
  4. Exit the Codex session normally.

  5. Upgrade Codex CLI from 0.149.0 to 0.149.1.

  6. Resume the old session:

    codex resume <session-id>
  7. Ask Codex to perform a task that requires a tool, such as:

    • run pwd;
    • modify a file;
    • search the web.
  8. Observe that no tool call is made and Codex reports that the tools are unavailable.

  9. Run /status.

    In the affected session, the normal Sandbox: entry may also be absent.

  10. Try changing sandbox configuration, including workspace-write.

  11. Observe that this does not restore tool use.

  12. Start a completely new session with Codex CLI 0.149.1.

  13. Observe that shell/filesystem/web tools work normally in the new session.

  14. Return to the broken resumed session.

  15. Run:

/model
  1. Switch from:
gpt-5.6-sol

to:

gpt-5.6-terra
  1. Repeat the tool-requiring task.

  2. Observe that tools work immediately.

  3. Run /model again and switch back to:

gpt-5.6-sol
  1. Repeat the same tool-requiring task.

  2. Observe that tools continue to work on the original model.

I have also seen the affected state carry over when forking from the old session.

What is the expected behavior?

Resuming or forking a session created by an older Codex CLI version should initialize the current runtime and current tool configuration correctly.

The current session should have the same expected tool surface as a newly created session using the same CLI version, model, endpoint, and configuration.

A user should not need to perform an artificial model switch in order to restore:

  • filesystem tools
  • shell execution
  • editing tools
  • web search
  • other model-visible tools

If the current Codex version has changed model instructions, tool definitions, schemas, or runtime metadata since the session was originally created, the resume path should refresh or rebuild that state automatically.

Additional information

The /model workaround makes me suspect that this is related to model/runtime/tool state rehydration during resume, rather than the tools themselves being broken.

The most important observation is:

same original model restored through resume
    -> tools unavailable

same original model reached after /model switch
    -> tools available

This suggests that the original model itself is capable of using the tools, but the resumed session may not be receiving or rebuilding the same runtime/tool context as a fresh session.

One possible root-cause hypothesis is that persisted model state is considered unchanged when the model slug is unchanged, even though the newer CLI may have changed:

  • generated model/developer instructions;
  • model-visible tool definitions;
  • tool schemas;
  • tool-selection/runtime metadata.

If no refresh is emitted during resume, the model may continue with stale or incomplete historical runtime context.

A real /model transition appears to force enough model/runtime state to be refreshed that the tools become usable again.

This is only a hypothesis; I have not confirmed the exact internal state that /model refreshes.

Possible fix direction

On the first turn after resuming or forking a non-empty history, Codex could verify that persisted runtime/model state is compatible with the current CLI runtime.

If model-visible runtime state has changed, Codex could force a bounded refresh or rebuild of the current model/tool context.

For example, compatibility could take into account more than only the model slug, such as:

model slug
+ model instruction version/digest
+ model-visible tool specification version/digest

The important behavior is that upgrading Codex should not leave a resumed thread with stale tool/runtime context merely because the model name itself has not changed.

Endpoint URLs, credentials, session identifiers, and request contents have been removed from this report.

Related issues

I would not assume these necessarily have the exact same root cause, but they appear to involve the same general area: persisted or implicitly resolved model state affecting the model-visible tool surface.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Codex CLIbugSomething isn't workingcustom-modelIssues related to custom model providers (including local models)sessionIssues involving session (thread) management, resuming, forking, naming, archivingtool-callsIssues related to tool calling

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions