claude-remote-cli 2.15.0 → 2.15.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.
@@ -11,7 +11,7 @@
11
11
  <meta name="apple-mobile-web-app-capable" content="yes" />
12
12
  <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
13
13
  <meta name="theme-color" content="#1a1a1a" />
14
- <script type="module" crossorigin src="/assets/index-BM9I3SdI.js"></script>
14
+ <script type="module" crossorigin src="/assets/index-BrhRAFCA.js"></script>
15
15
  <link rel="stylesheet" crossorigin href="/assets/index-t15zfL9Q.css">
16
16
  </head>
17
17
  <body>
@@ -134,9 +134,13 @@ function create({ type, agent = 'claude', repoName, repoPath, cwd, root, worktre
134
134
  }, 5000);
135
135
  }
136
136
  });
137
- proc.onExit(({ exitCode }) => {
138
- // If continue args failed quickly, retry without them
139
- if (canRetry && (Date.now() - spawnTime) < 3000 && exitCode !== 0) {
137
+ proc.onExit(() => {
138
+ // If continue args failed quickly, retry without them.
139
+ // Exit code is intentionally not checked: tmux wrapping exits 0 even
140
+ // when the inner command (e.g. claude --continue) fails, because the
141
+ // tmux client doesn't propagate inner exit codes. The 3-second window
142
+ // is the primary heuristic — no user quits a session that fast.
143
+ if (canRetry && (Date.now() - spawnTime) < 3000) {
140
144
  const retryArgs = args.filter(a => !continueArgs.includes(a));
141
145
  const retryNotice = '\r\n[claude-remote-cli] --continue not available; starting new session...\r\n';
142
146
  scrollback.length = 0;
@@ -407,4 +407,22 @@ describe('sessions', () => {
407
407
  done();
408
408
  });
409
409
  });
410
+ it('retries when continue-arg process exits quickly with code 0 (tmux behavior)', (_, done) => {
411
+ const result = sessions.create({
412
+ repoName: 'test-repo',
413
+ repoPath: '/tmp',
414
+ command: '/bin/sh',
415
+ args: ['-c', 'exit 0', ...sessions.AGENT_CONTINUE_ARGS.claude],
416
+ });
417
+ createdIds.push(result.id);
418
+ const session = sessions.get(result.id);
419
+ assert.ok(session);
420
+ session.onPtyReplacedCallbacks.push((newPty) => {
421
+ assert.ok(newPty, 'should receive new PTY even with exit code 0');
422
+ assert.strictEqual(session.pty, newPty, 'session.pty should be updated');
423
+ const stillExists = sessions.get(result.id);
424
+ assert.ok(stillExists, 'session should still exist after retry');
425
+ done();
426
+ });
427
+ });
410
428
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-remote-cli",
3
- "version": "2.15.0",
3
+ "version": "2.15.2",
4
4
  "description": "Remote web interface for Claude Code CLI sessions",
5
5
  "type": "module",
6
6
  "main": "dist/server/index.js",