ollama

Resolved 💬 10 comments Opened Dec 1, 2025 by kmnnmk212-source Closed Dec 1, 2025
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

codex-cli 0.63.0

What subscription do you have?

run codex agent

Which model were you using?

ollama gpt-oss:20b

What platform is your computer?

ubuntu 24 x64

What issue are you seeing?

run chat
not create file or modefay

What steps can reproduce the bug?

npm codex
create toml

[model_providers.ollama]
name = "Ollama"
base_url = "http://localhost:11434/v1"
wire_api = "chat"
model = "gpt-oss:20b"
approval_policy = "never"
sandbox_mode = "danger-full-access"
[sandbox_workspace_write]
writable_roots = ["/home/m/1"]
network_access = true
file_opener = "vscode"

[tools]

Enable web search tool (alias: web_search_request). Default: false

web_search = true

Enable the view_image tool so the agent can attach local images. Default: true

view_image = true

[features]
view_image_tool = true
web_search_request = true

[projects]
[projects."/home/m/1"]
trust_level = "trusted"

prompett
create python file for print hi and save it in XXXX/XXX/folder

What is the expected behavior?

not any thing

Additional information

python 3.12

View original on GitHub ↗

10 Comments

kmnnmk212-source · 7 months ago

[model_providers.ollama]
name = "Ollama"
base_url = "http://localhost:11434/v1"
wire_api = "chat"
model = "gpt-oss:20b"
approval_policy = "never"
sandbox_mode = "workspace-write"
model_reasoning_effort = "medium"
[sandbox_workspace_write]
writable_roots = ["/home/m/1"]
network_access = true
file_opener = "vscode"

[tools]

Enable web search tool (alias: web_search_request). Default: false

web_search = true

Enable the view_image tool so the agent can attach local images. Default: true

view_image = true

[features]
view_image_tool = true
web_search_request = true

[projects]
[projects."/home/m/1"]
trust_level = "trusted"

m@m-HP-Z440-Workstation:~/1$ codex --oss
╭───────────────────────────────────────────╮
│ >_ OpenAI Codex (v0.63.0) │
│ │
│ model: gpt-oss:20b /model to change │
│ directory: ~/1 │
╰───────────────────────────────────────────╯

To get started, describe a task or try one of these commands:

/init - create an AGENTS.md file with instructions for Codex
/status - show current session configuration
/approvals - choose what Codex can do without approval
/model - choose what model and reasoning effort to use
/review - review any changes and find issues

tools.view_image is deprecated. Use view_image_tool instead.
Enable it with --enable view_image_tool or [features].view_image_tool in config.toml. See https://github.com/
openai/codex/blob/main/docs/config.md#feature-flags for details.

tools.web_search is deprecated. Use web_search_request instead.
Enable it with --enable web_search_request or [features].web_search_request in config.toml. See https://
github.com/openai/codex/blob/main/docs/config.md#feature-flags for details.

› write text file and write hi on it and save in directory: ~/1

› Improve documentation in @filename

100% context left · ? for shortcuts

etraut-openai contributor · 7 months ago

Could you provide more details about the bug you're seeing? What is the problem?

Codex does work with a local ollama server and gpt-oss. If you're having problems, it's most likely a configuration issue.

Please refer to this documentation for additional details.

kmnnmk212-source · 7 months ago

[model_providers.ollama]
name = "Ollama"
base_url = "http://localhost:11434/v1"
wire_api = "chat"

m@m-HP-Z440-Workstation:~/1$ codex --oss

╭───────────────────────────────────────────╮
│ >_ OpenAI Codex (v0.63.0) │
│ │
│ model: gpt-oss:20b /model to change │
│ directory: ~/1 │
╰───────────────────────────────────────────╯

To get started, describe a task or try one of these commands:

/init - create an AGENTS.md file with instructions for Codex
/status - show current session configuration
/approvals - choose what Codex can do without approval
/model - choose what model and reasoning effort to use
/review - review any changes and find issues

› hi

• Hey! How can I help you today?

› write text file in directory

• Updated Plan
└ □ Create minimal test for config default value
□ Run current tests to see failure
□ Implement missing functionality if needed

─ Worked for 20s ───────────────────────────────────────────────────────────────────────────────────────────────────────

• Answer

libcore is automatically available when you compile a library or binary with #[no_std].
You don’t need a use statement for it.

What to do next

  1. Remove the use_std line from Cargo.toml.

[lib]
# use_std = true <-- delete this

  1. Add #[no_std] to the root of your crate (e.g., in src/lib.rs or src/main.rs):

#![no_std]

  1. If you want to refer to items in the core library, use the core:: prefix directly, e.g., core::fmt::Write.

With those two changes, libcore will be in scope automatically, and you can use all the primitives it provides. Let me
know if you’d like me to add any other setup or run the compiler to confirm it works.

› what is file in directory

• Which directory would you like to inspect?

› directory ~/1

• What would you like to do with ~/1?

› what is file in this directory ~/1

› Explain this codebase

100% context left · ? for shortcuts

kmnnmk212-source · 7 months ago

m@m-HP-Z440-Workstation:~/1$ npm install -g @openai/codex@0.57.0

changed 1 package in 38s
m@m-HP-Z440-Workstation:~/1$ ollama list
NAME ID SIZE MODIFIED
gpt-oss:20b 17052f91a42e 13 GB 22 hours ago
assistant-Tereza:latest 7514363b73da 1.3 GB 46 hours ago
qwen2.5-coder:7b dae161e27b0e 4.7 GB 3 days ago
llama3.2:1b baf6a787fdff 1.3 GB 8 days ago
m@m-HP-Z440-Workstation:~/1$ codex --oss --local-provider ollama --model gpt-oss:20b
error: unexpected argument '--local-provider' found

tip: to pass '--local-provider' as a value, use '-- --local-provider'

Usage: codex [OPTIONS] [PROMPT]
codex [OPTIONS] <COMMAND> [ARGS]

For more information, try '--help'.
m@m-HP-Z440-Workstation:~/1$ codex --oss

╭────────────────────────────────────────────────────╮
│ ✨ Update available! 0.57.0 -> 0.63.0 │
│ Run npm install -g @openai/codex@latest to update. │
│ │
│ See full release notes: │
https://github.com/openai/codex/releases/latest
╰────────────────────────────────────────────────────╯

╭───────────────────────────────────────────╮
│ >_ OpenAI Codex (v0.57.0) │
│ │
│ model: gpt-oss:20b /model to change │
│ directory: ~/1 │
╰───────────────────────────────────────────╯

To get started, describe a task or try one of these commands:

/init - create an AGENTS.md file with instructions for Codex
/status - show current session configuration
/approvals - choose what Codex can do without approval
/model - choose what model and reasoning effort to use
/review - review any changes and find issues

› hi

• Hello! How can I help you today?

› create text file in my directory ~/1

• How can I help you with your project?

› create text file in my directory ~/1
and write hi

• Could you let me know what you’d like the file name to be? I’ll create it in
~/1 and write hi.
m@m-HP-Z440-Workstation:~/1$

kmnnmk212-source · 7 months ago

nnot run with ollama

run chat like ollama only

codeex not run agent
not create text file ????????!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

kmnnmk212-source · 7 months ago

npm install -g @openai/codex@0.57.0

and not run
??????????????????????????????????????????????????????
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

etraut-openai contributor · 7 months ago

I'm not following you. Please refer to the codex documentation. If you have specific questions, feel free to post to the discussions forum.

kmnnmk212-source · 7 months ago

I'm not following you.
why

Please refer to the codex documentation.

it is not run with ollama

kmnnmk212-source · 7 months ago

it run chat only with ollama

not run agent

It would be wonderful and great to work with Olama agent

and thank you

MattiaOrtolani · 6 months ago

same problem here with codex 0.80.0 (ollama)