warp icon indicating copy to clipboard operation
warp copied to clipboard

Support custom commands/wrappers for Third-Party CLI Agents (e.g. Claude Code)

Open Alorse opened this issue 9 months ago • 6 comments

Pre-submit Checks

Describe the solution you'd like?

I’d like Warp to treat custom commands/wrappers that ultimately invoke a supported Third-Party CLI Agent (e.g. Claude Code) as agent sessions, so the utility bar (agent icon, File Explorer, View Changes, etc.) is enabled. Ideally, I could configure additional command patterns or binaries per agent (for example ‎cc-kimi, ‎cc-glm, etc.) so Warp recognizes them the same way it recognizes the official ‎claude CLI.

https://docs.warp.dev/agent-platform/agent/using-agents/third-party-cli-agents#supported-cli-agents

Is your feature request related to a problem? Please describe.

Warp correctly detects Claude Code when I run the official ‎claude command and shows the agent utility bar. However, I use multiple wrapper commands that call the same Claude Code CLI with different preselected models (not only Anthropic models), such as ‎cc-kimi and ‎cc-glm. When I run these custom commands in Warp, the agent utility bar does not appear and I lose integrated features like the agent icon, File Explorer, and View Changes, even though they are still Claude Code sessions under the hood.

Additional context

From my perspective, the only difference is the entrypoint command name; the underlying CLI and workflow remain the same. Allowing users to register additional commands/wrappers for each supported agent would make Warp more flexible for advanced setups that rely on multiple preconfigured agent entrypoints.

Image

Operating system (OS)

macOS

How important is this feature to you?

4

Warp Internal (ignore) - linear-label:39cc6478-1249-4ee7-950b-c428edfeecd1

None

Alorse avatar Feb 05 '26 22:02 Alorse

Docs says it supports third party cli agents out of the box here https://docs.warp.dev/agent-platform/local-agents/third-party-cli-agents but that doesn't seem to be working

tried with opencode today

jzrbsv avatar Feb 12 '26 02:02 jzrbsv

Can we please add the support for this cli agent as well? It's currently at no.2 in TermBench 2.0.

Official site: https://forgecode.dev/ Repo: https://github.com/tailcallhq/forgecode

smk87 avatar Apr 12 '26 10:04 smk87

I’d like to add another concrete use case for this feature request:

Please support detecting omc and omx as third-party CLI agent wrappers in Warp.

Context:

  • omc is used as an entrypoint for an Oh My ClaudeCode / Claude Code-oriented workflow.
  • omx is used as an entrypoint for an Oh My Codex / OpenAI Codex CLI-oriented workflow.
  • Under the hood, these commands are wrappers/orchestration layers around existing supported agent CLIs, but Warp currently treats them as normal shell commands.

Current behavior: When I run:

omc

or:

omx

Warp does not show the corresponding agent icon/status in the tab or vertical tab UI, unlike when launching the underlying agents directly with:

claude

or:

codex

Expected behavior: Warp should recognize these wrapper entrypoints as agent sessions and show the same tab/vertical-tab agent indicator as the underlying CLI agent.

Suggested mapping:

  • omc → Claude Code agent session / Claude-style tab icon
  • omx → Codex agent session / Codex-style tab icon

More generally, I think this would be best solved by allowing users to configure custom command aliases or wrapper binaries per supported agent type, for example:

{
  "claude": ["claude", "omc", "cc-kimi", "cc-glm"],
  "codex": ["codex", "omx"]
}

Why this matters: Many users do not launch the raw claude or codex binaries directly. They use wrapper commands to select models, profiles, orchestration layers, prompts, or project-specific defaults. From Warp’s perspective, the command name changes, but the session is still effectively a Claude Code or Codex CLI agent workflow.

This would make Warp’s third-party CLI agent integration much more useful for advanced users who rely on wrappers.

cristph avatar Apr 23 '26 03:04 cristph

+1. Custom wrapper detection would make Warp usable with alternative CLI agents like cc-kimi/cc-glm while native provider support catches up.

cedric-albeke avatar Apr 29 '26 10:04 cedric-albeke

Thanks for raising this. @zachlloyd started a discussion for BYO LLM support across BYOK, arbitrary OpenAI-compatible endpoints, local model support, and ACP. Here's the latest update: https://github.com/warpdotdev/warp/discussions/9619#discussioncomment-16831279

bholmesdev avatar May 06 '26 21:05 bholmesdev

Edit: Correcting my earlier analysis. After reading the code more carefully, the OSC 777 path in CLIAgentSessionsModel::register_listener (app/src/terminal/cli_agent_sessions/mod.rs) does create a session via set_session when none exists — so a healthy plugin emitting session_start would in fact light up the tab icon / agent footer / rich input regardless of how the command was launched. My claim that "plugin events get dropped" was wrong; sorry for the noise.

In my actual setup the icon was missing because of a separate upstream issue: Claude Code 2.1.139 spawns hooks without a controlling TTY, so scripts/warp-notify.sh's printf … > /dev/tty fails with ENXIO and the OSC 777 bytes never reach the PTY — see warpdotdev/claude-code-warp#36, warpdotdev/claude-code-warp#38, and warpdotdev/warp#10715. Downgrading to 2.1.138 (or fixing the plugin) restores the integration for claude-<profile> wrappers without any Warp-side change.

That said, the original ask in this issue is still valid. The plugin-driven path requires:

  • the plugin to be installed for the agent
  • a Claude/plugin combination where hook→PTY delivery works

Until both are true everywhere, command-name detection is the only mechanism that lights up Warp's CLI-agent UI on first command run. For users of multi-account / wrapper setups (claude-personal, claude-work-team, cc-kimi, omc, …), command-name detection is what they're hitting first. The cleanest fix is still either:

  1. Config-driven prefixes per agent (claude-*, cc-*, etc.) — extends the hardcoded allowlist in cli_agent.rs.
  2. Detect from preexec command + persist on Block (the sketch in #9870) — works for any wrapper without configuration.

Either also keeps Warp working before the first plugin event, which still matters even on healthy plugin setups.

fprochazka avatar May 12 '26 16:05 fprochazka