The most dangerous part of an agent failure can be the automatic recovery. A permission denial, missing package, or read-only file should not trigger a hidden sequence of broader commands. Nerva’s planned recovery flow should preserve the error and make the next action explicit.

Keep the original failure

The task manager should record:

  • The exact tool request.
  • Its working directory or target resource.
  • Exit code or error type.
  • Files changed before the failure.
  • Whether the operation reached the network.

Without that record, the model may retry a different command and later report only the successful-looking result.

Recovery can change risk

If npm test fails because a dependency is missing, installing it changes the lockfile and may contact a registry. If a file is read-only, changing permissions changes the machine. If an API times out, trying another provider changes the data destination. Each recovery is a new operation that deserves a new policy check.

Nerva can still be helpful by suggesting the smallest next step:

The test could not start: package not installed.
Next option: inspect package.json and lockfile.
Network install: not requested.
Approval needed before: npm install

This turns failure into a useful checkpoint instead of a reason for the agent to expand its access silently.

The useful design question

The useful question here is not whether an AI agent can produce an impressive demo. It is whether the workflow stays understandable when the task is incomplete, the repository is messy, or the model is wrong. For this part of Nerva, the focus is recovering transparently from partial work. That means each state should have a visible owner, a small input, and a result that another part of the system can inspect.

A concrete scenario

Consider preserving a failed migration command and asking for a smaller retry instead of guessing. A good Nerva run would first state the scope, identify the files or operation it needs, and show the next proposed step. It would keep the original request separate from model-generated instructions. If an action needs approval, the user would see what will happen before it happens. Afterward, the task history would retain the command, result, and verification status instead of reducing everything to a confident paragraph.

This approach also makes a failure useful. A denied permission, unavailable provider, missing package, or changed file is information about the task state. Nerva should preserve it and explain the smallest recovery option. It should not silently broaden the request, retry a side effect, or claim completion because a model supplied plausible-looking text.

What I would test first

For an early implementation, I would test three paths: a normal successful run, a denied action, and an interrupted run resumed after the workspace changes. The key test is whether recovery changes data, permissions, or the original task scope. In each path, the interface should make clear what Nerva knows, what it proposed, what actually ran, and what remains unverified.

Useful acceptance checks include:

  • the user can inspect the selected context before model execution;
  • sensitive paths and credentials are excluded or redacted;
  • every side effect has a narrow permission decision;
  • failures remain attached to the step that caused them;
  • a final answer links to evidence instead of implying that unrun work succeeded.

Nerva is still an upcoming project, so these are design and implementation goals rather than claims that a finished product already provides them. That distinction matters: a trustworthy agent should earn confidence through observable behavior, not through a feature list.

A small review checklist

A practical review should end with a small decision, not a vague promise. Write down the scope, the expected result, the permission required, and the check that will confirm it. Then try the same flow with a refusal or missing dependency. If the interface explains that case clearly, the design is ready for a more realistic prototype; if it hides the problem, adding another feature will only make the workflow harder to trust.

The design is informed by the boundaries I have had to think through in CryptoEx and SentinelFi: backend work becomes easier to review when context, permissions, side effects, and verification are explicit.

I made a mistake in an earlier automation design by treating a plausible next step as permission to continue; Nerva should make that boundary explicit and pause instead.