What happened?
When I run uv run oh, the CLI shows Connecting to backend... and then exits with a traceback.
Actual behavior:
- Backend exits with code 1
- Error:
TypeError: run_backend_host() got an unexpected keyword argument 'permission_mode'
Expected behavior:
uv run oh should start the interactive TUI normally.
Steps to reproduce
- Clone the repository and enter project directory:
git clone https://github.com/HKUDS/OpenHarness.git
cd OpenHarness
- Install dependencies:
uv sync --extra dev
- Run interactive mode:
uv run oh
- Observe crash after Connecting to backend... with TypeError.
Expected behavior
uv run oh should launch the interactive TUI session.
Actual behavior
Backend exits with code 1 because run_backend_host() does not accept permission_mode.
Root cause
run_repl() forwards permission_mode to run_backend_host(...), but:
- run_backend_host function signature does not include permission_mode
- BackendHostConfig does not include permission_mode
- the value is not passed through to build_runtime(...)
Proposed fix
Propagate permission_mode end-to-end in backend host:
- Add permission_mode: str | None = None to BackendHostConfig
- Add permission_mode parameter to run_backend_host(...)
- Pass permission_mode=self._config.permission_mode into build_runtime(...) in ReactBackendHost.run()
Verification after patch
- uv run oh --backend-only no longer throws TypeError
- uv run oh no longer fails from this argument mismatch
Environment
- OS: Windows 11
- Shell: PowerShell (
(base) conda environment)
- Python: Anaconda Python (traceback path shows
D:\anaconda\Lib\asyncio\...)
- Install method: from source (
uv sync --extra dev, then uv run oh)
- Provider profile at runtime:
minimax (but issue appears before any model response, likely provider-independent)
- Base URL in active profile:
https://api.minimax.chat/v1
Relevant logs or screenshots
(base) PS E:\ASUS\Github\OpenHarness> uv run oh
Connecting to backend...
Traceback (most recent call last):
File "E:\ASUS\Github\OpenHarness\src\openharness\cli.py", line 1432, in main
asyncio.run(...)
File "D:\anaconda\Lib\asyncio\runners.py", line 194, in run
return runner.run(main)
File "D:\anaconda\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
File "D:\anaconda\Lib\asyncio\base_events.py", line 687, in run_until_complete
return future.result()
File "E:\ASUS\Github\OpenHarness\src\openharness\ui\app.py", line 33, in run_repl
await run_backend_host(...)
TypeError: run_backend_host() got an unexpected keyword argument 'permission_mode'
ℹ backend exited with code 1
What happened?
When I run
uv run oh, the CLI showsConnecting to backend...and then exits with a traceback.Actual behavior:
TypeError: run_backend_host() got an unexpected keyword argument 'permission_mode'Expected behavior:
uv run ohshould start the interactive TUI normally.Steps to reproduce
git clone https://github.com/HKUDS/OpenHarness.git cd OpenHarnessuv sync --extra dev
uv run oh
Expected behavior
uv run oh should launch the interactive TUI session.
Actual behavior
Backend exits with code 1 because run_backend_host() does not accept permission_mode.
Root cause
run_repl() forwards permission_mode to run_backend_host(...), but:
Proposed fix
Propagate permission_mode end-to-end in backend host:
Verification after patch
Environment
(base)conda environment)D:\anaconda\Lib\asyncio\...)uv sync --extra dev, thenuv run oh)minimax(but issue appears before any model response, likely provider-independent)https://api.minimax.chat/v1Relevant logs or screenshots