Skip to content

feat: Add endpoint to propagate GitHub PAT to all active agents #210

Closed

Description

@vybe

Problem

There is no mechanism to push an updated GitHub PAT to all running agents at once. Admins must restart each agent individually.

Solution

Add a new endpoint:

POST /api/settings/github-pat/propagate

This endpoint:

  1. Gets the current system GitHub PAT from settings
  2. Lists all running agent containers that have GITHUB_PAT in their env vars
  3. For each agent, triggers container recreation to update the env var
  4. Returns a summary of which agents were updated

Response format

{
  "agents_updated": ["agent-1", "agent-2"],
  "agents_failed": [],
  "agents_skipped": ["agent-3"],
  "total": 3
}

Files

  • src/backend/routers/settings.py (new endpoint)
  • src/backend/services/agent_service/lifecycle.py (reuse recreate_container_with_updated_config)

Acceptance Criteria

  • Admin-only endpoint to propagate PAT to all agents
  • Only affects agents that have GITHUB_PAT in their env vars
  • Returns clear summary of results per agent
  • Handles partial failures gracefully
  • Agents pick up the new PAT for git operations after propagation

Activity

  1. added
    priority-p1
    type-feature
    on Mar 27, 2026
  2. vybe commented on Apr 4, 2026

    @vybe
    ContributorAuthor

    Closing — duplicate of #211 which covers auto-propagation of GitHub PAT to all agents on update.

  3. added
    complexity-low
    on Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    complexity-lowpriority-p1type-feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions