Repository navigation
fix(native-chat): chats ignore saved Arguments; they are for terminal launches - #26506
Draft
brennanb2025 wants to merge 7 commits into
Draft
brennanb2025 wants to merge 7 commits into
brennanb2025 wants to merge 7 commits into
Conversation
… launches Settings -> Agents -> Arguments holds a terminal launch's options, but native chat tried to apply them too: Claude squeezed them into the SDK's one-value-per-option record (dropping some flags silently and refusing a chat over a valid repeat), and Codex placed them before `app-server`, where Codex ignores most of them. A user could not tell which saved option did anything in a chat. Native chat now ignores saved Arguments for every agent: Codex chat runs plain `app-server`, and Claude chat gets only Orca's own options. The Command setting still picks the program, and Agent Permissions' posture (which it keeps in the Arguments field) is still read for the chat's permissions. Removed with it: the Claude and Codex Arguments translators, the configured-Arguments reader, the host-side Arguments refusal and its error class, the runtime's Arguments resolver, the pinned launch-arguments helper, and the record's never-launched `launchArgs` field and its carry-through. The shared reader and copy for an Arguments refusal stay, so a chat on an older host still words one it sends.
… Arguments in the launch
This was referenced Oct 8, 2026
Closed
…hem, and where their settings go
…and the updated native chat doesn't
…g; cover older hosts' rows and records
9 tasks done
…es use them, native chat does not
…only start Fast no longer needs
Contributor
Author
|
Merge-order note: #26116 (per-chat permission modes) is merged as 2233fd3. It was rebuilt before merging: the mode is now a chat option applied at launch, so live Claude switching and the old Codex per-turn overrides are gone, and permission flags typed into Arguments are still stripped. This PR was written against the earlier version of #26116, so check it against current main before taking it out of draft. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
Settings → Agents → Arguments holds the command-line flags your terminal tabs (and the default, terminal-backed chat) start an agent with. The updated (structured) native chat (Settings → Experimental → "Use updated structured native chat") also tried to reuse them: it guessed, flag by flag, which ones a Claude or Codex chat could use. That went wrong in confusing ways:
Now the updated (structured) native chat doesn't read Arguments at all. They apply to terminal tabs and terminal-backed chats, as before. The program path (Command) and the agent's environment settings still apply to chats.
What Changed
Before: the updated (structured) native chat translated your terminal Arguments per agent.
app-server, where Codex ignores most options.Some results:
--osssilently used the cloud provider;-mdid nothing;--disallowedToolswas dropped;--mcp-config a.json b.jsonrefused the chat with "give --mcp-config more than one value".After:
codex app-server.~/.claudesettings and.mcp.json, and~/.codex/config.toml.Settings → Agents: each agent that has native chat now shows one line under its Arguments field, in all 6 languages:
~/.codex/config.toml,~/.grok/config.tomland~/.config/opencode/opencode.json.Unchanged:
Mechanism: this removes the per-agent translators (
claude-structured-launch-args.ts,codex-structured-launch-args.ts), the shared reader that fed them, the Arguments-only error type and its emitters, and the runtime plumbing that carried Arguments into chat. That includes alaunchArgsfield on chat records, which current builds no longer write (builds before #20944 did). The Codex model-list probe already ignored Arguments; a test now pins that.Why
The common pattern is a per-agent program-path setting for chat, with no reuse of a terminal arguments field. Agent CLIs keep their real configuration in their own config files, which chats already load. Translating terminal flags into a chat session needs per-CLI tables that drift with every CLI release, and it fails in ways users can't see. Ignoring them is the standard behavior and the simplest.
Differences from the common pattern:
Linked Issue
Merge order: after #26116 (chat permission setting). Then the Settings line is exactly true, because the chat reads its own permission setting instead of the Agent Permissions flag kept in Arguments.
Supersedes #26059 (Codex), #26127 (Claude) and #26367 (Grok). It reverses the Arguments half of #25721; the Command half stays.
Visual Proof
QA ran on Windows (low spec), driven by a non-Claude agent over the DevTools protocol against a hidden window, with stand-in CLIs. The box's real agent configs were unchanged at every step.
Settings → Agents: the new line under Arguments (untouched profile). Agents with native chat get the line; Gemini, which has none, gets nothing:




The updated chat ignores saved Arguments.
-m qa-x -c foo.bar=1 --profile work --ossstarts as exactlyapp-serverand replies. Before,--profileand--osswere refused or silently changed what ran.--mcp-config a.json --worktree feat --append-system-prompt "- x"starts and replies, and none of those reach the CLI.Permissions still follow Agent Permissions. Untouched Arguments give full access; Manual gives on-request / workspace-write:


With the updated chat toggle off, the terminal-backed chat still launches with the saved Arguments (verified from the launch command line; the terminal tab itself wasn't captured).
Testing
app-serverwith non-empty saved Arguments;orca-ci-checks: CI's lint, code-quality, localization and typecheck steps, 23/23 pass.app-serverdespite saved-m qa-x -c foo.bar=1 --profile work --oss, and a Claude chat's launch carried none of--mcp-config a.json --worktree feat --append-system-prompt "- x". Both replied. Permissions still followed Agent Permissions. With the toggle off, the terminal-backed chat still launched with the saved Arguments. See Visual Proof.Review
Pending.
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
launchArgsrecord field is dropped. Old records that carry it are read without it; native chat has no real users yet.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)