Internal Built for the Optidata engineering team

The teammate that
takes the ticket

OptiDevinho is an AI developer. It picks up an issue, opens a draft pull request, writes the code, runs the repository's own tests and answers the reviewers, from its own GitHub account. It never merges and never deploys to production.

acme / web
Code Issues 31 Pull requests 12 Projects

Retry failed webhook deliveries #5932

Openalex opened this issue 3 hours ago
AL
alex commented 3 hours ago
Deliveries that fail with a 5xx are dropped.
Acceptance criteria Retry 5xx and timeouts up to 5 times Exponential backoff with jitter Give up and log after the last attempt
OptiDevinhoacme/web#issue-5932idle

Works where the team already works

Small issues are not small work.
They still need a whole afternoon.

A validation rule, a red check, a merge conflict, three review comments to address. Each one is well understood. Each one still needs a branch, a checkout, the services the tests expect, a pull request that follows the template and someone to answer the reviewers. OptiDevinho does that part, in the open, where the team can read every step and stop it.

How it works

A brain that coordinates.
A worker that codes.

Work arrives from three places: a sweep of the managed repositories, an @OptiDevinho mention on GitHub, or a message in the team chat. A persistent brain hands each event to a short-lived resolver, which decides which issue or pull request it is about. The result becomes a durable task for a single worker, which does one thing at a time.

Inbox0 pending
Brain · resolverup to 3 in parallel
Task queueby priority
Workeridle
Waiting for a task

The brain only reads

It blocks on chat and queue events, dispatches tasks and answers simple questions. It never writes to GitHub and never edits a workspace.

A resolver per event

Each event gets a read-only resolver that fetches the current state and returns one result checked against a schema. Event text is treated as data, never as instructions.

One serial worker

Explicit requests come first, then review feedback, then ongoing work, then new issues. A request about a task already running joins it instead of queueing a second one.

Pull requests

A draft pull request
before any code.

When a task starts on an issue, the runtime opens a draft pull request with an empty kickoff commit, before the model runs. Anyone looking at the issue can see the work has started and follow it from there.

  • The team's conventions. Branch 5932-retry-failed-webhook-deliveries off dev, a semantic title ending in (issue #5932), the shared template and a last line - Fix: #5932.
  • Draft until it is true. The body only reports verified progress and test results. The pull request is marked ready when the checks and UI evidence pass, not before.
  • The board moves with it. The issue goes to Doing when work starts, In review when the pull request opens and Pending when it is blocked. Empty fields are filled; fields a person set are left alone.

Retry failed webhook deliveries #5933

DraftOptiDevinho wants to merge 1 commit into dev
OptiDevinhocommentedai:managed

Implementation and checks have not started yet.

- Fix: #5932

Start work on #5932e41a0c9empty
testsNo checks yet
Checks

It runs the tests
the way CI runs them.

Each repository has a profile: the binaries it needs, the services its tests expect and the checks that must pass. Before the model starts, the worker prepares dependencies and starts the services on loopback, so a green run means the same thing it means in CI.

Repository profileacme/web
"testServices": ["postgresql", "redis"],
"requiredBinaries": [
  "php", "composer", "git",
  "gh", "psql", "redis-cli"
],
"verificationChecks": [{
  "command": "composer test:unit"
}]
Binaries present
Dependencies prepared
Services on loopback
Checks pass
Worker turn0:00

Same services, private data

Postgres and Redis start on loopback for each activity, with the activity database written into a marked block of .env that is rewritten on every attempt. Shared test servers are off limits.

Real browser for UI

A UI change is exercised with Playwright in a real browser. Screenshots, and recordings for new screens, are attached to the pull request. Verification that did not run is never claimed.

A result, not an exit code

Every turn ends with one structured result checked against a schema: success, verified no-op or failure. A blank answer or an exit code of zero alone counts as a failure.

Review

Every review comment
gets an answer.

A new review on a pull request it owns is a task. OptiDevinho reads every thread, fixes what is actionable, pushes, replies in each thread like a colleague would and resolves it. Then it asks the AI reviewer to look again.

  • Only its own pull requests. A pull request is managed when it carries ai:managed and OptiDevinho is assigned, or when OptiDevinho opened it. A person can still ask it to act on any other one.
  • A re-review that knows when to stop. Copilot is asked again only if it already reviewed, nothing is pending and the head changed, up to five rounds by default.
  • Its own events do not wake it. Its comments, replies and commits are left out of the change fingerprint, so it never loops on itself. A red check on its own commit does count.
Conversationacme/web#59332 unresolved
app/Jobs/DeliverWebhook.php
CP
Copilotbot

This also retries 4xx responses. A 404 will be retried five times.

config/webhooks.php
SM
sam

Can we cap the backoff at ten minutes?

Talk
#
devTeam channel
OptiDevinhoDirect message
# dev
Conversation

Ask it in chat.
Like a colleague.

Mention @OptiDevinho in the team chat or in a GitHub comment. It answers within about a minute with what it understood and what happens next, posts a note if the work takes long, and closes the thread with what it did.

  • Status questions get answers, not tasks. "What are you working on?" or a bare link is answered from current state, with links. Concrete work becomes a task.
  • Follow-ups join the running task. A second message about the same pull request is read by the worker before it runs the full checks and before it pushes.
  • Only the team can give it work. Organization members, collaborators and the team's own agents start tasks. Anyone else is told a team member needs to confirm.

Built to be trusted
with a checkout.

An agent that pushes code needs hard limits, not good intentions. Most of OptiDevinho is the runtime around the model.

✕gh pr merge 5933never
✕deploy --env productionnever
✓deploy --env stageif asked

Never merges, never ships

Merging stays with people and the merge queue. Production deploys are out of scope; a stage deploy happens only when the operator includes it in the task.

OptiDevinhopushed 2 commits
Author: OptiDevinho
“Fixed in 7c2e9b1: only 5xx and timeouts are retried now.”

Its own account

Commits, pull requests and replies come from a dedicated GitHub user, written in the first person like a teammate. Reads use a separate read-only token.

gh issue view 5932read
git push origin 5932-…write
gh pr comment acme/api#40blocked
writes stay on the active repository

A gate on every write

The gh and git on the model's path classify each command. Writes stop when the worker is paused, the task is cancelled, or the target is not the active repository.

/read-only
uid1000
/work/acme/web/issue-5932rw
.claude/settings.json in repoignored

The container is the sandbox

Read-only root, an unprivileged user and only explicit writable mounts. Credentials are readable by root alone. Hooks, settings and MCP servers committed to a branch do not load.

per attempt184k / 400k
per activity1.4M / 2M
attempts3 / 8

Ceilings on spend

Optional token ceilings per attempt and per activity over a window, plus a cap on attempts. A task that hits one is blocked and reported; it is not retried.

OptiDevinho degraded (worker): usage limit since 19:25 UTC; resets 22:30 UTC; work paused until then
Daily digest · 2 blocked tasks, 1 parked hint

Tells the operator, once

Lost logins and usage limits open an incident. The operator gets one chat message per incident, debounced and grouped across services, and everything else in one daily digest.

memory/conventions, gotchas
knowledge/team, procedures
journal/one entry per attempt

Memory that carries over

The brain and the worker each keep memory, knowledge and a journal. A setup lesson from one repository is there the next time the worker opens another.

brainclaude--model sonnet --effort medium
resolverclaude--model haiku --effort low
workercodex-m gpt-5-codex

Claude Code or Codex

Each service picks its runtime, model and effort. Extra CLI arguments go through a closed allow-list, so a setting can never switch off isolation.

Usage on record

Every model run records tokens, cache reads and duration, with an optional cost per model. Snapshots can feed the team's agents dashboard.

Label the issue.
Review the pull request.

OptiDevinho is built with Node.js for the Optidata engineering team and runs in Docker, with Claude Code or Codex doing the work. It has two siblings: OptiBotinho reviews and merges pull requests, and OptiQazinho tests them.