Skip to content

fix(amp): remove unsupported --permission-mode CLI flags#2625

Closed
tamish560 wants to merge 3 commits into
AgentWrapper:mainfrom
tamish560:fix/amp-permission-flags
Closed

fix(amp): remove unsupported --permission-mode CLI flags#2625
tamish560 wants to merge 3 commits into
AgentWrapper:mainfrom
tamish560:fix/amp-permission-flags

Conversation

@tamish560

Copy link
Copy Markdown

What

Removes appendPermissionFlags from the Amp adapter. Amp does not support --permission-mode CLI flags - its permission model is configured through settings/plugins (amp.permissions, amp.guardedFiles.allowlist, amp.dangerouslyAllowAll), not CLI arguments.

Why

When AO launches Amp with a non-default permission mode, it builds commands like amp --permission-mode acceptEdits which can fail on startup or exit before opening the TUI. Projects that configure worker permissions globally make Amp workers fail to start even though plain amp works fine.

Closes #2561

Changes

  • Removed appendPermissionFlags function from amp.go
  • Removed the call to appendPermissionFlags in GetLaunchCommand
  • Removed the call to appendPermissionFlags in GetRestoreCommand
  • Updated comment on GetLaunchCommand to reflect amp (no flags)
  • Updated tests: all permission modes now produce just {"amp"} with no --permission-mode flags
  • Updated restore command test to expect {"amp", "--resume", "T-abc123"} without permission flags

Testing

All existing tests pass with the updated expectations. The test table in TestGetLaunchCommandMapsPermissionModes now verifies that every permission mode (default, acceptEdits, auto, bypass) omits --permission-mode from the command.

@tamish560

Copy link
Copy Markdown
Author

Closing this as #2573 by @VenkataSakethDakuri was already merged on July 10. Should have checked existing PRs before opening this one.

@tamish560 tamish560 closed this Jul 12, 2026
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.

Amp adapter passes unsupported --permission-mode flags

1 participant