Skip to content

feat: enable auto-approve, initial prompt, and issue linking for Amp agent#798

Merged
arnestrickmann merged 1 commit intogeneralaction:mainfrom
Klohto:tomik/amp-full-capabilities
Feb 10, 2026
Merged

feat: enable auto-approve, initial prompt, and issue linking for Amp agent#798
arnestrickmann merged 1 commit intogeneralaction:mainfrom
Klohto:tomik/amp-full-capabilities

Conversation

@Klohto
Copy link
Copy Markdown
Contributor

@Klohto Klohto commented Feb 9, 2026

The Amp provider definition was missing autoApproveFlag and initialPromptFlag, which meant all the advanced task options (auto-approve, initial prompt, Linear/GitHub/Jira issue linking) were disabled when Amp was selected.

Changes

  • Add autoApproveFlag: '--dangerously-allow-all' to the Amp provider entry in registry.ts
  • Add initialPromptFlag: '' (empty string = positional argument, same convention as Codex/Claude)
  • Move Amp above the "without initial prompt support" comment in agentConfig.ts

All downstream UI and PTY logic is already provider-agnostic, so no additional code was needed.

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 9, 2026

@Klohto is attempting to deploy a commit to the General Action Team on Vercel.

A member of the Team first needs to authorize it.

@Klohto
Copy link
Copy Markdown
Contributor Author

Klohto commented Feb 9, 2026

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Feb 9, 2026

Greptile Overview

Greptile Summary

This PR enables advanced task options for the Amp agent by adding missing autoApproveFlag and initialPromptFlag to its provider definition.

  • Added autoApproveFlag: '--dangerously-allow-all' to enable auto-approval functionality
  • Added initialPromptFlag: '' (empty string indicates positional argument, consistent with Claude Code and Codex)
  • Repositioned Amp entry in agentConfig.ts above the "without initial prompt support" comment to accurately reflect its capabilities

The changes follow existing patterns used by other providers (Claude, Codex, Cursor, etc.) and integrate seamlessly with the existing PTY manager logic in src/main/services/ptyManager.ts:122-132. No additional downstream changes were required since the UI and PTY infrastructure is already provider-agnostic.

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • The changes are minimal, well-contained, and follow established patterns. They simply add two missing configuration flags to enable existing functionality for the Amp provider. The implementation matches the pattern used by 9 other providers (Claude, Codex, Cursor, Droid, Auggie, Kilocode, Kiro, Cline, Codebuff), and all downstream logic is already provider-agnostic.
  • No files require special attention

Important Files Changed

Filename Overview
src/shared/providers/registry.ts Added autoApproveFlag and initialPromptFlag to Amp provider configuration - enables auto-approve and initial prompt features
src/renderer/lib/agentConfig.ts Moved Amp entry above "Without initial prompt support" comment to correctly categorize it with providers that support initial prompts

Sequence Diagram

sequenceDiagram
    participant UI as TaskModal/ChatInterface
    participant Registry as Provider Registry
    participant PTY as PTY Manager
    participant Amp as Amp CLI

    Note over UI,Amp: User initiates task with Amp agent

    UI->>Registry: Get provider definition for 'amp'
    Registry-->>UI: ProviderDefinition with autoApproveFlag & initialPromptFlag
    
    UI->>PTY: startDirectPty({providerId: 'amp', autoApprove: true, initialPrompt: '...'})
    
    PTY->>Registry: Lookup PROVIDERS.find(p => p.id === 'amp')
    Registry-->>PTY: Provider config with flags
    
    Note over PTY: Build CLI arguments
    PTY->>PTY: Add autoApproveFlag: '--dangerously-allow-all'
    PTY->>PTY: Add initialPromptFlag: '' (positional arg)
    PTY->>PTY: Add initialPrompt text
    
    PTY->>Amp: Spawn: amp --dangerously-allow-all "task description"
    Amp-->>PTY: Execute task with auto-approval enabled
    
    Note over UI,Amp: Advanced features now work for Amp provider
Loading

@arnestrickmann
Copy link
Copy Markdown
Contributor

Hi @Klohto, thank you for opening this PR! LGTM

@arnestrickmann arnestrickmann merged commit 5c88e97 into generalaction:main Feb 10, 2026
2 of 3 checks passed
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.

2 participants