# Answer Support Tickets from a Go Codebase

An agent answers why Miniflux feeds refresh late from the Go code itself: a two-paragraph reply, nine file citations and a confidence note.

[Run this on Rush](https://cloud.getrush.ai/run/answer-support-tickets-from-code/go/). Opens the console with this prompt ready to send, in a Project that has your repository.

## What the agent does

The agent starts at `Feed.ScheduleNextCheck` in `internal/model/feed.go`, where the base interval is `SCHEDULER_ROUND_ROBIN_MIN_INTERVAL` and line 138 takes `max(interval, refreshDelay)`. In `internal/reader/handler/handler.go` that delay is the largest of the RSS TTL, `Cache-Control` max-age and `Expires` (lines 307 to 312), or `Retry-After` when the site rate-limits (254 to 256).

It then reads `internal/storage/batch.go`, where `WithErrorLimit` leaves out feeds at the parsing error limit and batches are ordered by `next_check_at` with `LIMIT batchSize`, `internal/cli/scheduler.go`, which wakes every `POLLING_FREQUENCY`, and the defaults in `internal/config/options.go`. Before answering it noticed the code has no per-feed interval at all, so "the interval I set" must be the global one.

## Start it with one API call

`POST https://api.phoenix.so/o/{org}/sessions`

```json
{
  "agent": "claude",
  "input": "A customer asks: why are some feeds refreshed less often than the interval I set? Find the answer in this repository's code, not its docs: start at Feed.ScheduleNextCheck in internal/model/feed.go, follow the refresh delay in internal/reader/handler/handler.go, the batch scheduler and the parsing error limit, and read the defaults in internal/config/options.go. Reply with JSON: answer (two short paragraphs a customer can read), files (paths and lines that prove it), and confidence. Do not change code.",
  "resources": [
    {
      "url": "https://github.com/your-org/your-app"
    }
  ]
}
```

1. **Get an API key.** In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
2. **Send the request.** POST the body in request.json to https://api.phoenix.so/o/{org}/sessions, with your repository as the resources URL. The run starts in its own cloud sandbox.
3. **Read what came back.** Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.

## What comes back

Tried on miniflux/v2 at faecfa2f: no code change, and the reply is the JSON the request asks for, with a two-paragraph `answer`, nine `files` entries across five Go files and a `confidence` field. `go build ./...` exited 0 and `go test` on the three packages it cited ended `ok  	miniflux.app/v2/internal/config	0.008s`, with `internal/model` also `ok` and `internal/reader/handler` having no test files. The full suite was not run, since some storage tests need a database.

For the support person: confidence is high for the TTL, header, cap, error-limit and batch behaviour, but no live instance was run and some line ranges are approximate to a few lines. Feeds past `POLLING_PARSING_ERROR_LIMIT` (3) stop refreshing silently; whether to document or surface that is the reviewer's call.

## Run it on every new support ticket

Your help desk backend calls `POST /o/{org}/sessions` once per ticket with the customer's question in `input`, and the key's webhook posts `run.completed` with the JSON in `data.result`. Your backend parses it and drafts the reply on the ticket for a person to send.

## Why run it on Rush?

The code has no per-feed refresh interval, only a global minimum that a site's own TTL or cache headers can raise; the agent did not check the UI or the API. A 6-hour TTL means a 6-hour refresh however low the global setting is.

## Frequently asked questions

### What are the defaults the answer cites?

From `internal/config/options.go`: `POLLING_FREQUENCY` 60 minutes, `BATCH_SIZE` 100, `POLLING_PARSING_ERROR_LIMIT` 3, `POLLING_SCHEDULER` `round_robin`, round-robin minimum 60 and maximum 1440 minutes, and entry-frequency 5 to 1440 minutes.

### Does the agent change any code?

No. The request forbids it and the run left the clone untouched. It noted that a docs or UI line saying the interval is a minimum would be the follow-up to propose, not a pull request.

## More Go jobs

- [Inventory the API Endpoints of a Go Service](https://getrush.ai/run/api-endpoint-inventory/go/)
- [Explain the Architecture of a Go Codebase](https://getrush.ai/run/architecture-overview/go/)
- [Find Dead Code in a Go Project](https://getrush.ai/run/find-dead-code/go/)

## The same job on other stacks

- [Answer Support Tickets from a PocketBase Codebase](https://getrush.ai/run/answer-support-tickets-from-code/pocketbase/)
- [Answer Support Tickets from a Rails Codebase](https://getrush.ai/run/answer-support-tickets-from-code/rails/)
- [Answer Support Tickets from a Django Codebase](https://getrush.ai/run/answer-support-tickets-from-code/django/)

## Keep reading

- [How a Rush run works on your repository, from request to pull request](https://getrush.ai/cloud/)
- [Compare cloud agents, agent sandboxes and AI code review](https://getrush.ai/compare/)
- [Rush pricing: Free, Pro and Max](https://getrush.ai/pricing/)
