Hi everyone! I'm running into an issue where OpenH...
# questions
b
Hi everyone! I'm running into an issue where OpenHands acts just like a standard chatbot and refuses to execute commands or create files. My Setup: • Environment: Running via Docker • LLM: Local model (unsloth/qwen3-coder-30b-a3b-instruct) local hosted on LM Studio. • SCM: No SCM/Git integration configured yet (just testing local workspace operations). The Issue: I asked the agent to scaffold a new Node.js/TypeScript project. Instead of triggering the
bash
or
file_editor
tools to actually create the directories and files, it just outputs the textual instructions in the chat (e.g., "Here is the code, save it as index.ts..."). My questions: Is this a known limitation/failure of tool-calling with this specific local model, or could it be related to missing SCM integration? Does OpenHands silently fall back to conversational mode if a background tool fails (e.g., if
npm
wasn't found in the container)? Any advice on how to force it into "agentic/action" mode with a local LLM would be appreciated!
m
I saw this behavior at first. I don't think it is a limitation of the model, but probably a combination of config settings you need. Are you using OpenHands CLI? I am still a newbie here, but maybe this will give you some ideas. try manipulating the settings you have in
~/.openhands/agent_settings.json
here is where I am at for Qwen 3 Coder Next --
native_tool_calling
might be relevant for you (ignore the $ variable strings, you'd need to replace those)
Copy code
{
  "llm": {
    "model": "openai/$Model",
    "api_key": "$ApiKey",
    "base_url": "$OpenHandsBaseUrl",
    "api_version": null,
    "aws_access_key_id": null,
    "aws_secret_access_key": null,
    "aws_region_name": null,
    "openrouter_site_url": "<https://docs.all-hands.dev/>",
    "openrouter_app_name": "OpenHands",
    "num_retries": 5,
    "retry_multiplier": 8.0,
    "retry_min_wait": 8,
    "retry_max_wait": 64,
    "timeout": 3600,
    "max_message_chars": 131072,
    "temperature": 0.7,
    "top_p": 0.95,
    "top_k": 40,
    "max_input_tokens": $ContextLimit,
    "max_output_tokens": 16384,    "model_canonical_name": null,
    "extra_headers": null,
    "input_cost_per_token": null,
    "output_cost_per_token": null,
    "ollama_base_url": null,
    "stream": false,
    "drop_params": true,
    "modify_params": true,
    "disable_vision": null,
    "disable_stop_word": false,
    "caching_prompt": true,
    "log_completions": false,
    "log_completions_folder": "logs/completions",
    "custom_tokenizer": null,
    "native_tool_calling": true,
    "force_string_serializer": null,
    "reasoning_effort": "high",
    "reasoning_summary": null,
    "enable_encrypted_reasoning": true,
    "prompt_cache_retention": "24h",
    "extended_thinking_budget": 200000,
    "seed": null,
    "safety_settings": null,
    "usage_id": "agent",
    "litellm_extra_body": {
      "presence_penalty": 0.3,
      "frequency_penalty": 0.3
    }
  },
  "tools": [],
  "mcp_config": {},
  "filter_tools_regex": null,
  "include_default_tools": [
    "FinishTool",
    "ThinkTool"
  ],
  "agent_context": null,
  "system_prompt_filename": "system_prompt.j2",
  "security_policy_filename": "security_policy.j2",
  "system_prompt_kwargs": {
    "llm_security_analyzer": true
  },
  "condenser": {
    "llm": {
      "model": "openai/$Model",
      "api_key": "$ApiKey",
      "base_url": "$OpenHandsBaseUrl",
      "api_version": null,
      "aws_access_key_id": null,
      "aws_secret_access_key": null,
      "aws_region_name": null,
      "openrouter_site_url": "<https://docs.all-hands.dev/>",
      "openrouter_app_name": "OpenHands",
      "num_retries": 5,
      "retry_multiplier": 8.0,
      "retry_min_wait": 8,
      "retry_max_wait": 64,
      "timeout": 3600,
      "max_message_chars": 131072,
      "temperature": 0.5,
      "top_p": 0.95,
      "top_k": 40,
      "max_input_tokens": $ContextLimit,
      "max_output_tokens": 8192,
      "model_canonical_name": null,
      "extra_headers": null,
      "input_cost_per_token": null,
      "output_cost_per_token": null,
      "ollama_base_url": null,
      "stream": false,
      "drop_params": true,
      "modify_params": true,
      "disable_vision": null,
      "disable_stop_word": false,
      "caching_prompt": true,
      "log_completions": false,
      "log_completions_folder": "logs/completions",
      "custom_tokenizer": null,
      "native_tool_calling": true,
      "force_string_serializer": null,
      "reasoning_effort": "high",
      "reasoning_summary": null,
      "enable_encrypted_reasoning": true,
      "prompt_cache_retention": "24h",
      "extended_thinking_budget": 200000,
      "seed": null,
      "safety_settings": null,
      "usage_id": "condenser",
      "litellm_extra_body": {
        "presence_penalty": 0.05,
        "frequency_penalty": 0.05
      }
    },
    "max_size": 100,
    "max_tokens": null,
    "keep_first": 2,
    "minimum_progress": 0.1,
    "hard_context_reset_max_retries": 5,
    "hard_context_reset_context_scaling": 0.8,
    "kind": "LLMSummarizingCondenser"
  },
  "critic": null,
  "kind": "Agent"
}
b
no, i use docker gui. docker run -it --rm --pull=always \ -e AGENT_SERVER_IMAGE_REPOSITORY=ghcr.io/openhands/agent-server \ -e AGENT_SERVER_IMAGE_TAG=1.11.4-python \ -e LOG_ALL_EVENTS=true \ -v /var/run/docker.sock:/var/run/docker.sock \ -v ~/.openhands:/.openhands \ -p 3000:3000 \ --add-host host.docker.internal:host-gateway \ --name openhands-app \ docker.openhands.dev/openhands/openhands:1.4
m
sweet! it looks like you are already mounting
~/.openhands
as a volume. do you have an existing
~/.openhands/agent_settings.json
then?
both the GUI and the CLI share the same backend SDK, which I believe will leverage this config file in either mode
👀 1
b
so, i have only .openhands % cat settings.json {"language":"uk","agent":"CodeActAgent","max_iterations":null,"security_analyzer":"llm","confirmation_mode":false,"llm_model":"openai/unsloth/qwen3-coder-30b-a3b-instruct","llm_api_key":"local-llm","llm_base_url":"http://192.168.148.174:1234/v1","user_version":null,"remote_runtime_resource_factor":1,"secrets_store":{"provider_tokens":{}},"enable_default_condenser":true,"enable_sound_notifications":false,"enable_proactive_conversation_starters":false,"enable_solvability_analysis":false,"user_consents_to_analytics":false,"sandbox_base_container_image":null,"sandbox_runtime_container_image":null,"mcp_config":{"sse_servers":[],"stdio_servers":[],"shttp_servers":[]},"search_api_key":"test","sandbox_api_key":null,"max_budget_per_task":null,"condenser_max_size":240,"email":"","email_verified":true,"git_user_name":"openhands","git_user_email":"openhands@all-hands.dev","v1_enabled":true}*%* and there is no
~/.openhands/agent_settings.json
f
I'm also using the GUI and don't see any agent_settings.json
m
@nutritious-balloon-65098 does the OpenHands GUI respect
~/.openhands/agent_settings.json
? Or is it meant only for OpenHands CLI?
f
Copy code
root@e23175cf727e:/app# grep -w -R agent_settings.json
root@e23175cf727e:/app# grep -R agent_settings.json
root@e23175cf727e:/app# cd /
root@e23175cf727e:/# grep -R agent_settings.json
^C
root@e23175cf727e:/# find . -name "agent_settings.json"
root@e23175cf727e:/#
m
I am going to have to wait for someone with deeper knowledge than me to explain if the GUI should honor that file. I think the chances are good that it does, but this is a place I get lost. I don't have permissions here to invoke the OpenHands to ask it to search the repo
c
I just asked OpenHands to double-check. The GUI doesn't honor
agent_settings.json
, it still uses the legacy V0 settings format and file,
settings.json
🙇 1
m
so @faint-greece-70506 @breezy-car-95415 the settings I am showing you will not work for your GUI.. but maybe an excuse to try your luck with the CLI version?
c
If you want, you can use a web view from the CLI version, even. With
openhands web
I believe (it's not the same GUI, it's the CLI accessed via a web view)
👍 1
b
so it too intresting where is a root cause ?)
l
typically this happens when the local LM doesn’t have a long enough context window. in both ollama and lmstudio you need to set the language model context window longer, like to 32k. i’m not sure if it’s the problem this time, but it might be
b
I think the Context length is not a point, cause it is 32984 now.
n
I still have the same problem. Did anyone found a solution?
My Setup: CachyOS PC: LM Studio + all-hands_openhands-lm-7b.v0.1 (32k Context length) Windows 11 PC: WSL + OpenHands GUI (Docker) Docker Desktop OpenHands is also connected with GitHub by Token (Permission is set like in the OpenHands Documentation)
👀 1
The problem was with the LM. Everything works with qwen2.5-coder-14b-instruct.
👍 1
r
@narrow-motorcycle-3726 I had issues with constant failed tool calls and switched to qwopus3.5-27b-v3 Q8_0 with a lot of success. Might give that model a try if you can fit it. Or try one of the retrained qwopus models.