Skip to content

NonInteractiveEscalationError

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/core/shell/approvalStop.ts:387

§6.2 — an escalation with nobody to ask (CI, one-shot runs, servers). Fails the build loudly, with everything a person needs in order to see why.

new NonInteractiveEscalationError(command, outcome?, reason?, escalatedBy?, negotiation?, allowEntry?, subject?): NonInteractiveEscalationError

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/core/shell/approvalStop.ts:433

string

string

string

string

string

string

ApprovalSubject

NonInteractiveEscalationError

ApprovalStopError.constructor

readonly allowEntry: string | undefined

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/core/shell/approvalStop.ts:431

[[EXT-106]] §4 — the approvals.allow entry that would let THIS command run, rendered in the object form a user writes in a config file, or undefined when none can soundly be derived.

A refusal that stands has to say what would lift it, and a generic example leaves the reader to translate it — for a command the deterministic preflight floors, that translation is the entire remedy. approvals.allow is consulted before the rater and therefore before §4.6’s preflight, so it is the one thing that lifts a floor the agent cannot argue past.

Derived by the caller, never here. The caller holds what an entry has to be derived from — the normalized command for a shell subject (shellApprovalEntryFor), the tool’s identity and host for a tool or MCP one (toolGrantEntry) — and it is the same derivation the escalation menu’s always approve stores, so a message and a menu cannot promise different things about one call. undefined falls back to the general form, which is the right answer whenever a specific one would be wrong — an entry that is subtly too broad, or simply inert, is worse than none. That is what a call whose MCP server could not be attributed gets: toolGrantEntry returns null for it, because server cannot hold the unresolved sentinel.

It is untrusted text. It embeds the command the model proposed, so it is carried as a labelled value part and neutralised with every other untrusted string; putting it in an own part would route model-authored bytes into the one part class a surface may paint raw.


optional cause?: unknown

Defined in: websites/gauntsloth-docs-site/node_modules/typescript/lib/lib.es2022.error.d.ts:24

ApprovalStopError.cause


readonly command: string

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/core/shell/approvalStop.ts:307

What ended the run, exactly as the agent proposed it: the command for a shell subject, and the registered tool name for a gated tool or MCP call. The field name predates the gate widening past the shell; subjectParts is what decides the word the MESSAGE calls it.

ApprovalStopError.command


readonly escalatedBy: string | undefined

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/core/shell/approvalStop.ts:398

EXT-71 §3.2 — the declared approvals.escalate entry that sent this call to a human, when one did. It changes the recovery the message names: pointing someone at approvals.allow when they themselves wrote an escalate entry sends them to a list that cannot win, since a match on escalate outranks a match on allow.


message: string

Defined in: websites/gauntsloth-docs-site/node_modules/typescript/lib/lib.es5.d.ts:1075

ApprovalStopError.message


name: string

Defined in: websites/gauntsloth-docs-site/node_modules/typescript/lib/lib.es5.d.ts:1074

ApprovalStopError.name


readonly negotiation: string | undefined

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/core/shell/approvalStop.ts:407

[[EXT-29]] §6 — the §5 negotiation that preceded this escalation, rendered, when there was one.

§6.2’s message is the ONLY thing a person sees on this path — there is no prompt to attach a transcript to — so an unattended run that ended after three rejections would otherwise report the last command and give no hint that the agent had already been told twice what to fix.


readonly outcome: string | undefined

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/core/shell/approvalStop.ts:389

The rater’s outcome, when a rating existed (the unrated rungs have none).


readonly parts: readonly ApprovalStopPart[]

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/core/shell/approvalStop.ts:310

The message’s pieces, tagged with who wrote each — see ApprovalStopPart.

ApprovalStopError.parts


readonly reason: string | undefined

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/core/shell/approvalStop.ts:391

The rater’s explanation, when a rating existed.


optional stack?: string

Defined in: websites/gauntsloth-docs-site/node_modules/typescript/lib/lib.es5.d.ts:1076

ApprovalStopError.stack


static stackTraceLimit: number

Defined in: _worktrees/docs-release/gaunt-sloth/node_modules/.pnpm/@types+node@26.4.0/node_modules/@types/node/globals.d.ts:67

The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.

If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

ApprovalStopError.stackTraceLimit

static captureStackTrace(targetObject, constructorOpt?): void

Defined in: _worktrees/docs-release/gaunt-sloth/node_modules/.pnpm/@types+node@26.4.0/node_modules/@types/node/globals.d.ts:51

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();

object

Function

void

ApprovalStopError.captureStackTrace


static prepareStackTrace(err, stackTraces): any

Defined in: _worktrees/docs-release/gaunt-sloth/node_modules/.pnpm/@types+node@26.4.0/node_modules/@types/node/globals.d.ts:55

Error

CallSite[]

any

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

ApprovalStopError.prepareStackTrace