Skip to content

feat(agents): add Qwen Code to the catalog and open it as an ACP child - #4453

Merged
devswha merged 6 commits into
devswha:mainfrom
mckinnon:feat/qwen-code
Nov 27, 2026
Merged

devswha merged 6 commits into
devswha:mainfrom
mckinnon:feat/qwen-code

Conversation

@mckinnon

@mckinnon mckinnon commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Change

Qwen Code joins Settings → Agents and the setup guide, and its panes are recognized. (1) Catalog entry with Qwen's install script, npm and Homebrew commands, qwen --version detection and /auth; no usage provider, because Qwen has no plan-usage source. (2) Fix: Qwen reports itself as qwen-code, which Ovis did not map, so its panes showed the raw name and its input-row recognizer never ran; now mapped to qwen and labelled "Qwen Code". The fix stands alone and can be split out. Not done: clean-PC install runs.

Validation

identity, routes and catalog tests pass; with the fix reverted its two tests fail. check fast: all non-test steps ok; unit tests 22,231 pass, 10 fail: the 9 machine-specific ones plus one in server/file-routes.test.ts that passes alone; two other files gave no result and pass alone. check full skipped. No HTTP or WebSocket shape changes. Tested live.

Maintainer rework (ACP child)

Qwen Code 0.28.7 speaks ACP (qwen --acp), so ovis agent can now start it as a child, the same way it starts Gemini CLI (#4861):

  • resolveHarness("qwen") runs qwen --acp --approval-mode default --exclude-tools agent. Without the flag, Qwen's ACP sessions open in auto (a model approves actions), or in the approval mode the person saved (recorded: with tools.approvalMode: yolo saved, the session opened in yolo; with the flag, in default). A child must report default; auto-edit, auto and yolo stop the start.
  • Qwen's agent tool starts a subagent in auto-edit in a trusted folder (every folder unless folder trust is on), so one approved launch would let later edits run unasked. The child runs without that tool (recorded: with --exclude-tools agent the model finds no agent tool).
  • Every turn, Qwen asks the client craft/drainMidTurnQueue. The keeper held that request as pending, so the next task was refused as busy (recorded with the real binary). The keeper now answers every agent request that is not a permission or a question with Method not found at once, as it already did for fs/* and terminal/* (crates/acp-keeper/src/hub.rs, with a unit test). Qwen then stops asking for the rest of the session.
  • Qwen Code is in ACP_LAUNCH_HARNESSES and AGENT_DISPLAY_NAMES. The docs list it with the other harnesses' defaults.

Nothing writes Qwen's own settings or hooks; Ovis only passes launch arguments.

Other channels checked (no change here)

Qwen Code also has hooks (SessionStart, Stop, PermissionRequest ...), --session-id, and --json-file (JSON events while the TUI draws). Adding them to a person's pane would need QWEN_CODE_SYSTEM_SETTINGS_PATH or a transcript reader, so they are left for a later change. This PR adds no screen reading: the existing input-row recognizer only checks the chat send's draft.

Evidence

  • Recorded real-CLI fixtures server/agent-tools/fixtures/qwen-0.28.7-ask-{write,mkdir}.jsonl: a cheap model through a proxy, in an isolated HOME. Each run is a file write or a shell mkdir, and every request was refused. Both asked before acting, and no file was made.
  • child.contract.test.ts replays them through the real keeper. On main's harnesses.ts, 11 of the 13 Qwen cases fail; here, all pass. The replay now asks recorded extension requests again, so the second-turn step covers the keeper fix.
  • An uncommitted end-to-end run used the real keeper, the hub and the real qwen 0.28.7. The child started in default and got a one-time card for mkdir d1. It took the refusal, made no folder, and accepted and finished a second task. Before the keeper fix, that second task was refused as busy.
  • Supply chain: no dependency, lockfile or workflow changes. The install commands match QwenLM/qwen-code's README, and @qwen-code/qwen-code points at QwenLM/qwen-code.
  • bun test server/agent-tools server/acp and the identity, routes, catalog and Settings tests pass. Typecheck and the convention tests pass. The keeper's cargo test, cargo fmt --check and clippy -D warnings pass.

Reviews

omo gate: CLEAR on the first rework commit. Codex (gpt-6.2-sol-fast, xhigh), one round; fixed in b5d9420:

  • HIGH, the subagent auto-edit path: fixed (--exclude-tools agent).
  • MEDIUM, the second task refused as busy: fixed in the keeper.

Left as they are:

  • HIGH, Qwen's own .env loading: Qwen reads the working folder's .env (e.g. OPENAI_BASE_URL) in a trusted folder. It does the same when a person starts it there, Gemini CLI children have the same property, and no launch flag turns it off. Recorded in docs/harness-tool.md.
  • LOW, pre-existing for every harness: resolveHarness reads the server's PATH, while the catalog also looks in install folders.

UI

The setup guide's install tiles gain Qwen Code (from the catalog). Before / after, desktop and phone:

Before After
before after
before phone after phone

Once installed, Qwen Code also appears under Agents they may call.

mckinnon and others added 2 commits November 22, 2026 01:55
Qwen Code joins the install catalog with Qwen's own commands for macOS,
Linux and Windows (standalone script, npm and Homebrew), its binary and
version flag, and its in-agent /auth sign-in. It has no usage provider:
Qwen Code exposes no plan-usage source.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Qwen Code reports app=qwen-code over OSC 7501. Map it to the existing qwen
agent in REPORTED_NAMES, as kimi-code and claude-code are mapped, and label
the qwen kind "Qwen Code" in AGENT_LABELS, so a Qwen pane is named and its
draft recognizer runs.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: devswha/ovis
  • Branch: main
  • File: .coderabbit.yaml
  • Commit: 5d88dc9
  • Layers: Repository YAML
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 62b38014-909e-45b5-b200-29807dd239e5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • New Features
    • Qwen Code is now available to install from Settings → Agents on macOS, Linux, and Windows. Sign in by opening Qwen Code and running /auth.
  • Bug Fixes
    • Panes running Qwen Code are now labeled correctly, including when the foreground process is qwen-payg, and Qwen draft reading runs as expected.

Qwen Code is added to the agent catalog with platform-specific installation and sign-in details. Server mappings identify its status reports as Qwen and display the label “Qwen Code.”

Changes: Qwen Code support

Layer / File(s) Summary
Qwen Code installation catalog
shared/agent-catalog.ts, changelog.d/qwen-code-agent-catalog.md
The approved install commands and catalog entry describe platform-specific installation, prerequisites, binary detection, sign-in, and PATH guidance. The changelog documents installation and sign-in.
Status identity and display label
server/agent-identity.ts, server/agent-identity.test.ts, server/agents-routes.ts, server/agents-routes.test.ts, changelog.d/qwen-code-status-report.md
The server maps qwen-code to qwen and assigns the display label Qwen Code. Tests cover status identity and machine-specific agent listings. The changelog describes the reported pane-name and draft-reading effects.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature · Severity of issue fixed: Low

Suggested reviewers: devswha

Merge Risk: Minimal · previous review 7c4cc

This adds Qwen Code to the agent catalog and fixes recognition of its status report so panes show the proper label. No concrete merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description follows the template's Change and Validation sections and gives substantial detail. The Change section explains the catalog entry, the qwen-code to qwen fix, and the deliberate omissio…
Title check Passed The title names two changes: adding Qwen Code to the agent catalog and opening it as an ACP child. The catalog addition is the main change in the changeset (shared/agent-catalog.ts, install commands, …
Full details: Description check

Explanation

The description follows the template's Change and Validation sections and gives substantial detail. The Change section explains the catalog entry, the qwen-code to qwen fix, and the deliberate omission of a usage provider. The Validation section lists the tests run, their results, the failures, and the skipped check full. The description also covers extra scope (the ACP child rework, UI screenshots, and review notes), which goes beyond the template but does not make the required sections incomplete. The Change section does not link a maintainer-agreed issue, which the template asks for on features. The PR objectives mention PR #4453 but the description does not reference an issue.

Full details: Title check

Explanation

The title names two changes: adding Qwen Code to the agent catalog and opening it as an ACP child. The catalog addition is the main change in the changeset (shared/agent-catalog.ts, install commands, sign-in metadata, and the Settings → Agents entry). The ACP child part is not clearly reflected in the file summaries, which describe only the catalog, a status-report name mapping (qwen-code to qwen), and a label. The title is specific and accurate for the catalog work, but the second clause is not supported by the summarized changes, so it is partially related.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: devswha/ovis
  • Branch: main
  • File: .coderabbit.yaml
  • Commit: e16802a
  • Layers: Repository YAML
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b3282df9-6045-4f71-8c91-1f75792743b3
Commits

Reviewing files that changed from the base of the PR and between e16802a and 7c4cc8f.

Files selected for processing: 7

  • changelog.d/qwen-code-agent-catalog.md
  • changelog.d/qwen-code-status-report.md
  • server/agent-identity.test.ts
  • server/agent-identity.ts
  • server/agents-routes.test.ts
  • server/agents-routes.ts
  • shared/agent-catalog.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.

devswha and others added 3 commits November 27, 2026 23:20
…oval mode

qwen --acp opens sessions in auto (a model approves actions) or in the
approval mode the person saved; --approval-mode default outranks both, so a
child starts where every edit and command asks. Recorded real 0.28.7 runs
(a file write and a shell mkdir, both refused) replay through the keeper in
the contract test.

Co-authored-by: Jay McKinnon <[email protected]>
…task deliverable

Review follow-up (Codex, reproduced with Qwen Code 0.28.7):
- Its agent tool starts a subagent in auto-edit in a trusted folder, so one
  approved launch let later edits run unasked. The child starts with
  --exclude-tools agent.
- Each turn it asks the client craft/drainMidTurnQueue. The keeper held that
  request as pending, so the next task was refused as busy. The keeper now
  answers every agent request that is not a permission or a question with
  Method not found at once, as it did for fs/* and terminal/*. The replay
  asks recorded requests of this kind again, so the second-turn step of the
  contract test covers it.
@devswha devswha changed the title Feat/qwen code feat(agents): add Qwen Code to the catalog and open it as an ACP child Nov 27, 2026
# Conflicts:
#	docs/harness-contract.md
#	docs/harness-tool.md
#	server/agent-tools/child.contract.test.ts
#	server/agent-tools/harnesses.test.ts
#	server/agent-tools/harnesses.ts
#	server/agent-tools/hub.test.ts
#	shared/agent-catalog.ts
#	shared/agent-names.ts
#	shared/harness-tool.ts
#	src/components/AgentCallsRows.test.tsx
@devswha
devswha merged commit b420bd9 into devswha:main Nov 27, 2026
22 checks passed
@devswha

devswha commented Nov 27, 2026

Copy link
Copy Markdown
Owner

Merged through pr-merge at head 11ee88c98. Seen before the merge was asked for: required checks green, no unresolved thread, no conflict, no hold, main not red, no release in progress. CodeRabbit said it did not review (a limit or a skip) since this head.

main moved but untouched: merged without update. Its new commits up to 3a200318c change no file of this pull request, none imported by one, nothing that decides which checks run, and no core path.

External feature PR; maintainer go in the Dori session 2026-11-27; reworked to ACP/hooks by the maintainer side; reviews: omo gate + Codex

@devswha

devswha commented Nov 27, 2026

Copy link
Copy Markdown
Owner

Thank you, @mckinnon, for Qwen Code! It is merged. The catalog entry and the qwen-code name fix are yours. The maintainer side added the following on your branch:

  • ovis agent can start Qwen Code as an ACP child, proven with recorded real 0.28.7 runs in the contract test. It runs qwen --acp --approval-mode default --exclude-tools agent. Qwen's ACP sessions otherwise open in auto or in the saved approval mode, and its subagent tool runs in auto-edit.
  • The ACP keeper now answers an agent's own extension requests (Qwen's craft/drainMidTurnQueue) at once, so a Qwen child's second task is no longer refused as busy.

The PR description lists the reviews and the evidence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants