@nathapp/nax 0.67.0-canary.1 → 0.67.0-canary.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/nax.js +21 -3
  2. package/package.json +1 -1
package/dist/nax.js CHANGED
@@ -21250,6 +21250,7 @@ class AgentManager {
21250
21250
  let hopsSoFar = 0;
21251
21251
  let rateLimitRetry = 0;
21252
21252
  let staleRetryAttempts = 0;
21253
+ let adapterErrorRetries = 0;
21253
21254
  let currentBundle = request.bundle;
21254
21255
  let currentHopKind = { kind: "primary" };
21255
21256
  let finalPrompt;
@@ -21318,6 +21319,23 @@ class AgentManager {
21318
21319
  currentHopKind = { kind: "stale-retry", attempt: staleRetryAttempts };
21319
21320
  continue;
21320
21321
  }
21322
+ const isFailAdapterError = result.adapterFailure?.outcome === "fail-adapter-error";
21323
+ if (isFailAdapterError && !request.signal?.aborted) {
21324
+ const runConfig = request.runOptions.config ?? this._config;
21325
+ const maxAdapterRetries = result.adapterFailure?.retriable ? runConfig.execution?.sessionErrorRetryableMaxRetries ?? 3 : runConfig.execution?.sessionErrorMaxRetries ?? 1;
21326
+ if (adapterErrorRetries < maxAdapterRetries) {
21327
+ adapterErrorRetries++;
21328
+ logger?.warn("agent-manager", "fail-adapter-error: same-agent retry with fresh session", {
21329
+ storyId: request.runOptions.storyId,
21330
+ attempt: adapterErrorRetries,
21331
+ maxAttempts: maxAdapterRetries,
21332
+ retriable: result.adapterFailure?.retriable ?? false,
21333
+ agent: currentAgent
21334
+ });
21335
+ currentHopKind = { kind: "stale-retry", attempt: adapterErrorRetries };
21336
+ continue;
21337
+ }
21338
+ }
21321
21339
  const hasBundleForSwap = !!bundleForSwapCheck || isFailStale;
21322
21340
  if (!this.shouldSwap(result.adapterFailure, hopsSoFar, hasBundleForSwap)) {
21323
21341
  if (isFailStale) {
@@ -58397,7 +58415,7 @@ var package_default;
58397
58415
  var init_package = __esm(() => {
58398
58416
  package_default = {
58399
58417
  name: "@nathapp/nax",
58400
- version: "0.67.0-canary.1",
58418
+ version: "0.67.0-canary.2",
58401
58419
  description: "AI Coding Agent Orchestrator \u2014 loops until done",
58402
58420
  type: "module",
58403
58421
  bin: {
@@ -58490,8 +58508,8 @@ var init_version = __esm(() => {
58490
58508
  NAX_VERSION = package_default.version;
58491
58509
  NAX_COMMIT = (() => {
58492
58510
  try {
58493
- if (/^[0-9a-f]{6,10}$/.test("8b5ff5b1"))
58494
- return "8b5ff5b1";
58511
+ if (/^[0-9a-f]{6,10}$/.test("62d28c8f"))
58512
+ return "62d28c8f";
58495
58513
  } catch {}
58496
58514
  try {
58497
58515
  const result = Bun.spawnSync(["git", "rev-parse", "--short", "HEAD"], {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nathapp/nax",
3
- "version": "0.67.0-canary.1",
3
+ "version": "0.67.0-canary.2",
4
4
  "description": "AI Coding Agent Orchestrator — loops until done",
5
5
  "type": "module",
6
6
  "bin": {