arXiv(opens in a new tab)cs.CVSep 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2609.38008

HybridCUA: Learning to Orchestrate GUI and CLI for Computer-Use Agents

Tongbo Chen, Junbo Niu, Zhengxi Lu, Niu Lian, Fei Tang, Yuchen Yan, Yike Hong, Yong Du, Yizhou Liu, Bofan Chen, Yongliang Shen

ABSTRACT

Computer use agents (CUAs) have demonstrated strong capabilities in completing digital tasks. However, existing CUAs either rely solely on graphical user interface (GUI) interactions, which are often inefficient and error prone, or augment GUI interactions with application specific APIs or tools, which require substantial engineering effort and are difficult to scale across applications. We argue that the next generation of CUAs should combine GUI interactions with the command line interface (CLI), leveraging the generality of the GUI and the efficiency of shell commands. A critical challenge, however, is that current models do not know when or how to use the CLI during task execution. To address this challenge, we develop a data construction pipeline that produces three types of trajectories: GUI only, CLI only, and interleaved GUI and CLI trajectories. This pipeline results in HybridCUA-8K, containing 5K hybrid trajectories and 3K verified RLVR tasks. Building on these data, we propose a training framework with two stages: supervised fine tuning on the constructed trajectories, followed by reinforcement learning with our CLI aware rewards that encourages agents to use the CLI selectively and reliably. Experiments show that HybridCUA-9B achieves 53.6% accuracy on OSWorld, improving over the base model by 14.8 percentage points, and improves performance on WindowsAgentArena by 4.0 percentage points. These results demonstrate the effectiveness and cross platform generalizability of the hybrid GUI and CLI paradigm for computer use agents.

(a) GUI Only Actions

inefficient

error prone

Figure

(b) GUI-Tool Interleaved Actions

app-specific costly build

Figure

(c) GUI-CLI Interleaved Actions

efficient

generalizable

Figure

Figure 1: Comparison of GUI only, GUI-tool, and GUI-CLI interleaved actions. GUI only agents use low level clicks and keystrokes; GUI-tool agents invoke application specific tools; and GUI-CLI agents combine GUI interaction with general purpose shell commands.

∗^{*}Equal Contribution †^{\dagger} Corresponding Author

1 INTRODUCTION

Computer-use agents (CUAs) built on multimodal large language models (MLLMs) typically act through clicks and keystrokes on graphical user interfaces (GUIs)—general, but slow and prone to cascading errors over long action sequences (Qin et al., 2025; Wang et al., 2025b; Xue et al., 2026; Lu et al., 2026b). Application-specific APIs and tools speed things up, but only by sacrificing generality, as each must be built per application (Jia et al., 2025; Yang et al., 2025; Hu et al., 2026). Coding agents (OpenClaw Contributors, 2026; Claude Code Team, 2026; OpenAI, 2026) suggest a way out: the command-line interface (CLI), which ships with the operating system and can collapse a long GUI sequence into a single command. We therefore argue that next-generation CUAs should be hybrid, using the GUI for visual interaction and the shell for programmable operations (Figure 1). Neither interface suffices on its own, but together they pair the generality of the GUI with the efficiency of code.

Hybrid interaction, however, does not come for free: simply handing a capable MLLM a shell does not help, but in fact hurts. As shown in Figure 2a, once the CLI is exposed, all four representative agents lose 2.5 to 11.5 percentage points on OSWorld, indicating that they do not know how to turn shell access into effective actions. Some do not even recognize when to use it: Qwen3.5-27B (Qwen Team, 2026a) and EvoCUA-32B (Xue et al., 2026) route only 15.0% and 0.15% of their steps through the CLI (Figure 2b), grinding through long GUI sequences that a single command could replace. The bottleneck, in short, is not access to the shell but knowing when and how to use it.

We trace this deficit to two gaps in how current CUAs are trained. First, the data never shows what hybrid behavior looks like. GUI, shell, and code corpora are each abundant but siloed: CUA datasets contain almost exclusively GUI actions (Wu et al., 2024), whereas terminal and code datasets omit the GUI context in which commands are issued. Second, the supervision is blind to interface choice. Step-level imitation favors locally plausible actions, while outcome rewards merely check task completion (Lai et al., 2025); neither can tell a well-chosen interface from a successful but inefficient path.

We close both gaps with HybridCUA, a unified data and training framework for reliable GUI–CLI orchestration. Our key observation is that hybrid supervision need not be collected from scratch, since many GUI action sequences admit equivalent shell commands. Leveraging this, we construct a scalable pipeline spanning three execution schemas: GUI only trajectories converted from open-source datasets, CLI only trajectories sampled from strong models with an execution harness, and interleaved trajectories obtained by both free-form interface switching and GUI-to-CLI rewriting. The resulting 5,000 trajectories ground interface selection and command execution in GUI context. Beyond hybrid data construction, we further make interface choice an explicit training signal.

(a) Accuracy on OSWorld

Figure

(b) CLI step share

Figure 2: The GUI–CLI orchestration problem. (a) Adding CLI interface to existing agents reduces OSWorld accuracy, whereas the trained HybridCUA-9B improves over its GUI only counterpart. (b) CLI step share varies substantially across existing agents; HybridCUA learns to use the CLI selectively rather than merely maximizing command usage.

Following supervised fine-tuning (SFT), we perform reinforcement learning with verifiable rewards (RLVR) in a live dual-interface environment, with two CLI-aware rewards mirroring the two missing abilities: a task-level reward RCLIR_{CLI} that teaches when to invoke the CLI, and an action-level reward RexecR_{exec} that teaches how, using terminal feedback to improve command reliability.

The resulting HybridCUA-9B reaches 53.6% on OSWorld, 14.8 percentage points above its base model and the best among comparably sized models. Notably, it uses the CLI for 64.0% of its steps, on par with the most CLI-heavy baseline, yet gains where that baseline loses (Figure 2), confirming that the improvement comes from knowing when and how to use the shell rather than from using it more. The gains carry over to Windows: on WindowsAgentArena, HybridCUA-9B reaches 36.0%, a 4.0-point improvement over the base model.

Our main contributions are summarized as follows:

• We develop a scalable data generation pipeline and construct HybridCUA-8K, comprising 5,000 GUI only, CLI only, and interleaved trajectories together with 3,000 verified RLVR tasks, each labeled by whether CLI use offers a clear execution advantage.

• We propose a two-stage training framework that performs SFT on the 5,000 trajectories, followed by RLVR on the 3,000 verified tasks with CLI-aware rewards that separately target routing and execution errors.

• We train HybridCUA-9B, which achieves 53.6% on OSWorld, improving over the base model by 14.8 percentage points. We will release the trajectories, RLVR tasks, data generation and training pipelines, and the HybridCUA-9B model.

References (77)