Deploying an Automated Issue-Handling Agent Locally: The Service Runs, but No Issues Get Picked Up
This article walks through deploying an agent that monitors a code hosting platform for issues and handles them automatically. Installation was straightforward. The real problems appeared afterward: requests sent through the wrong entry point, and a requester account that was also the agent's account. The article covers how each problem was diagnosed and fixed, and ends with a checklist for agents that report healthy but never act on work.
1. A Deployment That Looked Successful
Recently I deployed an automated issue-handling agent on my local machine. This kind of system has a simple structure. A long-running service listens for issues on a code hosting platform, reads the natural-language request in each one, clones the repository, analyzes the code, generates changes, and replies on the issue. The result is a closed loop that takes on issues without anyone supervising it.
Installation went smoothly. The core process comes down to three steps:
# 1. Install the runtime (command-line entry point)npm install -g <runtime-package-name># 2. Build the plugin source codecd <plugin-directory> && pnpm install && pnpm build# 3. Create a profile that mounts the plugin, and prepare a test repository with write access
Next, I logged the agent into the platform using a dedicated configuration directory for its own account. After running the status check command, both the runtime check and the platform connection check showed as ready. To open the local dashboard, you need the full URL that includes the token, which is printed in the service startup log. Visiting the bare port only returns an authentication error.
At that point, I assumed the hardest part was over. It was not. The real pitfalls came after installation.
2. First Pitfall: The Message Entry Point Was Disconnected From the Processing Flow
After the service started, I typed “@Agent, explain how this system works” into the chat window of the deployment assistant and waited for a reply. The run count and queue count on the dashboard stayed at zero. Nothing happened.
Investigation showed that this deployment enabled only one request source: the code hosting platform. The agent’s message processing is driven by issue events. The platform pushes events for new issues and new comments to the service. The service parses each event, verifies who created it, and queues the work. Messages in the chat window never enter this pipeline, so the service does not know they exist.
This is the first mistake many people make with systems like this. They treat “the service is running” as “the service accepts requests from any source.” In practice, request entry points must be configured explicitly. Each source, such as issues, comments, scheduled jobs, or message queues, needs its own intake and authentication logic. To verify the pipeline, send a real request through a configured entry point. In my case, that meant opening an issue in the test repository instead of typing into an unrelated chat window.
3. Second Pitfall: The Requester and the Executor Were the Same Account
After switching to the correct entry point, I created three test issues in a row. Only the third received a reply from the agent. The first two sat in the list, unclaimed.
The root cause was the identity configuration. To save time during deployment, I did not register a separate platform account for the agent. Instead, the agent used my personal account. This merged three roles that should have been kept apart:
| Role | Responsibility | Key Configuration |
|---|---|---|
| Requester | Opens issues with requests | Must be on the service allowlist |
| Agent account | Receives events, reads content, posts comments | Needs repository write permission and login credentials |
| Repository owner | Manages collaborators and permissions | Can be separate from the first two |
When I opened an issue from the agent’s own account, the service checked the author against the allowlist after receiving the event. The author was not on the list, so the service discarded the request. Adding the account to the allowlist would not have been enough. Many systems also include a built-in rule that prevents self-triggered loops by ignoring events the agent itself creates. Without this rule, the agent could respond to its own comments indefinitely. This also explains why issues opened from the agent’s account were never processed.
The correct setup keeps all three identities separate:
# Use a separate configuration directory for the agent account to avoid conflicts with your everyday accountexport GH_CONFIG_DIR=~/.agent-config# Persist this environment variable with a wrapper script so the everyday and agent accounts do not interfere with each other
Also confirm the following: the requester’s account is on the service allowlist, the agent account is a collaborator on the test repository, and the allowlist contains the requester’s username rather than the agent’s username.
4. A Reusable Troubleshooting Checklist
Based on this experience, I put together a checklist for services that show as healthy but never pick up work. The items are ordered by priority, from highest to lowest:
- Entry point: Was the request sent from a source the service has configured? If the dashboard shows no queue records, the event most likely never reached the service.
- Identity: Is the requester on the allowlist? Is the requester the same account as the agent? Did the self-loop filter block the event?
- Permissions: Does the agent account have read and write access to the target repository? Has the collaborator invitation been accepted? Have the credentials expired?
- Logs: Long-running services usually log stages such as event receipt, identity verification, and task queuing. Check each stage in order to find where the request was dropped.
The order matters. Entry point problems fail silently and leave no trace on the service side, so rule them out first. Identity problems leave verification failures in the logs. Permission problems usually show up as events that were received but then failed during execution.
5. Closing Notes
Looking back, installation took very little time. Most of the effort went into planning accounts and debugging why issues were not being picked up. This pattern is common in automation systems. Setting up the runtime is a one-time task, while the identity and permission model determines long-term correctness.
If you plan to deploy a similar issue-handling system in your own environment, map out the roles before you start. Identify who submits requests, who executes the work, and who manages permissions, and note which credentials each one uses. Drawing this diagram in advance can save you hours of late-night debugging. For production use, you could also run the agent service on a container platform with logging and monitoring alerts. That way, silent failures like “no issues picked up” are caught right away, instead of being noticed only after a user asks why nothing happened.
