Skip to content

feat: default amplihack copilot to autopilot mode#3013

Merged
rysweet merged 2 commits intomainfrom
feat/issue-3007-copilot-autopilot-defaults
Mar 10, 2026
Merged

feat: default amplihack copilot to autopilot mode#3013
rysweet merged 2 commits intomainfrom
feat/issue-3007-copilot-autopilot-defaults

Conversation

@rysweet
Copy link
Owner

@rysweet rysweet commented Mar 10, 2026

Summary

  • default amplihack copilot to --autopilot --yolo --max-autopilot-continues 100 when no Copilot passthrough args are supplied
  • treat Copilot args passed after -- as a full override of those defaults
  • add launcher-focused tests for the default path and the override path

Closes #3007

Step 13: Local Testing Results

Test Environment: feature branch feat/issue-3007-copilot-autopilot-defaults via uv run pytest

Tests Executed:

  1. Simple: uv run pytest tests/test_copilot_launcher_integration.py -k 'autopilot_defaults or full_override' -q → ✅
  2. Regression: uv run pytest tests/test_copilot_directory_allowlist.py tests/launcher/test_copilot_installation.py -q → ✅
  3. Pre-commit-on-commit: repository hooks ran during git commit (ruff, ruff format, pyright, detect-secrets, and related checks) → ✅

Regressions: ✅ None detected in the targeted launcher/allowlist/install surfaces.

Step 19: Outside-In Testing Results

Test Environment: fresh isolated HOME/PATH with a stub copilot binary, exercised through the real uv run amplihack copilot CLI entrypoint
Interface Type: CLI

User Flows Tested:

  1. Default launch → ✅
    • Command: uv run amplihack copilot
    • Expected: Copilot invoked with --autopilot --yolo --max-autopilot-continues 100
    • Actual: captured argv included --autopilot, --yolo, and --max-autopilot-continues 100
  2. Explicit override → ✅
    • Command: uv run amplihack copilot -- --max-autopilot-continues 5
    • Expected: passthrough args suppress the autopilot defaults and preserve the explicit 5
    • Actual: captured argv omitted --autopilot/--yolo defaults and ended with --max-autopilot-continues 5

Integration Points Verified: CLI passthrough parsing + launcher command assembly → ✅
Observability Check: captured argv/transcripts saved during local validation → ✅
Issues Found: initial implementation forced autopilot even when passthrough args were provided; fixed before PR creation.

@github-actions
Copy link
Contributor

🤖 Auto-fixed version bump

The version in pyproject.toml has been automatically bumped to the next patch version.

If you need a minor or major version bump instead, please update pyproject.toml manually and push the change.

@rysweet
Copy link
Owner Author

rysweet commented Mar 10, 2026

Automated review summary: code review found and I fixed the forced-autopilot override bug before opening this PR; security scope is limited to local CLI arg assembly; final implementation is a small launcher conditional plus focused tests.

@rysweet rysweet marked this pull request as ready for review March 10, 2026 05:15
Default `amplihack copilot` launches now use `--autopilot --yolo --max-autopilot-continues 100` when no Copilot passthrough args are supplied. Passing args after `--` now acts as a full override of those defaults.

Refs #3007

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@rysweet rysweet force-pushed the feat/issue-3007-copilot-autopilot-defaults branch from 99dd2b2 to 8b08507 Compare March 10, 2026 05:17
@github-actions
Copy link
Contributor

Repo Guardian - Passed

All 4 changed files are durable project artifacts — no ephemeral content detected.

File Type Assessment
pyproject.toml Config Version bump — standard project config
src/amplihack/launcher/copilot.py Source Feature implementation — durable code
tests/test_copilot_directory_allowlist.py Test Updated test fixtures — durable
tests/test_copilot_launcher_integration.py Test New integration tests — durable

No meeting notes, investigation journals, one-off scripts, or other point-in-time content found.

Generated by Repo Guardian for issue #3013 ·

@github-actions
Copy link
Contributor

🤖 Auto-fixed version bump

The version in pyproject.toml has been automatically bumped to the next patch version.

If you need a minor or major version bump instead, please update pyproject.toml manually and push the change.

@github-actions github-actions bot mentioned this pull request Mar 10, 2026
@rysweet rysweet merged commit e643bb4 into main Mar 10, 2026
1 check passed
@rysweet rysweet deleted the feat/issue-3007-copilot-autopilot-defaults branch March 10, 2026 05:36
github-actions bot added a commit that referenced this pull request Mar 10, 2026
Cover merged PRs from the last 24 hours following the Diátaxis framework:

- docs/COPILOT_CLI.md: Add 'Using amplihack copilot' section documenting
  autopilot defaults (PR #3013: --autopilot --yolo --max-autopilot-continues 100)
  and override mechanism via '--'. Add Copilot CLI tool-policy compatibility
  notes for tmux restart alternatives (PR #3012). Bump version to 1.2.0.

- docs/howto/settings-hook-configuration.md: Add 'Rust Hook Engine' section
  documenting AMPLIHACK_HOOK_ENGINE=rust (PR #2999), binary search order,
  hook mapping table, no-fallback policy, and wrapper script generation
  (audit fixes from PRs #3003, #3005, #3009).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Default amplihack copilot launch to autopilot/yolo with passthrough overrides

1 participant