Repository navigation
Fix OpenClaw start default to local TUI - #6937
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the openclaw command execution in unsloth_cli/commands/start.py to default to launching the local TUI (['tui', '--local']) when no explicit arguments are provided, while still preserving explicit subcommands. It also adds corresponding unit tests in unsloth_cli/tests/test_start.py to verify this behavior. There are no review comments, and I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 803d16b3b5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if not openclaw_args or openclaw_args[0].startswith("-"): | ||
| openclaw_args = ["tui", "--local", *openclaw_args] |
There was a problem hiding this comment.
Preserve OpenClaw global flag passthrough
When a caller passes an OpenClaw global flag through this passthrough wrapper, e.g. unsloth start openclaw --no-launch --profile test or --dev, ctx.args[0] starts with - and this rewrites the recipe from the formerly valid openclaw --profile test into openclaw tui --local --profile test. I checked the OpenClaw CLI usage, which places globals before the command (openclaw [--dev] [--profile <name>] <command>), and the TUI options list does not include --profile/--dev, so these pass-through invocations now fail instead of reaching OpenClaw.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Good catch, fixed in 396cac1. Since OpenClaw's grammar is openclaw [--dev] [--profile ] and a leading '--flag value' is ambiguous between a global (--profile test) and a tui option (--message hi), the wrapper can't reinterpret it safely. It now defaults to 'tui --local' only when there are no passthrough args, and forwards everything else verbatim so OpenClaw parses it under its own grammar. The bare-launch default is preserved; explicit subcommands and global flags now pass through untouched. Added a regression test for --profile passthrough.
The first-arg startswith('-') branch rewrote passthrough globals into a broken
command: OpenClaw's grammar is openclaw [--dev] [--profile <name>] <command>, so
'unsloth start openclaw --profile test' became 'openclaw tui --local --profile
test', but tui does not accept --profile (or --dev), so the invocation failed.
A leading '--flag value' is ambiguous between a global (--profile test) and a tui
option (--message hi), so it cannot be reinterpreted safely. Default to the local
TUI only when no passthrough args are given, and forward everything else verbatim
so OpenClaw parses it under its own grammar. The bare-launch default (the point
of this change) is preserved; explicit subcommands and global flags pass through.
|
@codex review |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
unsloth start openclaw.Root Cause
Current OpenClaw builds can route bare
openclawto Crestodian/setup mode.unsloth start openclawused the bare command, so a successful Unsloth model connection could still open Crestodian instead of the normal coding-agent TUI. Launchingopenclaw tui --localselects the expected main local agent directly.Validation
openclaw tui - local embedded - agent mainwith the Unsloth model.python -m py_compile unsloth_cli/commands/start.py unsloth_cli/tests/test_start.pygit diff --check