docs(skill): known gotcha — claude subcommands in -c are rewritten by flag injection - #1801
Conversation
… flag injection (asheshgoplani#1800) An agent that launches a session with -c "claude remote-control ..." (or any claude subcommand) gets a silently different program: injected --session-id/permission flags land before the subcommand tokens, demoting the subcommand to a positional arg of interactive claude. Document the symptom and the bash -c exec workaround in Known Gotchas so agents stop rediscovering it from a broken session. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
|
👋 Thanks for the contribution — intake looks complete. Your PR body carries everything the maintainer's validation pipeline reads first: the problem, the reasoning, the human intent behind it, and an AI-disclosure. It will be applied, built, and tested against gate marker read: ai= |
What problem does this solve?
An agent (or human) that creates a session with
-c "claude remote-control --name X"— or any claude subcommand — gets a silently different program: tool detection splits the command and re-appends the subcommand tokens after agent-deck's injected--session-id/permission flags, so the pane runs plain interactive claude withremote-controlas a positional arg. No server starts, and nothing tells you why. Filed with a sandboxed reproduction as #1800; this PR adds the corresponding Known Gotchas entry so skill-driven agents route around it today, on every released version, independent of when/how the code fix lands.Why this change
Docs-only, one new entry in the Known Gotchas section of
skills/agent-deck/SKILL.md, in the same symptom → workaround → issue format as the existing entries (#957, #966, etc.): what the rewrite looks like, thebash -c 'exec …'workaround, its trade-off (opaque to session-id tracking — fine for server-style subcommands with no conversation to resume), and the explicit note that extra flags (-c "claude --model opus") are unaffected so nobody over-applies the workaround.User impact
Agents loading the skill warn/work around instead of shipping a session that silently runs the wrong program. No behavior change; no code touched.
Evidence
Reproduced in a fully sandboxed environment (fresh
HOME, ownTMUX_TMPDIR, argv-loggingclaudeshim) on v1.10.10 — full transcript in #1800. Key capture:Mechanism verified on current
main(cmd/agent-deck/cli_utils.goresolveSessionCommandwrapper-suffix path +internal/session/instance.goflag injection) — details in #1800.Docs-only diff — no test changes; revert-check not applicable.
AI disclosure
Model(s), if AI helped: claude-fable-5
Prompt / session log (optional): —
What actually bothered you
My human asked: "I'm surprised how much is being rediscovered every time agent-deck gets invoked by an agent." This gotcha was the sharpest case: an agent burned a debugging cycle discovering the rewrite and inventing the
bash -cworkaround, and that knowledge lived nowhere but one transcript until #1800.Checklist
HOME=$(mktemp -d) XDG_CONFIG_HOME= XDG_DATA_HOME= XDG_CACHE_HOME= go test ./...— not run: docs-only diff, no Go changes (self-check: go-checks skipped)