openclaw - 💡(How to fix) Fix [Bug]: openclaw agent times out/hangs with local Ollama on macOS while TUI interactive chat works [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#62958Fetched 2026-04-09 08:00:11
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Author
Participants
Timeline (top)
labeled ×1

Summary

On macOS, with OpenClaw configured to use a local Ollama model, the interactive openclaw tui path works, but
one-shot CLI agent runs via openclaw agent --agent main --message ... repeatedly time out or hang.

This appears to affect the openclaw agent / gateway-injected / task path specifically, not the local Ollama model
itself.

Root Cause

Summary

On macOS, with OpenClaw configured to use a local Ollama model, the interactive openclaw tui path works, but
one-shot CLI agent runs via openclaw agent --agent main --message ... repeatedly time out or hang.

This appears to affect the openclaw agent / gateway-injected / task path specifically, not the local Ollama model
itself.

Code Example

openclaw agent --agent main --message "Reply with exactly: MAC MINI CLAW OK"

---

Task Kind Status Summary                                                                                           
   ... cli timed_out Reply with exactly: MAC MINI CLAW OK                                

### Expected behavior

Task to be executed. No timeout.  

### Actual behavior

Timout. Session is stuck. Wedged. 

### OpenClaw version

2026.4.7 (5050017)

### Operating system

macOS 26.3.1 arm64

### Install method

bash script from web site

### Model

qwen3.5:9b 6488c96fa5fa 6.6 GB

### Provider / routing chain

open claw -> Ollama local

### Additional provider/model setup details

 - OpenClaw: 2026.4.7 (5050017)                                                                                       
 - OS: macOS 26.3.1 arm64                                                                                             
 - Node: 22.22.2                                                                                                      
 - Ollama: 0.20.3                                                                                                     
 - Host: Mac mini M4                                                                                                  
 - Gateway mode: local                                                                                                
 - Gateway service: launch agent                                                                                      
 - Local model tested:                                                                                                
     - ollama/qwen3.5:9b                                                                                              
 - Also tested:                                                                                                       
     - ollama/gemma4:e4b                                                                                              
                                                                                                                      
 Local model availability                                                                                             
                                                                                                                      
 Ollama is healthy and local models are present:

---

Direct Ollama usage works, for example:

---

returns:

---

Summary                                                                                                              
                                                                                                                      
 On macOS, with OpenClaw configured to use a local Ollama model, the interactive openclaw tui path works, but         
 one-shot CLI agent runs via openclaw agent --agent main --message ... repeatedly time out or hang.                   
                                                                                                                      
 This appears to affect the openclaw agent / gateway-injected / task path specifically, not the local Ollama model    
 itself.                                                                                                              
                                                                                                                      
 Environment                                                                                                          
                                                                                                                      
 - OpenClaw: 2026.4.7 (5050017)                                                                                       
 - OS: macOS 26.3.1 arm64                                                                                             
 - Node: 22.22.2                                                                                                      
 - Ollama: 0.20.3                                                                                                     
 - Host: Mac mini M4                                                                                                  
 - Gateway mode: local                                                                                                
 - Gateway service: launch agent                                                                                      
 - Local model tested:                                                                                                
     - ollama/qwen3.5:9b                                                                                              
 - Also tested:                                                                                                       
     - ollama/gemma4:e4b                                                                                              
                                                                                                                      
 Local model availability                                                                                             
                                                                                                                      
 Ollama is healthy and local models are present:                                                                      
                                                                                                                      
                                                                                                               
   ollama list                                                                                                        
   NAME ID SIZE MODIFIED                                                                                              
   gemma4:26b 5571076f3d70 17 GB 35 hours ago                                                                         
   gemma4:e4b c6eb396dbd59 9.6 GB 35 hours ago                                                                        
   qwen3.5:9b 6488c96fa5fa 6.6 GB 2 days ago                                                                          
                                                                                                                   
                                                                                                                      
 Direct Ollama usage works, for example:                                                                              
                                                                                                                      
                                                                                                               
   ollama run gemma4:e4b "Reply with exactly: MAC MINI CLAW OK"                                                       
                                                                                                                   
                                                                                                                      
 returns:                                                                                                             
                                                                                                                      
                                                                                                               
   MAC MINI CLAW OK                                                                                                   
                                                                                                                   
                                                                                                                      
 OpenClaw config used                                                                                                 
                                                                                                                      
 Relevant config:                                                                                                     
                                                                                                                      
                                                                                                               
   {                                                                                                                  
     "gateway": {                                                                                                     
       "mode": "local",                                                                                               
       "auth": {                                                                                                      
         "mode": "token",                                                                                             
         "token": "..."                                                                                               
       }                                                                                                              
     },                                                                                                               
     "agents": {                                                                                                      
       "defaults": {                                                                                                  
         "model": {                                                                                                   
           "primary": "ollama/qwen3.5:9b",                                                                            
           "fallbacks": []                                                                                            
         }                                                                                                            
       }                                                                                                              
     },                                                                                                               
     "plugins": {                                                                                                     
       "entries": {                                                                                                   
         "ollama": { "enabled": true }                                                                                
       }                                                                                                              
     }                                                                                                                
   }                                                                                                                  
                                                                                                                   
                                                                                                                      
 Also confirmed auth profile exists for Ollama:                                                                       
                                                                                                                      
                                                                                                               
   {                                                                                                                  
     "version": 1,                                                                                                    
     "profiles": {                                                                                                    
       "ollama:default": {                                                                                            
         "type": "api_key",                                                                                           
         "provider": "ollama",                                                                                        
         "key": "ollama-local"                                                                                        
       }                                                                                                              
     }                                                                                                                
   }                                                                                                                  
                                                                                                                   
                                                                                                                      
 What works                                                                                                           
                                                                                                                      
 ### Interactive TUI works                                                                                            
                                                                                                                      
 Running:                                                                                                             
                                                                                                                      
                                                                                                               
   openclaw tui                                                                                                       
                                                                                                                   
                                                                                                                      
 and sending a simple prompt like:                                                                                    
                                                                                                                      
                                                                                                               
   hello                                                                                                              
                                                                                                                   
                                                                                                                      
 gets a response successfully.                                                                                        
                                                                                                                      
 This suggests:                                                                                                       
 - gateway is healthy                                                                                                 
 - local session path is healthy                                                                                      
 - Ollama provider path is healthy                                                                                    
 - local interactive chat is usable                                                                                   
                                                                                                                      
 What fails                                                                                                           
                                                                                                                      
 ### One-shot CLI path times out or hangs                                                                             
                                                                                                                      
 Running:                                                                                                             
                                                                                                                      
                                                                                                               
   openclaw agent --agent main --message "Reply with exactly: MAC MINI CLAW OK"                                       
                                                                                                                   
                                                                                                                      
 creates a cli task but does not return successfully.                                                                 
                                                                                                                      
 Observed outcomes:                                                                                                   
 - tasks end as timed_out                                                                                             
 - sometimes the process appears to hang                                                                              
 - increasing timeout makes it hang longer, but still not complete                                                    
                                                                                                                      
 Task table example:                                                                                                  
                                                                                                                      
                                                                                                               
   Task Kind Status Summary                                                                                           
   ... cli timed_out Reply with exactly: MAC MINI CLAW OK                                                             
                                                                                                                   
                                                                                                                      
 Longer timeout test                                                                                                  
                                                                                                                      
 Also tested:                                                                                                         
                                                                                                                      
                                                                                                               
   openclaw agent --agent main --timeout 120 --message "Reply with exactly: MAC MINI CLAW OK"                         
                                                                                                                   
                                                                                                                      
 This changed behavior from “times out quickly” to “remains running longer”, but still did not complete successfully. 
                                                                                                                      
 So --timeout affects behavior, but does not resolve the underlying issue.                                            
                                                                                                                      
 Relevant logs                                                                                                        
                                                                                                                      
 Repeated log lines:                                                                                                  
                                                                                                                      
                                                                                                               
   [agent] Profile ollama:default timed out. Trying next account...                                                   
   [agent] embedded run failover decision: runId=... stage=assistant decision=surface_error reason=timeout            
 provider=openclaw/gateway-injected profile=...                                                                       
                                                                                                                   
                                                                                                                      
 Later, after removing fallbacks:                                                                                     
                                                                                                                      
                                                                                                               
   [agent] embedded run failover decision: runId=... stage=assistant decision=surface_error reason=timeout            
 provider=ollama/qwen3.5:9b profile=...                                                                               
                                                                                                                   
                                                                                                                      
 Earlier, before fallbacks were disabled, the timeout path also cascaded into misleading OpenAI auth failures:        
                                                                                                                      
                                                                                                               
   No API key found for provider "openai"                                                                             
                                                                                                                   
                                                                                                                      
 Setting:                                                                                                             
                                                                                                                      
                                                                                                               
   "fallbacks": []                                                                                                    
                                                                                                                   
                                                                                                                      
 removed some of that noise, but did not fix the timeout/hang.                                                        
                                                                                                                      
 Why this seems like an OpenClaw bug                                                                                  
                                                                                                                      
 - Direct Ollama execution works                                                                                      
 - TUI interactive session works                                                                                      
 - The failure appears isolated to openclaw agent / one-shot CLI / task path                                          
 - The timeout/failover behavior seems to happen in the OpenClaw orchestration layer rather than in Ollama itself     
                                                                                                                      
 Expected behavior                                                                                                    
                                                                                                                      
 openclaw agent --agent main --message "Reply with exactly: MAC MINI CLAW OK" should return a response successfully   
 when the configured local Ollama model is healthy and interactive TUI chat is already working.                       
                                                                                                                      
 Actual behavior                                                                                                      
                                                                                                                      
 - CLI task times out or hangs                                                                                        
 - logs show Ollama profile timeout / surface timeout behavior                                                        
 - TUI remains usable, making this look path-specific rather than a full provider failure                             
                                                                                                                      
 Additional notes                                                                                                     
                                                                                                                      
 Local docs appear relevant here:                                                                                     
 - openclaw agent supports --timeout <seconds>                                                                        
 - docs also distinguish:                                                                                             
     - a shorter wait behavior (agent.wait)                                                                           
     - longer embedded runtime timeout (agents.defaults.timeoutSeconds )                                              
                                                                                                                      
 This may point to a mismatch between the CLI wait/surface timeout and the actual local Ollama response path.
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

Summary

On macOS, with OpenClaw configured to use a local Ollama model, the interactive openclaw tui path works, but
one-shot CLI agent runs via openclaw agent --agent main --message ... repeatedly time out or hang.

This appears to affect the openclaw agent / gateway-injected / task path specifically, not the local Ollama model
itself.

Steps to reproduce

What fails

One-shot CLI path times out or hangs

Running:

  openclaw agent --agent main --message "Reply with exactly: MAC MINI CLAW OK"

creates a cli task but does not return successfully.

Observed outcomes:

  • tasks end as timed_out
  • sometimes the process appears to hang
  • increasing timeout makes it hang longer, but still not complete

Task table example:

  Task Kind Status Summary                                                                                           
  ... cli timed_out Reply with exactly: MAC MINI CLAW OK                                

### Expected behavior

Task to be executed. No timeout.  

### Actual behavior

Timout. Session is stuck. Wedged. 

### OpenClaw version

2026.4.7 (5050017)

### Operating system

macOS 26.3.1 arm64

### Install method

bash script from web site

### Model

qwen3.5:9b 6488c96fa5fa 6.6 GB

### Provider / routing chain

open claw -> Ollama local

### Additional provider/model setup details

- OpenClaw: 2026.4.7 (5050017)                                                                                       
- OS: macOS 26.3.1 arm64                                                                                             
- Node: 22.22.2                                                                                                      
- Ollama: 0.20.3                                                                                                     
- Host: Mac mini M4                                                                                                  
- Gateway mode: local                                                                                                
- Gateway service: launch agent                                                                                      
- Local model tested:                                                                                                
    - ollama/qwen3.5:9b                                                                                              
- Also tested:                                                                                                       
    - ollama/gemma4:e4b                                                                                              
                                                                                                                     
Local model availability                                                                                             
                                                                                                                     
Ollama is healthy and local models are present:                                                                      
                                                                                                                     
```bash                                                                                                              
  ollama list                                                                                                        
  NAME ID SIZE MODIFIED                                                                                              
  gemma4:26b 5571076f3d70 17 GB 35 hours ago                                                                         
  gemma4:e4b c6eb396dbd59 9.6 GB 35 hours ago                                                                        
  qwen3.5:9b 6488c96fa5fa 6.6 GB 2 days ago

Direct Ollama usage works, for example:

  ollama run gemma4:e4b "Reply with exactly: MAC MINI CLAW OK"

returns:

  MAC MINI CLAW OK                                                           

### Logs, screenshots, and evidence

```shell
Summary                                                                                                              
                                                                                                                     
On macOS, with OpenClaw configured to use a local Ollama model, the interactive openclaw tui path works, but         
one-shot CLI agent runs via openclaw agent --agent main --message ... repeatedly time out or hang.                   
                                                                                                                     
This appears to affect the openclaw agent / gateway-injected / task path specifically, not the local Ollama model    
itself.                                                                                                              
                                                                                                                     
Environment                                                                                                          
                                                                                                                     
- OpenClaw: 2026.4.7 (5050017)                                                                                       
- OS: macOS 26.3.1 arm64                                                                                             
- Node: 22.22.2                                                                                                      
- Ollama: 0.20.3                                                                                                     
- Host: Mac mini M4                                                                                                  
- Gateway mode: local                                                                                                
- Gateway service: launch agent                                                                                      
- Local model tested:                                                                                                
    - ollama/qwen3.5:9b                                                                                              
- Also tested:                                                                                                       
    - ollama/gemma4:e4b                                                                                              
                                                                                                                     
Local model availability                                                                                             
                                                                                                                     
Ollama is healthy and local models are present:                                                                      
                                                                                                                     
                                                                                                              
  ollama list                                                                                                        
  NAME ID SIZE MODIFIED                                                                                              
  gemma4:26b 5571076f3d70 17 GB 35 hours ago                                                                         
  gemma4:e4b c6eb396dbd59 9.6 GB 35 hours ago                                                                        
  qwen3.5:9b 6488c96fa5fa 6.6 GB 2 days ago                                                                          
                                                                                                                  
                                                                                                                     
Direct Ollama usage works, for example:                                                                              
                                                                                                                     
                                                                                                              
  ollama run gemma4:e4b "Reply with exactly: MAC MINI CLAW OK"                                                       
                                                                                                                  
                                                                                                                     
returns:                                                                                                             
                                                                                                                     
                                                                                                              
  MAC MINI CLAW OK                                                                                                   
                                                                                                                  
                                                                                                                     
OpenClaw config used                                                                                                 
                                                                                                                     
Relevant config:                                                                                                     
                                                                                                                     
                                                                                                              
  {                                                                                                                  
    "gateway": {                                                                                                     
      "mode": "local",                                                                                               
      "auth": {                                                                                                      
        "mode": "token",                                                                                             
        "token": "..."                                                                                               
      }                                                                                                              
    },                                                                                                               
    "agents": {                                                                                                      
      "defaults": {                                                                                                  
        "model": {                                                                                                   
          "primary": "ollama/qwen3.5:9b",                                                                            
          "fallbacks": []                                                                                            
        }                                                                                                            
      }                                                                                                              
    },                                                                                                               
    "plugins": {                                                                                                     
      "entries": {                                                                                                   
        "ollama": { "enabled": true }                                                                                
      }                                                                                                              
    }                                                                                                                
  }                                                                                                                  
                                                                                                                  
                                                                                                                     
Also confirmed auth profile exists for Ollama:                                                                       
                                                                                                                     
                                                                                                              
  {                                                                                                                  
    "version": 1,                                                                                                    
    "profiles": {                                                                                                    
      "ollama:default": {                                                                                            
        "type": "api_key",                                                                                           
        "provider": "ollama",                                                                                        
        "key": "ollama-local"                                                                                        
      }                                                                                                              
    }                                                                                                                
  }                                                                                                                  
                                                                                                                  
                                                                                                                     
What works                                                                                                           
                                                                                                                     
### Interactive TUI works                                                                                            
                                                                                                                     
Running:                                                                                                             
                                                                                                                     
                                                                                                              
  openclaw tui                                                                                                       
                                                                                                                  
                                                                                                                     
and sending a simple prompt like:                                                                                    
                                                                                                                     
                                                                                                              
  hello                                                                                                              
                                                                                                                  
                                                                                                                     
gets a response successfully.                                                                                        
                                                                                                                     
This suggests:                                                                                                       
- gateway is healthy                                                                                                 
- local session path is healthy                                                                                      
- Ollama provider path is healthy                                                                                    
- local interactive chat is usable                                                                                   
                                                                                                                     
What fails                                                                                                           
                                                                                                                     
### One-shot CLI path times out or hangs                                                                             
                                                                                                                     
Running:                                                                                                             
                                                                                                                     
                                                                                                              
  openclaw agent --agent main --message "Reply with exactly: MAC MINI CLAW OK"                                       
                                                                                                                  
                                                                                                                     
creates a cli task but does not return successfully.                                                                 
                                                                                                                     
Observed outcomes:                                                                                                   
- tasks end as timed_out                                                                                             
- sometimes the process appears to hang                                                                              
- increasing timeout makes it hang longer, but still not complete                                                    
                                                                                                                     
Task table example:                                                                                                  
                                                                                                                     
                                                                                                              
  Task Kind Status Summary                                                                                           
  ... cli timed_out Reply with exactly: MAC MINI CLAW OK                                                             
                                                                                                                  
                                                                                                                     
Longer timeout test                                                                                                  
                                                                                                                     
Also tested:                                                                                                         
                                                                                                                     
                                                                                                              
  openclaw agent --agent main --timeout 120 --message "Reply with exactly: MAC MINI CLAW OK"                         
                                                                                                                  
                                                                                                                     
This changed behavior from “times out quickly” to “remains running longer”, but still did not complete successfully. 
                                                                                                                     
So --timeout affects behavior, but does not resolve the underlying issue.                                            
                                                                                                                     
Relevant logs                                                                                                        
                                                                                                                     
Repeated log lines:                                                                                                  
                                                                                                                     
                                                                                                              
  [agent] Profile ollama:default timed out. Trying next account...                                                   
  [agent] embedded run failover decision: runId=... stage=assistant decision=surface_error reason=timeout            
provider=openclaw/gateway-injected profile=...                                                                       
                                                                                                                  
                                                                                                                     
Later, after removing fallbacks:                                                                                     
                                                                                                                     
                                                                                                              
  [agent] embedded run failover decision: runId=... stage=assistant decision=surface_error reason=timeout            
provider=ollama/qwen3.5:9b profile=...                                                                               
                                                                                                                  
                                                                                                                     
Earlier, before fallbacks were disabled, the timeout path also cascaded into misleading OpenAI auth failures:        
                                                                                                                     
                                                                                                              
  No API key found for provider "openai"                                                                             
                                                                                                                  
                                                                                                                     
Setting:                                                                                                             
                                                                                                                     
                                                                                                              
  "fallbacks": []                                                                                                    
                                                                                                                  
                                                                                                                     
removed some of that noise, but did not fix the timeout/hang.                                                        
                                                                                                                     
Why this seems like an OpenClaw bug                                                                                  
                                                                                                                     
- Direct Ollama execution works                                                                                      
- TUI interactive session works                                                                                      
- The failure appears isolated to openclaw agent / one-shot CLI / task path                                          
- The timeout/failover behavior seems to happen in the OpenClaw orchestration layer rather than in Ollama itself     
                                                                                                                     
Expected behavior                                                                                                    
                                                                                                                     
openclaw agent --agent main --message "Reply with exactly: MAC MINI CLAW OK" should return a response successfully   
when the configured local Ollama model is healthy and interactive TUI chat is already working.                       
                                                                                                                     
Actual behavior                                                                                                      
                                                                                                                     
- CLI task times out or hangs                                                                                        
- logs show Ollama profile timeout / surface timeout behavior                                                        
- TUI remains usable, making this look path-specific rather than a full provider failure                             
                                                                                                                     
Additional notes                                                                                                     
                                                                                                                     
Local docs appear relevant here:                                                                                     
- openclaw agent supports --timeout <seconds>                                                                        
- docs also distinguish:                                                                                             
    - a shorter wait behavior (agent.wait)                                                                           
    - longer embedded runtime timeout (agents.defaults.timeoutSeconds )                                              
                                                                                                                     
This may point to a mismatch between the CLI wait/surface timeout and the actual local Ollama response path.

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

The one-shot CLI agent timeout or hang issue may be resolved by adjusting the agents.defaults.timeoutSeconds configuration in OpenClaw to match the expected response time of the local Ollama model.

Guidance

  • Review the OpenClaw configuration to ensure that the agents.defaults.timeoutSeconds value is set to a reasonable value that allows the local Ollama model to respond.
  • Verify that the --timeout option is being used correctly when running the openclaw agent command, and consider increasing the timeout value to see if it resolves the issue.
  • Check the OpenClaw logs for any error messages or timeout warnings that may indicate a mismatch between the CLI wait timeout and the actual local Ollama response path.
  • Consider testing the openclaw agent command with a different local Ollama model to see if the issue is specific to the qwen3.5:9b model.

Example

No code example is provided as the issue appears to be related to configuration and timeout settings rather than code.

Notes

The issue may be related to a mismatch between the CLI wait timeout and the actual local Ollama response path. Adjusting the agents.defaults.timeoutSeconds configuration and verifying the --timeout option usage may help resolve the issue.

Recommendation

Apply a workaround by adjusting the agents.defaults.timeoutSeconds configuration and verifying the --timeout option usage, as the root cause of the issue is likely related to timeout settings rather than a bug in OpenClaw.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Task to be executed. No timeout.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING