LOGIKASign in

Automatic fixes

Something breaks in production. Within 5m Logika has raised it as an issue, with its evidence; you get one email; your own coding agent, on your own machine, takes the issue, fixes it and delivers the fix the way your repository delivers anything; and its report lands in the same email thread. This page walks through that loop step by step, then the queue it works from.

your app ── spans ──▶ Logika: judged every 5m
                          │ a new issue
                          ▼
                  one email to the environment's subscribers
                          │ Wake my agent (or automatically)
                          ▼
             Logika Monitor, on your machine
                          │ launches your agent, in its own worktree
                          ▼
  logika claim ▶ reproduce ▶ fix ▶ commit ▶ logika resolve
                          │
                          ▼
             the report, in the same thread

What counts as broken

Any span that closes with an error, a library's POST /checkout included, is an issue, whatever the ledger declares, even an empty one; so is a log record with an exception or an ERROR or FATAL severity, the logger.exception(…) your code already makes. One issue per span name and exception type (a record outside any span counts by its logger), so a thousand repeats of the same failure are one issue with a thousand occurrences. Beyond that, an event you flag with "anomaly": true, a param your code stopped sending, an operation that took the wrong path or never finished, a rule or an invariant your system broke: all of these are issues too, and most of them are written with you later, in reflection.

The issue

Every 5m, the evaluator judges what arrived against the ledger. When it finds something, it stores the issue with its evidence: the failing span and its values, the journey around it (its parent, siblings and children, and the work it linked to), the exception and its stack, the ledger definitions in play, the app versions involved and, when something didn't arrive in time, whether the process that should have sent it hung, died or simply went offline. The evidence is kept for as long as the issue exists, even after the raw data it came from has rotated out.

Waking the agent

Everything about the agent is each environment's, set by its owners in the console's Settings, under Environments: "When something breaks in prod, we email you, wait for you to wake your Claude and when the agent is done, submit a PR." Its wake setting says when the agent starts:

  • on_request (the default): the email carries a Wake my agent button, and so do the console and Logika Monitor's menu. Pressing it starts your agent, never a colleague's, on every open issue, an environment at a time; choosing among them is done by talking to your agent in a terminal.
  • auto: Logika waits up to 3m for any member's monitor to take the new issues on its own, and the email tells the member whose agent took them that it's on it.
  • never (set with logika api env set): issues wait in the console for you, or for an agent you send at them by hand.

If you press Wake my agent while your monitor isn't running, the start waits: a monitor you start within 5m takes it; otherwise it's given up, and you're told so.

On your machine

logika login installs Logika Monitor, a small background program with a menu-bar icon, and registers the repository with it. When there is work, it launches the coding agent the environment names (Claude Code by default; Codex, or a command of your own, with its own configuration directory if you set one) headless, in a worktree of your repository on a branch of its own, from the newest main; your working copy, its branch and its uncommitted changes are never touched. One agent works the issues at a time; Why? questions run alongside.

The agent runs with your own agent configuration and permissions, so it can only do what you've allowed it to do unattended. How it delivers is the environment's: a pull request, a deploy, or instructions of your own (how and where the project deploys, what to leave alone, when to only report). An environment can also set a time limit: past it, the agent is asked to round up (commit, deliver, resolve what it fixed and leave the rest open); no run is ever stopped for time.

What the agent does

It follows the logika-fix skill:

  1. logika claim takes the open issues, each printed with its evidence and grouped by the events they share.
  2. It investigates: logika query journey for the trace around a failing span, logika query sql for SQL over everything stored, the analytics readers for how things changed over time.
  3. It reproduces the failure with a test, run under logika test, and fixes the code.
  4. It commits the fix and delivers it as the environment says: a pull request, a deploy, or your own instructions.
  5. logika resolve closes every claimed issue under one root cause: fixed, with its delivery; dismissed, with why it isn't a problem; or left open, with what's in the way. That ends the run.

What you get back

The report is emailed to you, the member whose agent it was, in the thread that announced the issues: "Your agent finished: 1 fixed in pull request #7; 1 still open in pull request #7", and a line per issue with its reason. If the agent couldn't start, the thread says so with the agent's own words, and you start it on your computer; if it stopped before reporting back or its monitor stopped responding, the thread says that, with a button to wake it again where that can work, or else to start Logika Monitor first. Notifications and agent reports shows each of them.

What a person does by hand, in the console or a terminal, is never emailed.

When the fix doesn't hold

A fixed issue is fixed at once, not when production agrees, because the fix may take a while to ship. Occurrences from versions that were already running keep accumulating quietly. An occurrence from an app version first seen after the fix proves it wrong: the issue reopens as a regression, and the loop runs again. This is why your spans should carry service.version; without it, a fix can never be told apart from a regression, and the nightly feedback says so.

The spending limit

Every run costs whatever your agent's subscription charges for it. Each member can set one soft monthly limit for their own runs in a project, across all its environments, in Settings beside their name among the people. Past it, their monitor starts nothing more in that project until the month turns or the limit is raised, and their emails say so instead of offering Wake my agent. There is no hard limit, and no limit at all until you set one.

What Logika never does

Logika calls no AI model: the reviewer and the fixer are both your own agent, on your own subscription. A Wake my agent link runs no code; it asks your monitor to launch the agent you configured. And your agent never sees anything Logika didn't store from your own application, rendered as data, never as instructions.

The queue

Each item has a kind. The agent works items by claiming them (logika claim) and closing them with one resolution (logika resolve): fixed, with its delivery, dismissed with a reason, or left open with a reason.

KindWho works itCloses when
anomalya run, after Wake my agent or on its own in an auto environmentfixed or dismissed by a resolution; nothing closes it by time or silence
insightthe agent, when you ask Why?dismissed, or explained by the agent you asked; raised anew when the change comes back after a quiet day
feedbackthe agent, when you ask Fix itthe critic re-checks it nightly, or a resolution closes it
accountthe agent, when you ask Fix it and it can fix itthe condition clears

Runs take issues only. An insight, feedback or an account condition the agent can fix (non-trace signals, a revoked key in use, a ledger synced with warnings, code running a ledger nobody synced, an invariant's or a rate's query that fails when run) is worked only when you ask: the console's Why? on an insight and Fix it on the others, or asking your agent, which claims it by id.

An issue is open, claimed (a run holds it), fixed or dismissed, and keeps counting occurrences whatever its state. Fixing means fixing the code; dismissing means the condition is unimportant, so calibrate the ledger (fix the logs) so it stops firing. A fixed or dismissed issue reopens as a regression when it recurs on an app version first seen after it was closed, so set service.version in your application; occurrences from older or unversioned code accumulate quietly, and the nightly critic reports their counts. An unusual-change (change) issue is a regression a release is to blame for (worse on one app version, or since a deploy), and reopens like any other by that version; dismissing a change finding says this level is normal here and widens its threshold.

Change detection splits what it finds in two. A regression is an issue of check change, for the agent to fix: a failure rate, latency or typical value worse on one app version than on the others, or worse since a deploy. Everything else is an insight, for you: traffic that rose or fell, a failure rate, latency or count that moved with no version or deploy to blame, one environment worse than the others, and, judged daily, a funnel's conversion falling or a numeric param's typical values shifting. Volume is grouped: every event whose traffic rose in an environment is one insight, "traffic rose across N events", listing each event with its numbers and split by app version (and likewise for a fall), since one cause such as a new version beside the old usually moves them all; dismissing it widens the threshold of every event in it. Insights are listed as What changed on the console's Dashboard, and ride along on the next issue email. Runs never take one: the agent looks at an insight only when you ask Why?, in a session of its own, and its answer shows on the insight. An insight never reopens per app version; one that comes back after a day without occurrences is raised anew. Change detection compares app versions and environments side by side from the first hour, and judges each event against its own history from about a day on: with little history only a large change counts, and as history accumulates the band narrows and daily and weekly rhythms are learned, gradually rather than at a fixed age.

There is no mute and no acknowledgement. A condition that should not fire is a ledger edit; a real problem is a fix. Starting the agent is never per item: Wake my agent (in the email, the console or Logika Monitor's menu) means fix the open issues: a run works one environment's, claims them all and ends with one resolution, and the next environment's run follows. One run at a time works the issues; a Wake my agent pressed meanwhile is taken in by the running agent, and waits for the next run. Only your own monitor answers your Wake my agent, never another member's; a wake your monitor does not take within 5m is given up, and you are emailed. In an auto environment Logika waits up to 3m after new issues for a member's monitor to claim them; the email then says whose agent is on them or that it could not start; otherwise it carries your Wake my agent button.