Skip to content

About

Bridge GitHub Discussions to native coding-agent sessions, with replies and delivery receipts in GitHub.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

255 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RepoAgent

RepoAgent lets your team work with a coding agent through GitHub Discussions in your repository. Participants ask questions, plan work and follow up in comment threads; the agent replies as your installed GitHub App bot.

The controller currently supports GitHub Discussions with Codex, with one controller per repository and one persistent agent session per Discussion.

Supported features

  • Shared conversations. Everyone in a Discussion works with the same agent session across its comment threads. Follow-up messages retain the conversation's context, including after controller restarts when its storage is preserved.
  • Explicit connected-app access. Codex account apps are disabled by default. Opt into selected apps or all apps for each instance, including dedicated accounts. App policy and agent-assisted setup explains authority, upgrades and the setup skill.
  • Discussion activity. The agent receives new and edited messages, reactions and who added them, answer and state changes, and confirmed comment or reply deletions.
  • Optional pictures. An explicitly approved image-publishing profile lets the agent store images and editable diagram sources on a separate repoagent-assets branch and embed them in Discussions. This requires repository-wide Contents write; see setup and verification limits.
  • Flexible conversation starts. Mention the App bot or a configured mention account such as @repoagent, select a Discussion by URL, or automatically start sessions for new Discussions in chosen categories.
  • Model selection. Set repository defaults for the Codex model and reasoning effort, or override them per Discussion with a label such as repoagent:sol6.1:xhigh. Changes apply to the next turn.
  • Queued work and concurrency limits. Follow-ups wait while the agent is busy. A configurable limit controls how many Discussions run at once; the default is four.
  • Delivery recovery. Waiting input survives restarts, uncertain deliveries are retried, and controller receipts and dashboard updates recover from temporary GitHub failures and rate limits. Uncertain checkout activity keeps status available and holds new turns; supported startup cases have an explicit offline recovery command.
  • Provider failure recovery. A confirmed terminal capacity failure, structured request throttle, or allowlisted connection/stream HTTP failure continues unfinished accepted work after two minutes in the same session, model and reasoning effort. The wait survives restarts and holds later input while other Discussions progress. Repeated supported failures remain paced; inspecting history reduces duplicate effects but cannot guarantee exactly-once external actions. See recovery behavior and limits.
  • Optional repository context. Give the agent a checkout of your repository's default branch, including its instructions and skills. The controller refreshes it between completed turns.
  • Repository settings. Manage model defaults, concurrency and automatic category enrollment through nonsecret REPOAGENT_* repository Agent variables.
  • Issue and PR context. Agents can read repository issues, pull requests, comments and reviews through the App identity to inform their work. Existing installations can reauthorize in place while preserving conversations.
  • GitHub App identity. Controller and agent GitHub access use the installed App's repository-scoped permissions. Shared-App setup uses revocable repository approval without distributing the App's signing key; using your own App is also supported. Broker storage upgrades require the documented cutover; upgraded brokers support explicit setup v5 with glossary names.
  • Broker credential recovery. Token requests mint fresh GitHub credentials without persisting them at the broker. HTTP 429 and temporary outages use bounded backoff; a definite GitHub 401 refreshes the controller's token once. Revocation stops new issuance; previously issued tokens may remain valid until GitHub expiry. State, limits and upgrade requirements describe the required fresh-Table/current-enrollment cutover.
  • Optional broker monitoring. Application Insights keeps server error and exception observations, including cleanup failures, while retaining approximately 1% of routine request traces (including HTTP 4xx client responses) and Information/Warning logs. Error content is redacted and alert metrics remain unsampled. Cleanup emails cover reported errors, incomplete coverage or missing completion metrics over 15 minutes; native Azure job failures remain visible without separate emails. See monitoring policy and limits.
  • Separate Codex credentials. Import a private host sign-in file across different host/container user IDs, or replace credentials while the controller stays running. The change waits for active work to finish and preserves session history. A normal stop drains accepted work. Broker-backed controllers also confirm that owned agent processes have stopped before returning success; inability to confirm their shutdown is a failure.
  • Status and troubleshooting. Inspect active and queued sessions, authentication health and recent failures through status commands and retained logs. Enable an optional Discussion dashboard with installer -DashboardCategory 'Existing category name'. It leads with a UTC heartbeat, work capacity and current blocker titles, links to active and idle tracked Discussions, grouped historical failures with expandable evidence, image update notices, and account usage when the agent runtime supports it. Usage is observational: unavailable or stale data never means zero capacity, and account allowances can span repositories. Treat more than two minutes without a heartbeat as offline; publishing failures can look the same.
  • Private session activity. On Linux and macOS, use the local activity command to list mapped Discussions, page previous responses and supported tool activity, or follow an existing session. Mapping selection remains available during repository scans. Inspection uses the running controller's runtime and never starts agent work. Activity and remote commands share a private, versioned Unix HTTP endpoint with authenticated local callers; activity inspection explains pagination, gaps and privacy limits.
  • Native desktop access. The Codex account owner with container or native-host access can enable the existing runtime, pair a desktop, inspect clients, revoke one client and disable access using repoagent remote. Intent defaults to disabled and survives restarts. Command cancellation remains bounded without truncating the shared runtime protocol. Desktop access supports observation and trusted full interaction; observed owner turns participate in existing work/status and checkout-idle accounting. Account/provider availability still applies. See native access commands.
  • Container distribution. Run locally with Docker or behind your own HTTPS hosting. Containers run pinned image tools, including with older saved settings. Image builds retry transient package downloads and fail if snapshot indexes remain incomplete. Controller releases use independent semantic versions shared by native archives and public GHCR images, with bundled offline release notes and exact tool inventories; you can extend an image with your own tools and adopt updates deliberately. Daily Codex, GitHub CLI and cloudflared refreshes require the hosted installer smoke before new tools are pinned; maintainers can also run that gate on a branch. Failed installs retain bounded, redacted diagnostics and failure locations.

Category enrollment, repository model defaults and concurrency changes require repository settings to be enabled. Broker installations opt in with -RepositorySettings during a fresh installation. Per-Discussion model labels work without repository settings; model availability depends on the signed-in Codex account.

Get started

You need a repository with Discussions enabled, a compatible GitHub App installed, Codex credentials, and Docker with Linux containers. The supported image targets Linux amd64. Building from source uses the pinned .NET 11.0.100 SDK; see development and code quality. Native developer runs also need /bin/sh and the system process observer (procps on Linux, built into macOS); the Docker image already includes them.

Choose how the controller receives activity:

  • Polling: no public endpoint required.
  • Fixed HTTPS URL: webhook mode uses your existing ingress and automatically registers the repository hook.
  • Temporary public URL: Cloudflare Quick Tunnel supports local development without an account or domain and recovers a lost tunnel after the controller reports idle, allowing accepted turns to finish before relaunch.

Use RepoAgent

  1. Open a Discussion and mention the configured account or the App bot's actual login, such as @repo-agent-connector[bot]. With category enrollment enabled, creating a Discussion in a selected category starts it automatically.
  2. A 👀 reaction means the agent accepted the input. It does not mean the work has finished; the agent posts its reply in the Discussion.
  3. Continue in comments and replies. Follow-ups wait for the current turn to finish and then reach the same session.

A normal SIGTERM or Ctrl+C stop of a long-running controller holds new input and waits for active agent work to finish; pending credential replacement cannot restart the agent after shutdown begins. Credential authority loss still stops owned work immediately.

Keep the controller and its host running to receive activity. Preserve its state and Codex storage across restarts. If you enable repository context, the managed checkout is disposable; the agent uses separate worktrees for edits. New approvals include issue and pull request reading alongside Discussions access and optional code reading. Existing approvals retain their original permissions until reauthorization. Image publishing adds an explicit repository-wide code-write grant; no supplied profile grants pull request creation. Issues and pull requests are not conversation entry points.

The native controller command is now repoagent. This is a breaking rename: RepoAgentController is no longer installed and has no compatibility alias. Adopt matching native clients, host wrappers and controller images, update any executable invocations, and restart the selected controller. Preserve its existing state, journals and Codex storage; this upgrade requires neither controller re-enrollment nor a session/state reset.

Controller and credential broker versions are proposed independently through reviewable Release Please PRs. Image adoption remains deliberate; older controllers require one manual move from legacy baseline tags to a verified semantic image. See the component release policy for compatibility, source attribution and tag protection. Maintainers can recover a partial controller publication from its retained verified artifact without rebuilding or overwriting its version image.

Configuration and operations

  • Repository settings: model defaults, model labels, concurrency and category enrollment.
  • Container setup: skills, tools, storage and runtime commands.
  • Controller operations: status, dashboard, logs, credential replacement and recovery.
  • Enrollment and revocation: repository approval and controller access.
  • Isolated broker restore tools: maintainer-only planning and typed Table transfer, with a recorded real isolated restore, alert and retirement rehearsal. Every run still needs positive token settlement, worker/signing fences and scoped retirement; this is not automatic recovery.
  • Image updates and rollback: replace the selected image while retaining your data.
  • Hosting lifecycle is outside the controller (ADR 0009). Hosted operation will be redesigned around the status endpoint.

When repository settings are enabled, the controller and its agent can read all direct repository Agent variables, and GitHub also gives them to Copilot cloud agent sessions. Keep secrets in GitHub Secrets or private runtime storage. See the settings permission details. Settings kept in Actions variables by an earlier version must be moved once.

The broker and guided PowerShell installer support repository Agent-variable approval and explicit setup v5 canonical names. Adopting broker storage schema 2 requires a freshly initialized Table and a fenced import of valid active enrollments. Existing controllers and approval values need no changes. Token history is not migrated. The broker stores no GitHub tokens or issuance history; the expiry-based revocation policy and cutover replace the former outstanding-token settlement barrier.

The broker's --version --json command reports its compiled service version and source revision without loading credentials. Maintainers can explicitly run the version-only runtime console probe against an exact selected image, revision and replica using the existing workflow identity; it observes metadata without establishing remote exit status or credential settlement. Broker releases use independent semantic versions and verified immutable images for deliberate deployment and rollback; service versions remain separate from enrollment protocol and storage schema versions.

Broker source also includes a maintainer-only retained-authority observation command, fixed to the accepted production identity/Table and one operational test repository. Maintainers can invoke its guarded main-only authority-probe workflow after adopting a reviewed compatible release from1.1.0 onward;1.0.0 images are refused. Valid partial reports retain their uncertainty and never establish settlement or replacement readiness.

For implementation and design, see the architecture decisions, domain glossary, credential broker documentation and Controller and Broker delivery workflows.

For local development, the Aspire AppHost runs the broker, local storage and key-ring wrapping. It can also run a configured native controller on Linux or macOS against a disposable repository. Optional Controller:RepositorySettings=true requires a matching repository-settings enrollment profile; it is disabled by default. Real GitHub authentication requires an authorized developer's Azure CLI sign-in to the shared signing key; its private key is never copied.

The shared local AppHost exports privacy-limited broker request and controller RPC traces to its authenticated Aspire dashboard. Trace batches are optional and may be dropped; see the local trace workflow.

Broker-only isolated AppHost runs retain local emulator keys and can read existing wrapped key-ring material across randomized port changes; enrolled controllers require a stable broker origin.

Local shared signing allows six seconds total for Azure CLI credential acquisition and Key Vault calls; see the development signing prerequisites.

About

Bridge GitHub Discussions to native coding-agent sessions, with replies and delivery receipts in GitHub.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages