Can't create AGENTS.md with /init #2085

Closed
opened 2026-02-16 17:34:05 -05:00 by yindo · 17 comments
Owner

Originally created by @somera on GitHub (Oct 13, 2025).

Originally assigned to: @rekram1-node on GitHub.

Hi,

I installed

$ opencode -v
0.15.0

on Windows 11 with scoop. And I run it with Ollama

{
  "$schema": "https://opencode.ai/config.json",
  "permission": {
    "edit": "ask",
    "bash": "ask"
  },
  "provider": {
    "ollama": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Ollama (local)",
      "options": {
        "baseURL": "http://localhost:11434/v1"
      },
      "models": {
        "qwen2.5-coder:7b-instruct-q6_K": {
          "name": "Qwen2.5 Coder 7B (local)",
		  "tools": true,
		  "options": { "num_ctx": 12288 }
        },
		"qwen2.5-coder:14b-instruct-q6_K": {
          "name": "Qwen2.5 Coder 14B (local)",
		  "tools": true,
		  "options": { "num_ctx": 8192 }
        }
      }
    }
  },
  "model": "ollama/qwen2.5-coder:7b-instruct-q6_K"
}

I followed this https://opencode.ai/docs/#initialize but after /init I don't see AGENTS.md.

Image
Originally created by @somera on GitHub (Oct 13, 2025). Originally assigned to: @rekram1-node on GitHub. Hi, I installed ``` $ opencode -v 0.15.0 ``` on Windows 11 with scoop. And I run it with Ollama ``` { "$schema": "https://opencode.ai/config.json", "permission": { "edit": "ask", "bash": "ask" }, "provider": { "ollama": { "npm": "@ai-sdk/openai-compatible", "name": "Ollama (local)", "options": { "baseURL": "http://localhost:11434/v1" }, "models": { "qwen2.5-coder:7b-instruct-q6_K": { "name": "Qwen2.5 Coder 7B (local)", "tools": true, "options": { "num_ctx": 12288 } }, "qwen2.5-coder:14b-instruct-q6_K": { "name": "Qwen2.5 Coder 14B (local)", "tools": true, "options": { "num_ctx": 8192 } } } } }, "model": "ollama/qwen2.5-coder:7b-instruct-q6_K" } ``` I followed this https://opencode.ai/docs/#initialize but after `/init` I don't see `AGENTS.md`. <img width="1496" height="746" alt="Image" src="https://github.com/user-attachments/assets/fd4d5c7c-8343-4580-9c1d-1782ead4bd74" />
yindo closed this issue 2026-02-16 17:34:05 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Oct 13, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #2269: User experiencing similar problems with /init command not working on Windows/macOS, showing "can't init my project" errors
  • #3142: Windows 11 user reporting "/init" command does nothing and shows "Failed to send message" errors when attempting any prompts
  • #1120: User reports AI doesn't respond and stays at "working" state, which could be related to the missing AGENTS.md creation
  • #851: Reports being "Stuck on working forever" which might be the same underlying issue preventing /init from completing

The common thread appears to be /init command failures on Windows systems, particularly with local providers like Ollama. Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Oct 13, 2025): This issue might be a duplicate of existing issues. Please check: - #2269: User experiencing similar problems with /init command not working on Windows/macOS, showing "can't init my project" errors - #3142: Windows 11 user reporting "/init" command does nothing and shows "Failed to send message" errors when attempting any prompts - #1120: User reports AI doesn't respond and stays at "working" state, which could be related to the missing AGENTS.md creation - #851: Reports being "Stuck on working forever" which might be the same underlying issue preventing /init from completing The common thread appears to be /init command failures on Windows systems, particularly with local providers like Ollama. Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Oct 13, 2025):

@somera so this is the model failing to call tools correctly, when you setup ollama did you set num_ctx?

My general advice is to try increasing num_ctx in Ollama. Start around 16k - 32k.

I added this to docs but Ig they weren't published yet

@rekram1-node commented on GitHub (Oct 13, 2025): @somera so this is the model failing to call tools correctly, when you setup ollama did you set `num_ctx`? My general advice is to try increasing `num_ctx` in Ollama. Start around 16k - 32k. I added this to docs but Ig they weren't published yet
Author
Owner

@somera commented on GitHub (Oct 13, 2025):

@rekram1-node thi, I will try it later.

Now I'm testing it with other Windows 11 system, ollama and qwen3-coder:30b and gtp-oss:20b.

Curl is working fine:

$ curl http://10.53.200.243:11434/v1/chat/completions     -H "Content-Type: application/json"     -d '{
        "model": "qwen3-coder:30b",
        "messages": [
            {
                "role": "system",
                "content": "You are a helpful assistant."
            },
            {
                "role": "user",
                "content": "Hello!"
            }
        ]
    }'
{"id":"chatcmpl-921","object":"chat.completion","created":1760383926,"model":"qwen3-coder:30b","system_fingerprint":"fp_ollama","choices":[{"index":0,"message":{"role":"assistant","content":"Hello! How can I help you today?"},"finish_reason":"stop"}],"usage":{"prompt_tokens":21,"completion_tokens":10,"total_tokens":31}}

But opencode can't communicate with ollama backend. I don't see nothing in tui and log. No errors. I started it with opencode --log-level DEBUG:

INFO  2025-10-13T19:29:52 +74575ms service=server method=POST path=/session request
INFO  2025-10-13T19:29:52 +4ms service=session id=ses_620f309ecffeODWceF87weZNIX version=0.15.0 projectID=global directory=C:\repos\_ai\tic_tac_toe_aged3 title=New session - 2025-10-13T19:29:52.659Z time={"created":1760383792659,"updated":1760383792659} created
INFO  2025-10-13T19:29:52 +1ms service=bus type=session.updated publishing
INFO  2025-10-13T19:29:52 +1ms service=server duration=6 response
INFO  2025-10-13T19:29:52 +1ms service=server method=POST path=/session/ses_620f309ecffeODWceF87weZNIX/init request
INFO  2025-10-13T19:29:52 +0ms service=session.prompt session=ses_620f309ecffeODWceF87weZNIX prompt
INFO  2025-10-13T19:29:52 +2ms service=bus type=message.updated publishing
DEBUG 2025-10-13T19:29:52 +9ms service=tui timeTakenMs=0 messages.renderView
DEBUG 2025-10-13T19:29:52 +1ms service=tui timeTakenMs=0 messages.renderView
INFO  2025-10-13T19:29:52 +0ms service=bus type=message.part.updated publishing
DEBUG 2025-10-13T19:29:52 +1ms service=tui message=msg_9df0cf616001g81EYLXC6FbEcv part=prt_9df0cf6160016qPkK26EWleWwN message part updated
INFO  2025-10-13T19:29:52 +1ms service=bus type=session.updated publishing
INFO  2025-10-13T19:29:52 +1ms service=provider providerID=ollama modelID=qwen3-coder:30b getModel
INFO  2025-10-13T19:29:52 +0ms service=provider status=started providerID=ollama getSDK
DEBUG 2025-10-13T19:29:52 +0ms service=tui timeTakenMs=0 messages.renderView
INFO  2025-10-13T19:29:52 +1ms service=bun pkg=@ai-sdk/openai-compatible version=latest installing package using Bun's default registry resolution
INFO  2025-10-13T19:29:52 +0ms service=bun cmd=["C:\\Users\\user\\scoop\\apps\\opencode\\0.15.0\\opencode.exe","add","--force","--exact","--cwd","C:\\Users\\user\\.cache\\opencode","@ai-sdk/openai-compatible@latest"] cwd=C:\Users\user\.cache\opencode running
DEBUG 2025-10-13T19:29:52 +9ms service=tui timeTakenMs=0 messages.renderView
INFO  2025-10-13T19:29:55 +2817ms service=tui offset=0 x=27 y=46 mouse
INFO  2025-10-13T19:29:55 +1ms service=tui end=-1,-1 start=27,46 mouse selection
DEBUG 2025-10-13T19:29:55 +0ms service=tui timeTakenMs=0 messages.renderView
DEBUG 2025-10-13T19:29:55 +153ms service=tui timeTakenMs=0 messages.renderView

This is an enviroment with an proxy. And http_proxy, https_proxy are set.

And this is my opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "permission": {
    "edit": "ask",
    "bash": "ask"
  },
  "theme": "gruvbox",
  "provider": {
    "ollama": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Ollama",
      "options": {
        "baseURL": "http://10.53.200.243:11434/v1"
      },
      "models": {
        "gpt-oss:20b": {
          "name": "GPT-OSS 20B",
		  "tools": true,
		  "options": { "num_ctx": 16384 }
        },
		"qwen3-coder:30b": {
          "name": "Qwen3-Coder 30B",
		  "tools": true,
		  "options": { "num_ctx": 16384 }
        }
      }
    }
  },
  "model": "ollama/qwen3-coder:30b"
}
@somera commented on GitHub (Oct 13, 2025): @rekram1-node thi, I will try it later. Now I'm testing it with other Windows 11 system, ollama and `qwen3-coder:30b` and `gtp-oss:20b`. Curl is working fine: ``` $ curl http://10.53.200.243:11434/v1/chat/completions -H "Content-Type: application/json" -d '{ "model": "qwen3-coder:30b", "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "Hello!" } ] }' {"id":"chatcmpl-921","object":"chat.completion","created":1760383926,"model":"qwen3-coder:30b","system_fingerprint":"fp_ollama","choices":[{"index":0,"message":{"role":"assistant","content":"Hello! How can I help you today?"},"finish_reason":"stop"}],"usage":{"prompt_tokens":21,"completion_tokens":10,"total_tokens":31}} ``` But opencode can't communicate with ollama backend. I don't see nothing in tui and log. No errors. I started it with `opencode --log-level DEBUG`: ``` INFO 2025-10-13T19:29:52 +74575ms service=server method=POST path=/session request INFO 2025-10-13T19:29:52 +4ms service=session id=ses_620f309ecffeODWceF87weZNIX version=0.15.0 projectID=global directory=C:\repos\_ai\tic_tac_toe_aged3 title=New session - 2025-10-13T19:29:52.659Z time={"created":1760383792659,"updated":1760383792659} created INFO 2025-10-13T19:29:52 +1ms service=bus type=session.updated publishing INFO 2025-10-13T19:29:52 +1ms service=server duration=6 response INFO 2025-10-13T19:29:52 +1ms service=server method=POST path=/session/ses_620f309ecffeODWceF87weZNIX/init request INFO 2025-10-13T19:29:52 +0ms service=session.prompt session=ses_620f309ecffeODWceF87weZNIX prompt INFO 2025-10-13T19:29:52 +2ms service=bus type=message.updated publishing DEBUG 2025-10-13T19:29:52 +9ms service=tui timeTakenMs=0 messages.renderView DEBUG 2025-10-13T19:29:52 +1ms service=tui timeTakenMs=0 messages.renderView INFO 2025-10-13T19:29:52 +0ms service=bus type=message.part.updated publishing DEBUG 2025-10-13T19:29:52 +1ms service=tui message=msg_9df0cf616001g81EYLXC6FbEcv part=prt_9df0cf6160016qPkK26EWleWwN message part updated INFO 2025-10-13T19:29:52 +1ms service=bus type=session.updated publishing INFO 2025-10-13T19:29:52 +1ms service=provider providerID=ollama modelID=qwen3-coder:30b getModel INFO 2025-10-13T19:29:52 +0ms service=provider status=started providerID=ollama getSDK DEBUG 2025-10-13T19:29:52 +0ms service=tui timeTakenMs=0 messages.renderView INFO 2025-10-13T19:29:52 +1ms service=bun pkg=@ai-sdk/openai-compatible version=latest installing package using Bun's default registry resolution INFO 2025-10-13T19:29:52 +0ms service=bun cmd=["C:\\Users\\user\\scoop\\apps\\opencode\\0.15.0\\opencode.exe","add","--force","--exact","--cwd","C:\\Users\\user\\.cache\\opencode","@ai-sdk/openai-compatible@latest"] cwd=C:\Users\user\.cache\opencode running DEBUG 2025-10-13T19:29:52 +9ms service=tui timeTakenMs=0 messages.renderView INFO 2025-10-13T19:29:55 +2817ms service=tui offset=0 x=27 y=46 mouse INFO 2025-10-13T19:29:55 +1ms service=tui end=-1,-1 start=27,46 mouse selection DEBUG 2025-10-13T19:29:55 +0ms service=tui timeTakenMs=0 messages.renderView DEBUG 2025-10-13T19:29:55 +153ms service=tui timeTakenMs=0 messages.renderView ``` This is an enviroment with an proxy. And http_proxy, https_proxy are set. And this is my `opencode.json`: ``` { "$schema": "https://opencode.ai/config.json", "permission": { "edit": "ask", "bash": "ask" }, "theme": "gruvbox", "provider": { "ollama": { "npm": "@ai-sdk/openai-compatible", "name": "Ollama", "options": { "baseURL": "http://10.53.200.243:11434/v1" }, "models": { "gpt-oss:20b": { "name": "GPT-OSS 20B", "tools": true, "options": { "num_ctx": 16384 } }, "qwen3-coder:30b": { "name": "Qwen3-Coder 30B", "tools": true, "options": { "num_ctx": 16384 } } } } }, "model": "ollama/qwen3-coder:30b" } ```
Author
Owner

@somera commented on GitHub (Oct 13, 2025):

@somera so this is the model failing to call tools correctly, when you setup ollama did you set num_ctx?

My general advice is to try increasing num_ctx in Ollama. Start around 16k - 32k.

I added this to docs but Ig they weren't published yet

The model I'm using, supports:

$ ollama show qwen2.5-coder:14b-instruct-q6_K
  Model
    architecture        qwen2
    parameters          14.8B
    context length      32768
    embedding length    5120
    quantization        Q6_K

This OLLAMA_CONTEXT_LENGTH=16384 OLLAMA_HOST=0.0.0.0 ollama serve is not helping.

If num_ctx should be high, than I can forgot it with ollama, cause my GPU has only 16GB VRAM.

@somera commented on GitHub (Oct 13, 2025): > [@somera](https://github.com/somera) so this is the model failing to call tools correctly, when you setup ollama did you set `num_ctx`? > > My general advice is to try increasing `num_ctx` in Ollama. Start around 16k - 32k. > > I added this to docs but Ig they weren't published yet The model I'm using, supports: ``` $ ollama show qwen2.5-coder:14b-instruct-q6_K Model architecture qwen2 parameters 14.8B context length 32768 embedding length 5120 quantization Q6_K ``` This `OLLAMA_CONTEXT_LENGTH=16384 OLLAMA_HOST=0.0.0.0 ollama serve` is not helping. If `num_ctx` should be high, than I can forgot it with ollama, cause my GPU has only 16GB VRAM.
Author
Owner

@somera commented on GitHub (Oct 13, 2025):

OK, next try with mistral:7b-instruct. Now I get real reponse:

Image

but I don's see AGENT.md in the project directory. Why?

@somera commented on GitHub (Oct 13, 2025): OK, next try with `mistral:7b-instruct`. Now I get real reponse: <img width="1493" height="895" alt="Image" src="https://github.com/user-attachments/assets/b9697324-79af-46e4-af61-d0d20f42de14" /> but I don's see `AGENT.md` in the project directory. Why?
Author
Owner

@rekram1-node commented on GitHub (Oct 13, 2025):

That's because the model is lying

When you work with these really small models on ollama and you don't adjust the num context I am pretty sure the tools aren't even introduced into their context so they can't take any actions << That's handled at the ollama level to opencode this is just any other model

@rekram1-node commented on GitHub (Oct 13, 2025): That's because the model is lying When you work with these really small models on ollama and you don't adjust the num context I am pretty sure the tools aren't even introduced into their context so they can't take any actions << That's handled at the ollama level to opencode this is just any other model
Author
Owner

@somera commented on GitHub (Oct 13, 2025):

@rekram1-node I understand.

But I set num_ctx in opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "permission": {
    "edit": "ask",
    "bash": "ask"
  },
  "provider": {
    "ollama": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Ollama (local)",
      "options": {
        "baseURL": "http://localhost:11434/v1"
      },
      "models": {
        "qwen2.5-coder:7b-instruct-q6_K": {
          "name": "Qwen2.5 Coder 7B (local)",
		  "tools": true,
		  "options": { "num_ctx": 12288 }
        },
		"qwen2.5-coder:14b-instruct-q6_K": {
          "name": "Qwen2.5 Coder 14B (local)",
		  "tools": true,
		  "options": { "num_ctx": 8192 }
        }
      }
    }
  },
  "model": "ollama/qwen2.5-coder:7b-instruct-q6_K"
}

will this be used?

But as I see, I can for got it with only 16GB VRAM.

And I can set it on start OLLAMA_CONTEXT_LENGTH=16384 OLLAMA_HOST=0.0.0.0 ollama serve.

@somera commented on GitHub (Oct 13, 2025): @rekram1-node I understand. But I set `num_ctx` in `opencode.json`: ``` { "$schema": "https://opencode.ai/config.json", "permission": { "edit": "ask", "bash": "ask" }, "provider": { "ollama": { "npm": "@ai-sdk/openai-compatible", "name": "Ollama (local)", "options": { "baseURL": "http://localhost:11434/v1" }, "models": { "qwen2.5-coder:7b-instruct-q6_K": { "name": "Qwen2.5 Coder 7B (local)", "tools": true, "options": { "num_ctx": 12288 } }, "qwen2.5-coder:14b-instruct-q6_K": { "name": "Qwen2.5 Coder 14B (local)", "tools": true, "options": { "num_ctx": 8192 } } } } }, "model": "ollama/qwen2.5-coder:7b-instruct-q6_K" } ``` will this be used? But as I see, I can for got it with only 16GB VRAM. And I can set it on start `OLLAMA_CONTEXT_LENGTH=16384 OLLAMA_HOST=0.0.0.0 ollama serve`.
Author
Owner

@somera commented on GitHub (Oct 13, 2025):

@rekram1-node thi, I will try it later.

Now I'm testing it with other Windows 11 system, ollama and qwen3-coder:30b and gtp-oss:20b.

Curl is working fine:

$ curl http://10.53.200.243:11434/v1/chat/completions     -H "Content-Type: application/json"     -d '{
        "model": "qwen3-coder:30b",
        "messages": [
            {
                "role": "system",
                "content": "You are a helpful assistant."
            },
            {
                "role": "user",
                "content": "Hello!"
            }
        ]
    }'
{"id":"chatcmpl-921","object":"chat.completion","created":1760383926,"model":"qwen3-coder:30b","system_fingerprint":"fp_ollama","choices":[{"index":0,"message":{"role":"assistant","content":"Hello! How can I help you today?"},"finish_reason":"stop"}],"usage":{"prompt_tokens":21,"completion_tokens":10,"total_tokens":31}}

But opencode can't communicate with ollama backend. I don't see nothing in tui and log. No errors. I started it with opencode --log-level DEBUG:

INFO  2025-10-13T19:29:52 +74575ms service=server method=POST path=/session request
INFO  2025-10-13T19:29:52 +4ms service=session id=ses_620f309ecffeODWceF87weZNIX version=0.15.0 projectID=global directory=C:\repos\_ai\tic_tac_toe_aged3 title=New session - 2025-10-13T19:29:52.659Z time={"created":1760383792659,"updated":1760383792659} created
INFO  2025-10-13T19:29:52 +1ms service=bus type=session.updated publishing
INFO  2025-10-13T19:29:52 +1ms service=server duration=6 response
INFO  2025-10-13T19:29:52 +1ms service=server method=POST path=/session/ses_620f309ecffeODWceF87weZNIX/init request
INFO  2025-10-13T19:29:52 +0ms service=session.prompt session=ses_620f309ecffeODWceF87weZNIX prompt
INFO  2025-10-13T19:29:52 +2ms service=bus type=message.updated publishing
DEBUG 2025-10-13T19:29:52 +9ms service=tui timeTakenMs=0 messages.renderView
DEBUG 2025-10-13T19:29:52 +1ms service=tui timeTakenMs=0 messages.renderView
INFO  2025-10-13T19:29:52 +0ms service=bus type=message.part.updated publishing
DEBUG 2025-10-13T19:29:52 +1ms service=tui message=msg_9df0cf616001g81EYLXC6FbEcv part=prt_9df0cf6160016qPkK26EWleWwN message part updated
INFO  2025-10-13T19:29:52 +1ms service=bus type=session.updated publishing
INFO  2025-10-13T19:29:52 +1ms service=provider providerID=ollama modelID=qwen3-coder:30b getModel
INFO  2025-10-13T19:29:52 +0ms service=provider status=started providerID=ollama getSDK
DEBUG 2025-10-13T19:29:52 +0ms service=tui timeTakenMs=0 messages.renderView
INFO  2025-10-13T19:29:52 +1ms service=bun pkg=@ai-sdk/openai-compatible version=latest installing package using Bun's default registry resolution
INFO  2025-10-13T19:29:52 +0ms service=bun cmd=["C:\\Users\\user\\scoop\\apps\\opencode\\0.15.0\\opencode.exe","add","--force","--exact","--cwd","C:\\Users\\user\\.cache\\opencode","@ai-sdk/openai-compatible@latest"] cwd=C:\Users\user\.cache\opencode running
DEBUG 2025-10-13T19:29:52 +9ms service=tui timeTakenMs=0 messages.renderView
INFO  2025-10-13T19:29:55 +2817ms service=tui offset=0 x=27 y=46 mouse
INFO  2025-10-13T19:29:55 +1ms service=tui end=-1,-1 start=27,46 mouse selection
DEBUG 2025-10-13T19:29:55 +0ms service=tui timeTakenMs=0 messages.renderView
DEBUG 2025-10-13T19:29:55 +153ms service=tui timeTakenMs=0 messages.renderView

This is an enviroment with an proxy. And http_proxy, https_proxy are set.

And this is my opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "permission": {
    "edit": "ask",
    "bash": "ask"
  },
  "theme": "gruvbox",
  "provider": {
    "ollama": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Ollama",
      "options": {
        "baseURL": "http://10.53.200.243:11434/v1"
      },
      "models": {
        "gpt-oss:20b": {
          "name": "GPT-OSS 20B",
		  "tools": true,
		  "options": { "num_ctx": 16384 }
        },
		"qwen3-coder:30b": {
          "name": "Qwen3-Coder 30B",
		  "tools": true,
		  "options": { "num_ctx": 16384 }
        }
      }
    }
  },
  "model": "ollama/qwen3-coder:30b"
}

@rekram1-node any idea here?

@somera commented on GitHub (Oct 13, 2025): > [@rekram1-node](https://github.com/rekram1-node) thi, I will try it later. > > Now I'm testing it with other Windows 11 system, ollama and `qwen3-coder:30b` and `gtp-oss:20b`. > > Curl is working fine: > > ``` > $ curl http://10.53.200.243:11434/v1/chat/completions -H "Content-Type: application/json" -d '{ > "model": "qwen3-coder:30b", > "messages": [ > { > "role": "system", > "content": "You are a helpful assistant." > }, > { > "role": "user", > "content": "Hello!" > } > ] > }' > {"id":"chatcmpl-921","object":"chat.completion","created":1760383926,"model":"qwen3-coder:30b","system_fingerprint":"fp_ollama","choices":[{"index":0,"message":{"role":"assistant","content":"Hello! How can I help you today?"},"finish_reason":"stop"}],"usage":{"prompt_tokens":21,"completion_tokens":10,"total_tokens":31}} > ``` > > But opencode can't communicate with ollama backend. I don't see nothing in tui and log. No errors. I started it with `opencode --log-level DEBUG`: > > ``` > INFO 2025-10-13T19:29:52 +74575ms service=server method=POST path=/session request > INFO 2025-10-13T19:29:52 +4ms service=session id=ses_620f309ecffeODWceF87weZNIX version=0.15.0 projectID=global directory=C:\repos\_ai\tic_tac_toe_aged3 title=New session - 2025-10-13T19:29:52.659Z time={"created":1760383792659,"updated":1760383792659} created > INFO 2025-10-13T19:29:52 +1ms service=bus type=session.updated publishing > INFO 2025-10-13T19:29:52 +1ms service=server duration=6 response > INFO 2025-10-13T19:29:52 +1ms service=server method=POST path=/session/ses_620f309ecffeODWceF87weZNIX/init request > INFO 2025-10-13T19:29:52 +0ms service=session.prompt session=ses_620f309ecffeODWceF87weZNIX prompt > INFO 2025-10-13T19:29:52 +2ms service=bus type=message.updated publishing > DEBUG 2025-10-13T19:29:52 +9ms service=tui timeTakenMs=0 messages.renderView > DEBUG 2025-10-13T19:29:52 +1ms service=tui timeTakenMs=0 messages.renderView > INFO 2025-10-13T19:29:52 +0ms service=bus type=message.part.updated publishing > DEBUG 2025-10-13T19:29:52 +1ms service=tui message=msg_9df0cf616001g81EYLXC6FbEcv part=prt_9df0cf6160016qPkK26EWleWwN message part updated > INFO 2025-10-13T19:29:52 +1ms service=bus type=session.updated publishing > INFO 2025-10-13T19:29:52 +1ms service=provider providerID=ollama modelID=qwen3-coder:30b getModel > INFO 2025-10-13T19:29:52 +0ms service=provider status=started providerID=ollama getSDK > DEBUG 2025-10-13T19:29:52 +0ms service=tui timeTakenMs=0 messages.renderView > INFO 2025-10-13T19:29:52 +1ms service=bun pkg=@ai-sdk/openai-compatible version=latest installing package using Bun's default registry resolution > INFO 2025-10-13T19:29:52 +0ms service=bun cmd=["C:\\Users\\user\\scoop\\apps\\opencode\\0.15.0\\opencode.exe","add","--force","--exact","--cwd","C:\\Users\\user\\.cache\\opencode","@ai-sdk/openai-compatible@latest"] cwd=C:\Users\user\.cache\opencode running > DEBUG 2025-10-13T19:29:52 +9ms service=tui timeTakenMs=0 messages.renderView > INFO 2025-10-13T19:29:55 +2817ms service=tui offset=0 x=27 y=46 mouse > INFO 2025-10-13T19:29:55 +1ms service=tui end=-1,-1 start=27,46 mouse selection > DEBUG 2025-10-13T19:29:55 +0ms service=tui timeTakenMs=0 messages.renderView > DEBUG 2025-10-13T19:29:55 +153ms service=tui timeTakenMs=0 messages.renderView > ``` > > This is an enviroment with an proxy. And http_proxy, https_proxy are set. > > And this is my `opencode.json`: > > ``` > { > "$schema": "https://opencode.ai/config.json", > "permission": { > "edit": "ask", > "bash": "ask" > }, > "theme": "gruvbox", > "provider": { > "ollama": { > "npm": "@ai-sdk/openai-compatible", > "name": "Ollama", > "options": { > "baseURL": "http://10.53.200.243:11434/v1" > }, > "models": { > "gpt-oss:20b": { > "name": "GPT-OSS 20B", > "tools": true, > "options": { "num_ctx": 16384 } > }, > "qwen3-coder:30b": { > "name": "Qwen3-Coder 30B", > "tools": true, > "options": { "num_ctx": 16384 } > } > } > } > }, > "model": "ollama/qwen3-coder:30b" > } > ``` @rekram1-node any idea here?
Author
Owner

@rekram1-node commented on GitHub (Oct 13, 2025):

@somera num_ctx needs to be set in ollama, not opencode,

I do think this is the equivalent tho:

And I can set it on start OLLAMA_CONTEXT_LENGTH=16384 OLLAMA_HOST=0.0.0.0 ollama serve.

@rekram1-node commented on GitHub (Oct 13, 2025): @somera num_ctx needs to be set in ollama, not opencode, I do think this is the equivalent tho: > And I can set it on start OLLAMA_CONTEXT_LENGTH=16384 OLLAMA_HOST=0.0.0.0 ollama serve.
Author
Owner

@rekram1-node commented on GitHub (Oct 13, 2025):

not sure what's causing that issue, instead of opencode --log-level DEBUG maybe try:

opencode run hello --print-logs

@rekram1-node commented on GitHub (Oct 13, 2025): not sure what's causing that issue, instead of `opencode --log-level DEBUG` maybe try: `opencode run hello --print-logs`
Author
Owner

@traceflight commented on GitHub (Oct 13, 2025):

I'm also encountering this issue, but I'm using vllm instead of ollama. Meanwhile, the same model qwen3 coder works fine for tool calling in roo code.

@traceflight commented on GitHub (Oct 13, 2025): I'm also encountering this issue, but I'm using vllm instead of ollama. Meanwhile, the same model qwen3 coder works fine for tool calling in roo code.
Author
Owner

@rekram1-node commented on GitHub (Oct 13, 2025):

@traceflight out of curiousity is it the same model discussed here?
https://docs.ollama.com/roo-code

@rekram1-node commented on GitHub (Oct 13, 2025): @traceflight out of curiousity is it the same model discussed here? https://docs.ollama.com/roo-code
Author
Owner

@traceflight commented on GitHub (Oct 13, 2025):

hi, i am using Qwen3-Coder-480B-A35B-Instruct hosted by local vllm instance. it works fine in vscode roo code plugin.

@traceflight commented on GitHub (Oct 13, 2025): hi, i am using Qwen3-Coder-480B-A35B-Instruct hosted by local [vllm](https://github.com/vllm-project/vllm) instance. it works fine in vscode [roo code](https://github.com/RooCodeInc/Roo-Code) plugin.
Author
Owner

@somera commented on GitHub (Oct 14, 2025):

not sure what's causing that issue, instead of opencode --log-level DEBUG maybe try:

opencode run hello --print-logs

In a git bash the test is working. In opencode tui I see than this.

Image

In PowehShell it can't communicate with ollama (run on other machine).

@somera commented on GitHub (Oct 14, 2025): > not sure what's causing that issue, instead of `opencode --log-level DEBUG` maybe try: > > `opencode run hello --print-logs` In a git bash the test is working. In opencode tui I see than this. <img width="1655" height="1096" alt="Image" src="https://github.com/user-attachments/assets/66478281-1ea0-4476-a7a4-9d53797fddca" /> In PowehShell it can't communicate with ollama (run on other machine).
Author
Owner

@somera commented on GitHub (Oct 14, 2025):

Ok, now I'm running my ollama instance with OLLAMA_CONTEXT_LENGTH=32768 and the tools are running with `qwen3-coder:30b' .

Image
@somera commented on GitHub (Oct 14, 2025): Ok, now I'm running my ollama instance with `OLLAMA_CONTEXT_LENGTH=32768` and the tools are running with `qwen3-coder:30b' . <img width="1104" height="1110" alt="Image" src="https://github.com/user-attachments/assets/e58d2978-6a06-43d7-a80a-a99a842faee4" />
Author
Owner

@somera commented on GitHub (Oct 14, 2025):

I added this to docs but Ig they weren't published yet

This should help others. I'll go ahead and close this issue since everything is working now. Thanks!

@somera commented on GitHub (Oct 14, 2025): > I added this to docs but Ig they weren't published yet This should help others. I'll go ahead and close this issue since everything is working now. Thanks!
Author
Owner

@rekram1-node commented on GitHub (Oct 14, 2025):

awesome!!!

@rekram1-node commented on GitHub (Oct 14, 2025): awesome!!!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2085