[PR #33] [MERGED] feat: expand handoff auto-approval defaults to more CLIs #33

Closed
opened 2026-03-04 01:39:21 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/yigitkonur/cli-continues/pull/33
Author: @yigitkonur
Created: 3/3/2026
Status: Merged
Merged: 3/3/2026
Merged by: @yigitkonur

Base: mainHead: feat/handoff-default-flags-more-clis


📝 Commits (3)

  • 8883907 feat(handoff): add default autonomy flags for more CLIs
  • fea3f46 fix(handoff): consume approval-mode passthrough for droid/amp/opencode
  • 360cafd fix(handoff): remove implicit unsafe defaults and align tests

📊 Changes

3 files changed (+524 additions, -11 deletions)

View changed files

📝 src/__tests__/forward-flags.test.ts (+193 -1)
📝 src/parsers/registry.ts (+276 -5)
📝 src/utils/resume.ts (+55 -5)

📄 Description

Summary

  • Add default handoff init flags for additional CLIs: amp, kiro, crush, qwen-code (plus prior cursor/droid/kimi support)
  • Expand forwarding mappers so --yolo/auto-approve style flags map to each CLI's documented equivalents
  • Consume unsupported approval/sandbox flags for tools that do not support them to avoid invalid passthrough
  • Wire mapHandoffFlags for amp/kiro/crush/kimi adapters
  • Extend forward-flags tests for new mappings/defaults and command preview behavior

Verification

  • pnpm exec biome check src/parsers/registry.ts src/utils/resume.ts src/__tests__/forward-flags.test.ts
  • pnpm test -- src/__tests__/forward-flags.test.ts
  • pnpm build

Notes

  • Full repo check remains red due to pre-existing, unrelated Biome issues in other files
> continues@4.0.9 lint
> biome check src/

The number of diagnostics exceeds the limit allowed. Use --max-diagnostics to increase it.
Diagnostics not shown: 190.
Checked 66 files in 114ms. No fixes applied.
Found 56 errors. Found 29 warnings. Found 125 infos.
ELIFECYCLE  Command failed with exit code 1.

Greptile Bug Review — Carmack Lens 🔬

Both reported issues are real, reproducible divergences — not style nits. Apply both.

# File Bug Fix
1 src/utils/resume.ts getDefaultHandoffInitArgs('qwen-code') emits ['--yolo'] but mapGeminiFlags (which qwen-code reuses) emits ['--approval-mode', 'yolo'] — two code paths, different CLI syntax for identical intent Change default to ['--approval-mode', 'yolo'] to match mapper output
2 src/parsers/registry.ts mapDroidFlags and mapAmpFlags never check approvalMode === 'yolo', so forwarding --approval-mode yolo passes through unmapped to each target instead of converting to its native flag (--skip-permissions-unsafe / --dangerously-allow-all) Add the same approvalMode guard that mapKimiFlags, mapKiroFlags, and mapCrushFlags already have

Verdict: Merge-block until both are patched. Bug 1 causes silent behavioral divergence depending on whether the user supplies explicit forwarding args. Bug 2 silently passes an unrecognized flag to the child CLI, which either errors out or ignores it entirely. Both are one-liner fixes — no design debate needed.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/yigitkonur/cli-continues/pull/33 **Author:** [@yigitkonur](https://github.com/yigitkonur) **Created:** 3/3/2026 **Status:** ✅ Merged **Merged:** 3/3/2026 **Merged by:** [@yigitkonur](https://github.com/yigitkonur) **Base:** `main` ← **Head:** `feat/handoff-default-flags-more-clis` --- ### 📝 Commits (3) - [`8883907`](https://github.com/yigitkonur/cli-continues/commit/88839075938ffcb5f1d4e4e91e48e67c113d1aab) feat(handoff): add default autonomy flags for more CLIs - [`fea3f46`](https://github.com/yigitkonur/cli-continues/commit/fea3f462d113554abcc3b6699965adbbddf3d7cd) fix(handoff): consume approval-mode passthrough for droid/amp/opencode - [`360cafd`](https://github.com/yigitkonur/cli-continues/commit/360cafdad01a52cc0bd687593661f9961cd25406) fix(handoff): remove implicit unsafe defaults and align tests ### 📊 Changes **3 files changed** (+524 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `src/__tests__/forward-flags.test.ts` (+193 -1) 📝 `src/parsers/registry.ts` (+276 -5) 📝 `src/utils/resume.ts` (+55 -5) </details> ### 📄 Description ## Summary * Add default handoff init flags for additional CLIs: `amp`, `kiro`, `crush`, `qwen-code` (plus prior `cursor`/`droid`/`kimi` support) * Expand forwarding mappers so `--yolo`/auto-approve style flags map to each CLI's documented equivalents * Consume unsupported approval/sandbox flags for tools that do not support them to avoid invalid passthrough * Wire `mapHandoffFlags` for `amp`/`kiro`/`crush`/`kimi` adapters * Extend `forward-flags` tests for new mappings/defaults and command preview behavior ## Verification * `pnpm exec biome check src/parsers/registry.ts src/utils/resume.ts src/__tests__/forward-flags.test.ts` * `pnpm test -- src/__tests__/forward-flags.test.ts` * `pnpm build` ## Notes * Full repo check remains red due to pre-existing, unrelated Biome issues in other files ```sh > continues@4.0.9 lint > biome check src/ The number of diagnostics exceeds the limit allowed. Use --max-diagnostics to increase it. Diagnostics not shown: 190. Checked 66 files in 114ms. No fixes applied. Found 56 errors. Found 29 warnings. Found 125 infos. ELIFECYCLE Command failed with exit code 1. ``` --- ## Greptile Bug Review — Carmack Lens 🔬 Both reported issues are **real, reproducible divergences** — not style nits. Apply both. | # | File | Bug | Fix | |---|------|-----|-----| | 1 | `src/utils/resume.ts` | `getDefaultHandoffInitArgs('qwen-code')` emits `['--yolo']` but `mapGeminiFlags` (which `qwen-code` reuses) emits `['--approval-mode', 'yolo']` — two code paths, different CLI syntax for identical intent | Change default to `['--approval-mode', 'yolo']` to match mapper output | | 2 | `src/parsers/registry.ts` | `mapDroidFlags` and `mapAmpFlags` never check `approvalMode === 'yolo'`, so forwarding `--approval-mode yolo` passes through **unmapped** to each target instead of converting to its native flag (`--skip-permissions-unsafe` / `--dangerously-allow-all`) | Add the same `approvalMode` guard that `mapKimiFlags`, `mapKiroFlags`, and `mapCrushFlags` already have | **Verdict:** Merge-block until both are patched. Bug 1 causes silent behavioral divergence depending on whether the user supplies explicit forwarding args. Bug 2 silently passes an unrecognized flag to the child CLI, which either errors out or ignores it entirely. Both are one-liner fixes — no design debate needed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 01:39:21 +03:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cli-continues#33
No description provided.