[BUG] remote-control rejects --agent, --append-system-prompt and --settings, so server-spawned sessions cannot be given a role at launch

Status Open
Reported on v2.1.227
Maintainer reply None cached
Activity 2 comments · opened Aug 13, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

claude remote-control rejects every flag that could give the sessions it
spawns a role or a system prompt:

--agent -> Error: Unknown argument: --agent
--append-system-prompt -> Error: Unknown argument: --append-system-prompt
--settings -> Error: Unknown argument: --settings

The interactive form accepts all of them
(claude --remote-control "<name>" --agent <x> validates the agent name
and starts normally).

So a session spawned by a server can only be shaped from inside the
session, while an interactively started one can be shaped at launch. For a
setup with several standing roles on one repository (docs, bugs,
marketing, code) this difference determines the entire architecture, and
it is not mentioned in remote-control --help.

What Should Happen?

Either remote-control accepts --agent / --append-system-prompt /
--settings and passes them to spawned sessions, or the help text states
that spawned sessions cannot be pre-configured and points to the
alternative (slash commands under .claude/commands/, which do work).

Error Messages/Logs

claude remote-control --agent doku --name "X"
  Error: Unknown argument: --agent
  Run 'claude remote-control --help' for usage.

claude remote-control --append-system-prompt "TEST" --name "X"
  Error: Unknown argument: --append-system-prompt

claude remote-control --settings '{"agent":"x"}' --name "X"
  Error: Unknown argument: --settings

Contrast, same build, same directory:
claude --remote-control "TEST" --agent nicht-existent -p "hi"
  --agent 'nicht-existent' not found. Available agents: claude,
  claude-code-guide, doku, Explore, general-purpose, Plan, statusline-setup
(i.e. the flag is parsed and the agent list resolved)

Steps to Reproduce

  1. Define an agent in .claude/agents/<name>.md in a repository.
  2. Run: claude remote-control --spawn=same-dir --agent <name>

-> Error: Unknown argument: --agent

  1. Run: claude --remote-control "test" --agent <name>

-> accepted, agent resolved.

Environment: Windows 11 Pro 26200, Claude Code 2.1.227 native build.

Claude Model

Not sure / Multiple models

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.1.227 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

This is arguably a feature gap rather than a defect, but it is invisible
until you hit it: remote-control --help lists only its own options, and
nothing says that the globally documented flags do not apply here. Three
separate attempts were needed to establish which of them the server
accepts.

Working alternative for anyone finding this issue: put the roles in
.claude/commands/ and invoke them as the first message of each session.
That works through server-spawned sessions.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗