A self-improving RLM agent for coding workflows and long-running autonomous tasks.
Rust
[RSI] Hard-error invalid --thinking; stop referencing nonexistent --no-daemon (#2240)
Seth Karten292a3eb35a33
diff --git a/packages/coding-agent/.changes/eng-6095-thinking-and-agents-view-messages.md b/packages/coding-agent/.changes/eng-6095-thinking-and-agents-view-messages.mdnew file mode 100644index 0000000000..1c8d81ca82--- /dev/null+++ b/packages/coding-agent/.changes/eng-6095-thinking-and-agents-view-messages.md@@ -0,0 +1,2 @@+- Fixed an invalid `--thinking` level being only a warning while the launch continued with the default level; it is now a hard error listing the valid values, matching `--mode` strictness.+- Fixed the agents-view hint telling users to start "without --no-daemon" - a flag the CLI does not recognize; the hint now names the real condition (a daemon-hosted session; start normally without `--no-session`).diff --git a/packages/coding-agent/src/cli/args.ts b/packages/coding-agent/src/cli/args.tsindex fed99107ef..d35576304b 100644--- a/packages/coding-agent/src/cli/args.ts+++ b/packages/coding-agent/src/cli/args.ts@@ -171,7 +171,7 @@ export function parseArgs(args: string[]): Args {result.thinking = level;} else {result.diagnostics.push({- type: "warning",+ type: "error",message: `Invalid thinking level "${level}". Valid values: ${THINKING_LEVELS.join(", ")}`,});}diff --git a/packages/coding-agent/src/modes/interactive/interactive-mode.ts b/packages/coding-agent/src/modes/interactive/interactive-mode.tsindex 340ccdd628..2698e06ecb 100644--- a/packages/coding-agent/src/modes/interactive/interactive-mode.ts+++ b/packages/coding-agent/src/modes/interactive/interactive-mode.ts@@ -6082,7 +6082,9 @@ export class InteractiveMode {private async openScopedAgentsView(): Promise<void> {if (!this.options.returnToAgentsView) {this.focusEditor();- this.showStatus("The agents view needs the daemon; start without --no-daemon to browse sessions");+ this.showStatus(+ "The agents view needs a daemon-hosted session; start normally (without --no-session) to browse sessions",+ );return;}await this.returnToAgentsView("scoped_agents_view");@@ -6973,7 +6975,9 @@ export class InteractiveMode {private async requestAgentsView(): Promise<void> {if (!this.options.returnToAgentsView) {- this.showStatus("The agents view needs the daemon; start without --no-daemon to browse sessions");+ this.showStatus(+ "The agents view needs a daemon-hosted session; start normally (without --no-session) to browse sessions",+ );return;}await this.returnToAgentsView();diff --git a/packages/coding-agent/test/args.test.ts b/packages/coding-agent/test/args.test.tsindex b1674d2f46..4aa4ae0f9f 100644--- a/packages/coding-agent/test/args.test.ts+++ b/packages/coding-agent/test/args.test.ts@@ -231,6 +231,15 @@ describe("parseArgs", () => {expect(result.thinking).toBe("high");});+ test("rejects an invalid --thinking level as a hard error", () => {+ const result = parseArgs(["--thinking", "hig"]);+ expect(result.thinking).toBeUndefined();+ expect(result.diagnostics).toContainEqual({+ type: "error",+ message: 'Invalid thinking level "hig". Valid values: off, minimal, low, medium, high, xhigh, max',+ });+ });+test("parses --models as comma-separated list", () => {const result = parseArgs(["--models", "gpt-4o,claude-sonnet,gemini-pro"]);expect(result.models).toEqual(["gpt-4o", "claude-sonnet", "gemini-pro"]);diff --git a/packages/coding-agent/test/interactive-mode-startup.test.ts b/packages/coding-agent/test/interactive-mode-startup.test.tsindex f3617c4153..4f7186abb2 100644--- a/packages/coding-agent/test/interactive-mode-startup.test.ts+++ b/packages/coding-agent/test/interactive-mode-startup.test.ts@@ -581,7 +581,9 @@ describe("InteractiveMode startup hints", () => {await Reflect.get(InteractiveMode.prototype, "requestAgentsView").call(mode);- expect(showStatus).toHaveBeenCalledWith(expect.stringContaining("needs the daemon"));+ expect(showStatus).toHaveBeenCalledWith(+ expect.stringContaining("needs a daemon-hosted session"),+ );expect(shutdown).not.toHaveBeenCalled();});