Skip to content

GitHub Watch

GitHub Watch is a daemon service that automatically subscribes top-level and orchestrator sessions to GitHub issues and pull requests they create, comment on, or review, and delivers subsequent activity through the durable session mailbox. When a worker sub-agent creates, comments on, or reviews an issue or pull request, the subscription attaches to its owning orchestrator or top-level session rather than to the worker. Repository cursors, subscriptions, tool-scan cursors, and event keys are stored in SQLite, so polling continues across daemon restarts without starting over.

GitHub Watch does not use Jev or any local or hosted relevance classifier, so it runs independently of [jev] enabled.

The settings are in config.toml under [github.watch]:

[github.watch]
enabled = true
interval_seconds = 60
api_base = "https://api.github.com"

enabled defaults to true and controls GitHub Watch directly. interval_seconds defaults to 60 seconds; the daemon enforces an interval between 10 seconds and one hour. api_base defaults to GitHub’s REST API URL and normally does not need to be changed. Retired local_inference and use_gpu keys from earlier configurations are still accepted on load and removed on save.

The daemon scans completed session tool calls for GitHub create, comment, and review actions (gh, gh api, curl, and MCP GitHub tools), as well as opaque URL-printing scripts for newly created issues and pull requests (matched by item creation time against the tool call window), including actions targeting repositories outside the session’s checkout. Subscriptions can watch multiple sessions on the same issue or pull request, starting from creation time for creators and from the tool’s start time for commenters so pre-subscription discussion is not replayed. Watched activity includes issue and pull request comments, reviews and review comments, and pull request lifecycle changes such as merge, close, or reopen. Mailbox delivery is durable and wakes idle sessions or delivers at a supported harness hook for busy sessions rather than interrupting an in-flight tool call.

At session creation, use mj new --no-github-events or the No GitHub events option to keep that session out of GitHub event delivery. Its Mjolnir sub-agents inherit the opt-out. This setting is separate from GitHub credentials: an opted-out session does not become a delivery target even if it has a token. See the CLI reference and API reference for creation options.

GitHub Watch resolves credentials for the watched repository. A configured GitHub App mints an installation token scoped to the target repository. Alternatively, [github] session_token_path points to a PAT file on the controller host and overrides App tokens. With neither configured (or when the App is not installed on an external repository), Mjolnir falls back to GH_TOKEN, GITHUB_TOKEN, or gh auth token from the controller environment. GitHub credentials let the watcher access repositories; they do not enable or disable Watch. See GitHub App setup for token scope and setup.

When a session creates, comments on, or reviews an issue or pull request, later activity on that item is queued for the subscribed session (and skipped for the session’s own actions, using recorded comment/review event IDs and turn windows). The event gives the agent the repository and item identity, the change or comment, and its author where available. Mjolnir supplies the event as additional context at a supported post-tool hook or wakes an idle session; it does not send a new prompt in the middle of a tool call. Running /clear removes that session’s active GitHub subscriptions.

If no event appears, check that the daemon is running, [github.watch].enabled is true, and the session was not created with --no-github-events. Confirm the daemon can authenticate to the watched repository. After enabling a setting or changing credentials, allow the poller to run again. The default interval is one minute.

You can inspect the session conversation and agent response to see whether the event was used. The mailbox is durable, so an event can be waiting for the next supported hook rather than missing. GitHub authentication and repository permissions are covered by GitHub App setup. For general diagnosis, see Troubleshooting.

GitHub Watch polls the configured GitHub API (api_base) using the daemon’s GitHub credentials; when a GitHub App is configured, installation lookup and token minting also contact https://api.github.com. No GitHub item text or session conversation is sent to Jev or GLiDE. Disable [github.watch].enabled to stop GitHub event polling. See Security for the full data-flow table and Configuration for the settings reference.