Skip to content

fix(relay): retire PTYs the host proves are gone, and stop two per-poll scan storms - #17832

Merged
nwparker merged 7 commits into
mainfrom
fix/relay-cpu-and-stale-pty-lifecycle
Sep 2, 2026
Merged

nwparker merged 7 commits into
mainfrom
fix/relay-cpu-and-stale-pty-lifecycle

Conversation

@nwparker

@nwparker nwparker commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 5 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​686 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​686
Prod 11 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​411 $\color{#cf222e}{\Huge{\mathbf{−}}}$​49 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​362

Three long-session relay defects. Each has a test that fails before and passes after; both outputs below.

#12423 — a resize ioctl against a closed fd, and the entry that never dies

PtyHandler.resize (pty-handler.ts:2056) gated only on managed.disposed, which is bookkeeping ("we tore the record down"), not liveness. The relay's own code documents the gap twice — :1941 "verify liveness because shells can exit without node-pty onExit" and :2377 "an unverified entry advertised that session forever."

When a shell exits without onExit, the entry stays in this.ptys with disposed === false while node-pty has already closed the master fd. node-pty/lib/unixTerminal.js:253-259 has no fd guard, so the ioctl throws ioctl(2) failed, EBADF out of the notification handler and into the dispatcher's generic catch (dispatcher-frame-codec.ts:29-35) — which is exactly why the reporter's log says Parse error: ioctl(2) failed, EBADF. That catch logs and does nothing.

Nothing retires the entry, so it stays advertised as live and keeps activePtyCount > 0. That is the load-bearing consequence: relay-grace-lifecycle.ts:65,88 and relay-grace-branch.ts:114-119 key the idle-exit branch on activePtyCount === 0, so with relayGracePeriodSeconds: 0 a relay pinned by dead entries never reaches its idle exit — the "wedged relay never exits" and "ptys=4 stays at 4 no matter how many tabs I open" complaints.

Fix: reapPtyProvenExited retires only on isProcessAlive returning ESRCH-false — positive evidence of absence from the host that owns the process. resize probes before the ioctl and re-probes if it still throws; a provably dead pid is retired, anything else stays unverifiable, keeps its record and owner claim, and is contained with a stderr line. Per ssh-execution-boundary.md, a failed ioctl observes the handle, not the host's process table, so it is never on its own treated as exited. The three other inline liveness probes were routed onto the same helper so the four cannot drift.

Caveat, stated plainly: the use-after-free, the EBADF escape path and the never-retired entry are all proven. A literal 95%-CPU spin from this path was not reproduced, and the resize throw alone should not produce one — FrameDecoder.drainTurn is bounded per turn and handleFrame catches. The read is that the reporter's "spin" and "never exits" are the same stale-entry cause seen from two angles, plus #13537's separate pgrep storm. Fixed at the lifecycle level; if a spin persists it is a different defect and needs re-measuring.

BEFORE  AssertionError: expected [Function] to not throw an error but 'Error: ioctl(2) failed, EBADF' was thrown
        Tests  2 failed | 1 passed (3)
AFTER   Tests  3 passed (3)

#13537 — the title is a misnomer; the relay never scans ctty, it forks something that does

processHasChildren (pty-shell-utils.ts:177) forked pgrep -P <pid> with no cache, no TTL, no in-flight coalescing, once per pty.inspectProcess — which every tracked pane polls at 750ms/2000ms up to a global 8/s cap. procps-ng opens six procfs files per process to resolve one ppid, including /proc/<pid>/ctty, which never exists on Linux. One call cost ~4,100 opens on the reporter's 690-process host.

The sibling ps scan is already TTL-cached at 500ms; this fork was the one uncapped term riding alongside it. Fix: answer from the shared cached table the same RPC already captured — getProcessTableIndex(rows).childrenByPpid.get(pid). Zero forks; a burst of panes collapses to one ps per 500ms window. Windows returns false without spawning, identical to before (where the fork always failed).

BEFORE  - [ true, true, false, "codex" ]   (expected)
        + [ false, false, false, "codex" ] (received)
        Tests  3 failed | 30 passed (33)   — plus the Windows case timing out at 30s trying to fork
AFTER   Tests  33 passed (33)

#13753 — the relay scanner had no parse cache at all

session-scanner-parse-cache.ts (mtime+size keyed, 4096-entry LRU) is wired only into the local desktop scanner. The relay sidecar's parseRemoteSessionCandidate (remote-session-scanner.ts:220-232) did an unconditional readFile + full parse per candidate — up to 2000 whole-file reads per pass plus 1000 for scope backfill. Its only memo, titleCaches: new Map() at :60, is allocated per call and discarded on return. The 30s cadence is a renderer throttle whose force: true bypasses every result cache in between, and the sidecar survives 10 idle minutes — so a cache placed there would span every tick; there just wasn't one.

Fix: a module-scope LRU keyed by path, validated on (mtimeMs, sizeBytes, hostKey). (mtime, size) is sound because discovery already folds a source's contentDependencyPath stat into both, so a metadata-only transcript whose companion changed still looks changed. The read is inside the cached parse, so an unchanged transcript is never pulled off disk. Only completed parses are stored, so a transient failure cannot pin a wrong answer. The 30s interval was not widened — the root fix is not re-reading, not polling less.

BEFORE  AssertionError: expected [ …(3) ] to deeply equal []
        Tests  1 failed | 4 passed (5)
AFTER   Tests  5 passed (5)

Verification

$ pnpm test src/relay/ src/main/ai-vault/
 Test Files  229 passed
      Tests  2051 passed | 2 skipped

$ pnpm tc:node                            # clean
$ pnpm run check:code-quality:changed     # 0 new findings across 7 changed files

pty-handler-revive.test.ts > scopes HISTFILE past the wsl.exe wrapper failed once in a combined run; it is pre-existing flake, passing in isolation both with and without these changes, and the stashed-fix baseline showed it green.

Follow-ups found, deliberately not done

  • FORCED_SCAN_PREEMPT_AFTER_MS = 5_000 and the comment at session-scanner-parse-cache.ts:172 both still claim a ~5s forced rescan; it is 30s now.
  • Remote discovery is still unbounded — it lstats every file in the corpus before any recency filter — so the per-pass syscall floor still grows with corpus size even though read/parse cost no longer does.

Fixes #12423, #13537, #13753


ELI5

Three things made the remote helper burn CPU forever: resizing a terminal whose process had already died, forking a process-tree lookup on every poll, and re-reading every agent transcript on disk every 30 seconds.

User-facing regression risk

@coderabbitai

coderabbitai Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: f9bc1d47-9ec9-4d43-851c-fa29b0ffb92f

📥 Commits

Reviewing files that changed from the base of the PR and between a5b70ff and 7dc1cea.

📒 Files selected for processing (1)
  • src/renderer/src/i18n/locales/en.json

Included review availability: Your plan provides up to 10 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The changes add remote transcript parse caching with host, mtime, and size validation, plus Codex title refresh from session indexes. They update relay PTY liveness checks, stale resize handling, process-tree lookup, and exit notifications. The node-pty patch adds file-descriptor retirement, Unix spawn cleanup and diagnostics, Windows job ownership, and socket error handling. New tests cover cache reuse, PTY descriptor reuse, stale PTYs, and process-child detection. The English locale adds activity controls and dashboard activity translations.

Merge Risk: 🟡 Moderate · up to 7dc1c

PTY cleanup can discard buffered output and the terminal-exit notification when relay delivery is under backpressure, leaving remote clients with inconsistent session state. This bounded reliability risk should be fixed or explicitly accepted before merging.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The node-pty and relay lifecycle changes support #12423. However, the process-table optimization for #13537, remote transcript parse caching for #13753, and the English activity translations are not c… Link issues #13537 and #13753 as applicable, or split those changes into separate pull requests. Remove the unrelated activity translations unless a linked requirement justifies them.
Docstring Coverage ⚠️ Warning Docstring coverage is 47.83% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 23 functions across 13 files. (1 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the PTY retirement and process-scan changes. It is concise and relevant, although it does not mention the remote transcript parse cache.
Description check ✅ Passed The description is detailed and covers the problem, implementation, linked issues, testing, risks, and follow-ups. It does not include the template headings or an explicit Visual Proof N/A statement…
Linked Issues check ✅ Passed The PR satisfies the primary coding objective for #12423 by probing host process liveness, retiring PTYs only when the host proves the process is gone, containing resize failures, and preserving unver…
Full details: Description check

Explanation

The description is detailed and covers the problem, implementation, linked issues, testing, risks, and follow-ups. It does not include the template headings or an explicit Visual Proof N/A statement, but the required technical information is substantially present.

Full details: Linked Issues check

Explanation

The PR satisfies the primary coding objective for #12423 by probing host process liveness, retiring PTYs only when the host proves the process is gone, containing resize failures, and preserving unverifiable records. It also adds tests for stale PTY handling and idle-exit recovery.

Full details: Out of Scope Changes check

Explanation

The node-pty and relay lifecycle changes support #12423. However, the process-table optimization for #13537, remote transcript parse caching for #13753, and the English activity translations are not covered by the only provided linked issue, #12423.

Full details: Docstring Coverage

Explanation

Docstring coverage is 47.83% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 23 functions across 13 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Sep 1, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds host-proven stale-PTY retirement, replaces per-poll pgrep forks with a shared process-table index, and introduces a bounded remote AI Vault parse cache.

  • Adds resize-time PTY liveness checks and consolidates several stale-process reap paths.
  • Reuses the cached process table for direct-child detection.
  • Avoids rereading unchanged remote session transcripts with a host-scoped LRU cache.
  • Adds regression coverage for stale PTY resize, process-table reuse, and remote transcript caching.

Confidence Score: 3/5

The PR should not merge until stale-PTY retirement publishes the expected exit and destructive child-process checks avoid acting on a stale snapshot.

Resize-triggered reaping can leave a visible pane bound to an already removed PTY, while cached child detection can miss a newly launched process and permit closure or cleanup without warning.

Files Needing Attention: src/relay/pty-handler.ts, src/relay/pty-shell-utils.ts

Important Files Changed

Filename Overview
src/relay/pty-handler.ts Adds conservative resize-time stale-process retirement, but the new path can silently remove a PTY without publishing its client exit.
src/relay/pty-shell-utils.ts Eliminates per-call pgrep forks, but cached process rows can be stale during event-driven close and cleanup safety checks.
src/main/ai-vault/remote-session-parse-cache.ts Adds a host-scoped, metadata-validated 4096-entry LRU for completed remote session parses.
src/main/ai-vault/remote-session-scanner.ts Routes remote transcript reads and parsing through the new cache while retaining cancellation checks.
src/relay/pty-handler-resize-stale-pty.test.ts Covers stale, unverifiable, and live resize behavior but does not assert client exit publication after stale retirement.
src/relay/pty-shell-utils.test.ts Verifies fork elimination and burst coalescing but does not cover a child starting during the snapshot TTL before a close decision.
src/main/ai-vault/remote-session-parse-cache.test.ts Covers unchanged reuse, metadata invalidation, host isolation, and transient read failures.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Relay polling or client action] --> B{Operation}
  B -->|Resize PTY| C[Probe owning-host PID]
  C -->|Gone| D[Retire PTY record]
  C -->|Live or unverifiable| E[Attempt resize]
  B -->|Inspect process| F[Read cached process table]
  F --> G[Look up direct children]
  B -->|Scan AI Vault| H[Stat remote candidate]
  H --> I{Host, mtime, and size match cache?}
  I -->|Yes| J[Reuse parsed session]
  I -->|No| K[Read and parse transcript]
Loading

Reviews (1): Last reviewed commit: "fix(relay): stop three CPU growth terms ..." | Re-trigger Greptile

Comment thread src/relay/pty-handler.ts
Comment on lines +2072 to +2074
if (this.reapPtyProvenExited(managed)) {
return
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Reaping skips PTY exit publication

When a shell exits without delivering onExit and its visible terminal subsequently resizes, this new probe removes the PTY through reapExitedPty without publishing pty.exit, leaving the pane mounted against a dead session until visibility reconciliation or reconnect.

Knowledge Base Used:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed — the finding is correct, and correct about the escalation too.

reapExitedPty only called notifyExitListener, which is relay-internal. Nothing reached the client, so a retired record left the pane mounted against a session the relay had already forgotten; the next attach answered PTY "<id>" not found with nothing before it to explain why. It was already reachable from the attach probe, the listing sweep and the post-shutdown sweep, but pty.resize made it user-triggered, so it is this PR's to fix.

reapExitedPty now publishes through the same pendingExitByPty + publishPendingExit path the natural onExit uses, carrying code: -1 — this wire's existing "gone, status unrecoverable" code (ssh-relay-session.ts already publishes it for a dropped lease). The pid is proven absent by ESRCH from the host that owns it, but nothing waited on the shell, so no status exists to report. A guard on exitListenerNotified / an already-queued pending exit keeps onExit's real code from being overwritten or duplicated when the sweep later reaps the same record.

Two tests in pty-handler-resize-stale-pty.test.ts: one asserts the pty.exit notification on the resize-reap path (fails on the pre-fix tree with Received: []), one asserts the listing sweep does not republish an exit onExit already reported with code 7.

Comment thread src/relay/pty-shell-utils.ts Outdated
Comment on lines +193 to +194
const rows = await getProcessTableSnapshot()
return (getProcessTableIndex(rows).childrenByPpid.get(pid)?.length ?? 0) > 0

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Cached snapshot bypasses close safety

When a child starts after the shared process-table snapshot is captured and close or cleanup runs within its 500ms TTL, this lookup reports no children, causing the pane to close without the running-process confirmation or to be classified as idle for cleanup.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, scoped to the paths that actually decide.

processHasChildren now takes { fresh }, and the pty.hasChildProcesses RPC passes it. That RPC exists only to gate destructive decisions — the window-close confirmation (use-terminal-editor-close-foundation.ts) and workspace cleanup's idle evidence (workspace-cleanup-local-evidence.ts) — each of which acts on the answer once. pgrep scanned per call, so anything that decides has to keep scanning per call.

pty.inspectProcess deliberately stays on the TTL-cached table. That is the polled RPC (750 ms/2000 ms per tracked pane, serialized through enqueueAgentProcessInspection), so its calls arrive in separate I/O turns; getFreshProcessTableSnapshot only coalesces same-turn callers, so making it fresh would run one ps per pane per tick — strictly worse than the pgrep fork this change removed, and it would give back the whole 3,501 ms → 65 ms result. A poll can read a 500 ms-old table because its next tick corrects it.

Residual, stated plainly: the tab-close guard (running-terminal-close-guard.ts:137) reaches the relay through inspectProcess, so for an SSH remote pane it can still read a table up to 500 ms old. Closing that needs a fresh flag threaded through the pty.inspectProcess wire, the provider contract, the daemon router and the preload — worth doing, but a different change from this one, and not one to land unreviewed here. Local and runtime-environment panes never touch processHasChildren at all (PtyHandler is relay-only).

Tests: pty-shell-utils.test.ts pins that two ordinary calls share one capture while a { fresh: true } call rescans and sees a child that started inside the TTL; pty-handler-spawn-admission.test.ts pins which RPC asks for which.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

The PTY reaping and pgrep fork removal are solid, but the new remote parse cache drops the Codex-title refresh that the local scanner performs on every reuse — remote Codex sessions will serve stale titles for the sidecar's lifetime. See the inline comment.

Reviewed changes

  • PTY liveness probe on resize — PtyHandler.resize now reaps entries whose pid the host proves gone before issuing the ioctl, and contains a still-live-but-failing ioctl with a stderr line instead of letting it escape as a parse error.
  • Unified liveness helper — reapPtyProvenExited routes the three prior inline isProcessAlive probes (attach, listProcesses, shutdown reap sweep) through one ESRCH-based helper.
  • No-fork child check — processHasChildren answers from the shared TTL-cached ps snapshot (childrenByPpid) instead of forking pgrep -P per pane per poll; Windows short-circuits without spawning.
  • Remote transcript parse cache — a module-scope LRU keyed by path, validated on (mtimeMs, sizeBytes, hostKey), so unchanged transcripts are never re-read on the 30s forced rescan.

ℹ️ Nitpicks

  • createRemoteSessionParseStats, RemoteSessionParseStats, and the stats parameter of parseRemoteSessionFileCached are exported but never used — no caller passes stats. Wire it in or drop it.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

nwparker added a commit that referenced this pull request Sep 2, 2026
…#17930)

* fix(native-chat): keep the attachments on a Claude turn that pasted images (#17801)

* fix(native-chat): keep the attachments on a Claude turn that pasted images

A Claude turn carrying pasted images reached native chat with no images at all —
no thumbnails on mobile, and not even an attachment chip on desktop. Nothing
showed that the message had any.

Both carriers were being dropped:

- Claude records the paths in a companion turn marked `isMeta`, holding one
  `[Image: source: <path>]` text block per image. The decoder treats an `isMeta`
  user row as injected, filters it down to tool-result blocks, and returns null
  when none remain — so the whole row went away.
- The prompt row's own `image` blocks are `{source: {type: 'base64'}}`, which
  carry no url or path, so `imageRefBlock` drops them too.

With the companion gone, `isImageSourceUserTurn` could never fire and the fold in
`normalizeImageTranscriptMessages` was unreachable on the Claude path.

Surveying every transcript under `~/.claude/projects`: 238 of 241 image-source
rows are `isMeta`, across every versioned release (2.1.220 through 2.1.237); the
3 that are not carry no version field at all. 38 of those rows hold more than one
content block, which also defeated the single-block rule in
`isImageSourceUserTurn`.

Let image-source text survive the injected-turn filter, and recognize a turn
whose blocks are *all* markers rather than only a lone one. An ordinary injected
turn (a skill preamble, a compact summary) is still dropped, and a turn that
mixes prose with a marker is still not an image-source turn.

Carrying the paths keeps the payload small; decoding the base64 instead would put
hundreds of KB per image on the wire to mobile.

* fix(native-chat): preserve image companion ordering

* fix(native-chat): keep image companions turn-local

---------

Co-authored-by: Merge Sim <sim@local>

* fix(native-chat): stop unjournaled provider frames from killing the session (#17813)

A frame the classifier declines (status-chrome, suppressed-benign, stream-into-item)
is deliberately not journaled. #17720 turned that null translation into
`{accepted: false, reason: 'untranslated'}`, which is not `backpressure`, so the
notification retry queue treated it as unreplayable and escalated through fail() ->
forceCloseUnexpected -> connection.close(). The app-server latched `closing` and the
create path's next model/list rejected with "codex app-server connection is closed
(model/list)".

The provider emits `remoteControl/status/changed` right after initialize, so every
structured Codex session died on its first chrome frame. Admit the null translation
instead, before any bookkeeping or publish.

Also restore the error-frame exemption from the generic row cap, dropped by the same
PR: the cap now runs after the classification check, so a noisy turn can no longer
reduce provider errors to a suppression count. The test that pinned the capped
behavior is inverted to assert the exemption.

Co-authored-by: Merge Sim <sim@local>

* refactor(mobile): split session and terminal surfaces

(cherry picked from commit f129f29)

* fix(mobile): restore session parity after extraction

(cherry picked from commit 47706a5)

* chore(mobile): prune stale max-lines overrides

(cherry picked from commit be954c3663409116f34ba08658876262733b3f67)

* fix(mobile): honor host-follow tab snapshots

(cherry picked from commit a4a9c4da19d6967eceb8025dd01480a56261039f)

* fix(mobile): keep split session hooks render-pure

Documents the pre-existing render-time refs the split relocated onto changed
lines, and drops a ref assignment the split added that the monolith never had.

* fix(agent-send-target): acknowledge delivery even when picker closes bef (#17835)

Delivery callbacks and telemetry belong to the completed send operation, not to the
picker instance that launched it. Remove early returns that skipped delivery
acknowledgment and success toast when the popover was already closed.

* fix(mobile-native-chat): retire an image echo glued with the send beside it (#17783)

* fix(mobile-native-chat): retire an image echo glued with the send beside it

A message sent with images could render two or three times over, with the copy
carrying the photos sorting below the reply that answered it — and it never
cleared.

A send issued while the agent is mid-turn is glued onto the agent's input line
with any send adjacent to it, so the pair lands as one transcript row whose text
is the concatenation. Every retirement path then declined the pair:

- The image matcher wanted the whole row to equal the echo's text, so a glued
  row never bound. That also stranded the local preview: the phone's photo never
  reached the authoritative row.
- The exact-count path skips image echoes by design.
- The glue path excluded image echoes too, which made one a *barrier* — splitting
  the run so the text-only send beside it was left alone, and a lone match is
  rejected as an ordinary landing.

So neither echo could ever retire, and the unmatched image echo fell through to
the trailing bucket, which is what put it below the reply.

Match a glued row in the image matcher, and let an image echo take part in the
glue pass once its preview has been rebound. It stays a barrier while unbound,
so the existing guarantee is kept: an image echo never retires before its local
preview reaches the transcript row, or the photo would disappear.

* fix(mobile-chat): require image provenance for glued prefix matches

---------

Co-authored-by: Merge Sim <sim@local>

* refactor(renderer): split oversized UI surfaces

(cherry picked from commit da89be4)

* fix(renderer): keep split imports lint-clean

(cherry picked from commit c778ac7)

* fix(renderer): preserve extracted lifecycle and retention behavior

(cherry picked from commit 1731f2a)

* chore(max-lines): prune refactored file suppressions

(cherry picked from commit 787228e)

* fix(status-bar): preserve Git refresh ordering after split

(cherry picked from commit e65d298)

* fix(lint): preserve TaskPage effect suppressions after split

(cherry picked from commit 4a3bc23)

* fix(status-bar): preserve workspace-space review and agent freshness

(cherry picked from commit 9455e31)

* fix(automations): preserve Escape drill-out behavior

(cherry picked from commit 790680d)

* fix(renderer): restore worktree palette behavior after split

(cherry picked from commit 0b78c1c)

* style(renderer): format palette project candidates

(cherry picked from commit 1e93d66)

* refactor(renderer): finish worktree palette extraction

(cherry picked from commit ea8e6e5)

* fix(renderer): document intentional render-time refs

(cherry picked from commit 6fc78dd)

* chore(max-lines): prune stale lifecycle baseline

(cherry picked from commit 42bf3eb)

* fix(renderer): preserve status localization parity

(cherry picked from commit 0a802c7)

* fix(renderer): preserve floating editor visibility

(cherry picked from commit bcf715b)

* fix(automations): preserve destination form save semantics

(cherry picked from commit a793b07)

* fix(renderer): preserve Codex sign-in behavior

(cherry picked from commit 81f4803)

* fix(renderer): preserve palette create telemetry

(cherry picked from commit b13c2b1)

* style(renderer): format extracted palette modules

* refactor(automations): extract list toolbar and drop dead list projection

* fix(lint): drop unused exhaustive-deps suppression after split

The split's dependency list no longer trips the rule, so the directive is dead
and the changed-code quality gate rejects it.

* fix(renderer): document pre-split render-time refs in workspace search

Both assignments are verbatim from the pre-split monolith; the split relocated
them onto changed lines, which the React Doctor gate scans.

* refactor(renderer): split runtime and store modules

(cherry picked from commit 207bef0)

* fix(renderer): merge split runtime imports

(cherry picked from commit 90bf505)

* chore(max-lines): prune runtime baseline entries

(cherry picked from commit 08820a4)

* fix(renderer): preserve accepted visibility snapshots

(cherry picked from commit bc5f8a5ac5b8e8ad3fc59250795842e663bad0ee)

* refactor(preload): split bridge API modules

(cherry picked from commit b77e318)

* test(preload): census split GitHub bridge owners

(cherry picked from commit cd08e4e)

* fix(preload): merge split plugin imports

(cherry picked from commit 682ff4f)

* chore(max-lines): prune preload baseline entry

(cherry picked from commit aad2e1e)

* fix(pty,remote): close the pty master fd leak and two remote-terminal defects

#8362: node-pty leaves the forkpty()/posix_openpt() master without FD_CLOEXEC,
so on Linux every later child of the process -- both later pty children and
plain child_process spawns -- inherits it and keeps the /dev/pts device alive.
Measured on Linux with stock node-pty 1.1.0: master fd flags 0404002
(cloexec=false), and 17 -> /dev/pts/ptmx present in both a later pty child's
/proc/self/fd and a later child_process child's. Extend the existing node-pty
patch with pty_cloexec() on both PtyFork spawn paths; after the patch the flags
read 02404002 (cloexec=true) and neither child sees the master. This covers the
app and terminal daemon only -- the SSH relay installs node-pty from npm on the
remote host, so it stays exposed (see the report).

#8414: the inspection queue's fire-and-forget `.finally()` chain re-raised a
rejecting inspection as a renderer-global unhandledrejection, which an
unreachable runtime produced on every cadence tick.

#9194: `tab_not_found` is the host's definitive "no such tab", but the close
path cleared the close intent for it exactly like a dropped connection, so a
host that keeps republishing the dead surface re-materialized the pane the user
just closed. Keep that intent and drop its TTL. Also route the banner's
"Remote terminal was closed." line through translate() so it stops mixing
English into a localized banner.

* fix(pty): retire the node-pty master fd instead of probing around it

node-pty hands the master to libuv, which closes it on EIO/EOF, but `_close()`
never invalidated `_fd` and neither `resize()` nor the `process` getter consulted
anything. A late ioctl therefore addressed whatever the kernel had since reissued
that number to. On Linux the very next pty gets it: resizing an exited handle
silently resized an unrelated live pane, with no error for #17832's
probe-retry-classify to observe.

Retire `_fd` in the same block that gives up the master and guard both fd-addressed
syscalls on it, so a stale handle is unreachable by construction. The relay's resize
keeps the isProcessAlive-proven retirement — still the only evidence of `exited` —
and drops the re-probe-and-classify arm the ioctl no longer needs.

Windows is unaffected: WindowsTerminal.resize goes through the conpty agent and
reads no fd.

* fix(pty): retire the write stream's fd copy too, and keep the resize re-probe

Two gaps in the fd-retirement change.

`CustomWriteStream` is the third fd-addressed surface and takes its own plain-number
copy of the master at spawn, so `Terminal._fd = -1` never reaches it. Its `dispose()`
only cleared a pending immediate, and it was called from `destroy()` alone — the
EIO/EOF read-error path and the socket `'close'` path both reach `_close()` without
it. A residual `_writeQueue` and an in-flight `fs.write` therefore kept addressing
the number after libuv gave it up. Retire the copy and drop the queue in `dispose()`,
and call it from `_close()`.

Restore the relay's catch-block re-probe. It was never redundant with the patch:
libuv closes the fd synchronously inside `uv_close`, before the JS `'close'` that
runs `_close()`, so the reuse window opens ahead of any JS guard; and a relay host
installs node-pty from npm, where the patch is not applied at all. The re-probe is a
`process.kill(pid, 0)` on a path already inside an exception handler.

Both existing resize tests pinned liveness with a constant mock, which is why the
deletion passed CI invisibly; the new case is alive at the pre-probe and gone by the
time the ioctl throws.

Also adds the patch's first upstream reference: microsoft/node-pty#220 named this
mechanism in 2018 and was closed 2025-12-19 as completed after only improving the
error message; #827 is still open. Tracked as #18109.

* test(pty): release the live pty before the next fd-reuse case

The new Linux write case killed its live pty without awaiting the exit, so that
master was still open when the next case spawned. Linux hands out the lowest
free descriptor, so the retired pty got N+1 while the leaked N closed during the
400ms settle -- and `does not name a live pty foreground process off the retired
descriptor` then saw its live pty take N, failing its own reuse premise by
exactly one (`expected 22 to be 23` on CI, reproduced as 19/20 in a container).

Test isolation, not a Linux behavior difference: with the descriptor released
the case passes 8/8. Await the exit like the resize case above already does, and
switch the payload command to `sleep 1` -- the line discipline echoes a leaked
write back on its own, so nothing has to read it. Note the constraint on the
block so the next case does not repeat it.

The premise assertion stays as it is. It compares two observed descriptors, not
a hardcoded number; relaxing it to "differs from the retired one" would let both
reuse cases pass vacuously on a kernel that never reissues, which is the whole
thing they exist to demonstrate.

Verified with vitest under node:24-bookworm against a source-built patched
node-pty: 7 passed, 8 runs, no flake. Negative check in the same container --
reverting the `_close()` -> `dispose()` hook fails the case with
`expected 'leak\r\n' not to contain 'leak'`, so the rewritten assertion is still
load-bearing.

---------

Co-authored-by: Brennan Benson <[email protected]>
Co-authored-by: Merge Sim <sim@local>
Co-authored-by: Jinjing <[email protected]>
@greptile-apps

greptile-apps Bot commented Sep 2, 2026

Copy link
Copy Markdown

Too many files changed for review (771 files, 100 file limit).

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ The pty delta is clean, but I'm withholding approval: the Codex-title staleness finding from the prior review (remote-session-parse-cache.ts:79) is still open and this commit does not touch the ai-vault scanner.

Reviewed changes

  • node-pty fd retirement — _close() now sets _fd = -1 and disposes CustomWriteStream, and the resize/process getter guard on the retired descriptor, so a stale handle is unreachable by construction rather than EBADF-or-reused.
  • Close-on-exec on pty masters — pty_cloexec() sets FD_CLOEXEC on both the forkpty and posix_spawn paths so later children stop inheriting the master (#8362).
  • macOS spawn error reporting — pty_posix_spawn returns a structured pty_spawn_error with a goto done cleanup, which also fixes the pre-existing off-by-one in the low_fds cleanup.
  • Load-bearing tests — fd-reuse and CLOEXEC cases in the pty tests, plus a resize re-probe race case that pins the catch-block retirement.

Pullfrog  | Fix it ➔ | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@nwparker
nwparker force-pushed the fix/relay-cpu-and-stale-pty-lifecycle branch from ccd3b8d to 030916e Compare September 2, 2026 20:51
@nwparker

nwparker commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto current main (c2fce80) and the three outstanding findings are addressed. Verified by comparing final file content against main rather than reading the patch: main is a strict ancestor of this branch, and the whole git diff origin/main is the PR's own work — src/main/daemon/node-pty-fd-leak.test.ts, which main has since improved, is byte-identical to main here.

The branch previously carried a squash of #17930 that had a stale main merged into it (771 files, deleting things main has since added, e.g. node-pty-unavailable-diagnosis.ts). That is gone; #17930's actual work — the node-pty _fd retirement patch, node-pty-master-fd-retirement.test.ts, and the pty-handler resize comment/probe adjustment — is replayed onto current main as its own commit, and the lockfile's patch hash moves with it.

What changed since the last push

  1. fix(ai-vault): refresh the Codex title on a remote parse-cache hit #17938 folded in, not stacked (pullfrog, the blocker). Without it this PR ships a real regression: the remote scanner used to re-parse every transcript on the 30 s forced rescan, so a Codex title written into session_index.jsonl after the rollout did surface. Codex sources set no contentDependencyPath, so (mtime, size) cannot see it. fix(ai-vault): refresh the Codex title on a remote parse-cache hit #17938 is closed with a pointer here.
  2. A reap now publishes its exit (greptile P1). reapExitedPty told only the relay-internal listener, so a retired record left the pane mounted against a session the relay had forgotten. It publishes code: -1 through the same path onExit uses, guarded against overwriting or duplicating a real exit code.
  3. Close decisions rescan the process table (greptile P1). pty.hasChildProcesses — the RPC that gates the window-close confirmation and workspace cleanup's idle evidence — now takes a fresh snapshot. pty.inspectProcess stays TTL-cached because it is the polled path, and making it fresh would run one ps per pane per tick, giving back the entire result this PR is about. The residual on the tab-close guard is spelled out in the inline reply.

pnpm tc, pnpm test src/main/ssh src/relay src/main/ai-vault src/main/pty src/main/daemon (554 files, 6128 tests) and pnpm run check:code-quality:changed all pass. Each new test fails on the pre-fix tree.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found. The prior Codex-title staleness finding is addressed cleanly with the shared local/remote title-refresh helper, and the freed-relay changes are correct and well-tested.

Reviewed changes

  • Remote codex-title refresh on reuse — parseRemoteSessionFileCached takes a refreshReusedSession hook; codex sources supply one that re-derives the title from session_index.jsonl on a cache hit, so an index-only rename surfaces within one scan without re-reading the transcript.
  • Shared title-refresh helper — refreshCachedCodexTitle's body was extracted into refreshCodexTitleFromIndex, so the local and remote reuse paths can't drift.
  • Reaped exits are published — reapExitedPty now emits pty.exit { code: -1 } for a proven-gone pid, guarded against double-publishing node-pty's natural exit.
  • Fresh rescan for close decisions — pty.hasChildProcesses passes { fresh: true } so a destructive close sees a child started inside the poll TTL; the polled pty.inspectProcess stays on the cached snapshot.
  • Tests — new cases pin the index-only title refresh, the reaped-exit publication, and the no-double-exit guarantee, plus the fresh-vs-cached scan split.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

pty.resize gated only on `managed.disposed`, which is bookkeeping rather than
liveness. A shell that exits without node-pty's `onExit` leaves an undisposed
entry holding a closed master fd, and UnixTerminal.resize has no fd guard, so
the ioctl threw `ioctl(2) failed, EBADF` into the dispatcher's generic
parse-error catch. Nothing retired the entry, so it stayed advertised and kept
activePtyCount above zero -- which is what stops a relay with an unlimited
grace from reaching its idle-no-ptys exit (#12423). Probe liveness with the
same helper attach/listProcesses use, retire a provably dead pid, and contain
an ioctl failure over a live-or-unverifiable process.

processHasChildren forked `pgrep -P` per pane per inspection poll, uncached.
procps-ng opens six procfs files per process to resolve one ppid, so each call
cost O(host process count). Answer from the TTL-cached `ps` table the same RPC
already captured for the foreground lookup (#13537).

The remote AI Vault scanner had no parse cache at all, so every forced rescan
re-read and re-parsed the whole transcript corpus, including files untouched
for a month. Give it the mtime+size keyed memo the local scanner has (#13753).
…#17930)

Carried forward from PR #17930, which merged into this branch. Rebased onto
current main; main's newer node-pty-fd-leak test is kept as-is.
The remote cache keys on the transcript's (mtime, size, host), but codex
titles live in $CODEX_HOME/session_index.jsonl and are written after the
rollout — so a cache hit froze the fallback title forever. Mirrors the
local scanner's existing reuse-path refresh via a shared core.
…cisions

Two review findings on the CPU work.

reapExitedPty told only the relay-internal exit listener, so a retirement left
the client's pane mounted against a session the relay had already forgotten --
the next attach answered `PTY "<id>" not found` with nothing before it to
explain why. Pre-existing on three probe paths; resize made it user-triggered.
Publish the same pending-exit the natural onExit path publishes, carrying -1
("gone, status unrecoverable"), and skip it when onExit already reported the
real code.

processHasChildren now answers from a 500ms TTL-cached table. That is right for
pty.inspectProcess, which every tracked pane polls, but pty.hasChildProcesses
gates the window-close confirmation and workspace cleanup's idle evidence --
one destructive decision per answer, where a child started inside the window
would be killed unasked. Give that RPC a fresh scan; pgrep used to.
The publication is a verdict the client acts on by retiring the pane, so it
must not be reachable from the disposed-record sweep, which retires off our own
bookkeeping rather than the host's process table. Only ESRCH earns it.
@nwparker
nwparker force-pushed the fix/relay-cpu-and-stale-pty-lifecycle branch from 030916e to a5b70ff Compare September 2, 2026 21:10
@nwparker

nwparker commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto current main (817827be5b98), now a5b70ff7e7e.

Two reasons beyond staying current:

static analysis was red on main, not on this PR. src/shared/process-table-snapshot.ts was 308 code lines against the 300 cap, so every open PR inherited the failure. #18246 fixed it by moving the index machinery to src/shared/process-table-index.ts — which this branch had to resolve, since pty-shell-utils.ts imports getProcessTableIndex from there now and getFreshProcessTableSnapshot from the original module.

One self-correction on the exit-publication fix. Publishing pty.exit from reapExitedPty made the verdict reachable from the disposed-record sweep, which retires off our own bookkeeping — managed.disposed says we tore the record down, not that the shell died. A client that receives pty.exit retires the pane, so nothing weaker than ESRCH from the owning host may reach it (docs/reference/ssh-execution-boundary.md). reapExitedPty now takes explicit 'exited' | 'record-torn-down' evidence and only the former publishes. Every probe path — attach, resize, the kill retry, the listing sweep — goes through reapPtyProvenExited, so greptile's finding stays fixed; only the bookkeeping path is silent, exactly as it was before this PR.

Re-verified on the rebased tree: pnpm tc, oxlint, pnpm test src/main/ssh src/relay src/main/ai-vault src/main/pty src/main/daemon (555 files, 6160 tests), and pnpm run check:code-quality:changed (0 new findings).

Docker SSH lane: 10 passed, 2 skipped, 2 failed, and neither failure is this PR's.

  • ssh-docker-bulk-open-freeze-repro.spec.ts:62 calls startDockerSshRelayTarget() with no argument while the helper requires TestInfo and reads testInfo.workerIndex. Both lines are identical on main, so it fails there too.
  • ssh-docker-relay-perf.spec.ts:267 (git churn) missed its first keystroke echo. Re-run in isolation on this same commit it passes at median 144.0 ms / worst 149.9 ms — better than the 159.5 ms the same spec recorded on a sibling branch. The lane failure was contention from a repo-wide oxlint I had running against the same machine, not a latency regression: nothing on the typing path changed, since pty.inspectProcess still answers from the shared snapshot and only pty.hasChildProcesses rescans.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

  • Evidence-gated exit publication — reapExitedPty now takes an evidence: 'exited' | 'record-torn-down' parameter, and publishReapedExit only runs on 'exited'. The listing sweep splits the managed.disposed branch (our own bookkeeping, no shell-death verdict) out of reapPtyProvenExited (proven ESRCH) so a torn-down record can never emit a pty.exit { code: -1 } the host did not prove.
  • Documentation — the publishReapedExit and reapPtyProvenExited JSDoc plus the "does not republish" test comment now state the ssh-execution-boundary contract: only ESRCH earns an exited verdict, and bookkeeping disposal stays silent on the wire while still reaching notifyExitListener.

The disposition is correct: every disposeManagedPty site already calls notifyExitListener first, so the prior unconditional publish was gated off in practice — this change removes reliance on that invariant and separates the wire verdict from relay-internal bookkeeping, matching docs/reference/ssh-execution-boundary.md. Targeted tests pass (pty-handler-resize-stale-pty, pty-shell-utils: 41 passed).

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
config/patches/[email protected] (1)

58-58: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Preserve the Windows native targets or remove their runtime paths.

binding.gyp deletes pty and conpty_console_list, but WindowsPtyAgent still selects pty below build 18309 and the non-DLL cleanup agent still loads conpty_console_list. A source rebuild emits neither addon. Retained prebuilds only mask this when a matching prebuild is available; otherwise WinPTY startup or non-DLL cleanup can fail.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: bc9eeee5-8486-48a2-b773-5c217d0a4ae8

📥 Commits

Reviewing files that changed from the base of the PR and between 817827b and a5b70ff.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (14)
  • config/patches/[email protected]
  • src/main/ai-vault/remote-session-parse-cache.test.ts
  • src/main/ai-vault/remote-session-parse-cache.ts
  • src/main/ai-vault/remote-session-scanner-codex-index.ts
  • src/main/ai-vault/remote-session-scanner-sources.ts
  • src/main/ai-vault/remote-session-scanner.ts
  • src/main/ai-vault/session-scanner-codex-cached-title.ts
  • src/main/ai-vault/session-scanner-parse-cache.ts
  • src/main/pty/node-pty-master-fd-retirement.test.ts
  • src/relay/pty-handler-resize-stale-pty.test.ts
  • src/relay/pty-handler-spawn-admission.test.ts
  • src/relay/pty-handler.ts
  • src/relay/pty-shell-utils.test.ts
  • src/relay/pty-shell-utils.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 0 remain after this review.

Comment thread src/relay/pty-handler.ts
this.agentSessionOwners.release(managed.id)
disposeManagedPty(managed)
this.removePty(managed.id)
this.clearPtyFlowState(managed.id)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Preserve the synthetic exit until publication succeeds.

Line 2263 clears pendingOutputByPty and pendingExitByPty immediately after publishReapedExit. If output is queued due to source or legacy backpressure, publishPendingExit defers the code: -1 exit. This cleanup then deletes it before a capacity callback can retry publication. The client can remain mounted on a session that the relay has retired.

Keep pending output and the pending exit through normal drain, as the physical onExit path does. Clear only non-delivery state during reaping.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

  • Restored dropped i18n key — the rebase had dropped the activityOptions key from en.json, which activity-thread-options-menu.tsx:104 still references; it is restored, and the missing trailing comma on showChildAgents is fixed.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

  • Restored dropped i18n keys in en.json — the rebase dropped dashboard.sidebar.openActivity and dashboard.sidebar.closeActivity, which SidebarHeader.tsx:41 still references; both are restored and the missing trailing comma on dashboardLabel is fixed, completing the rebase repair begun by the prior activityOptions restore.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@nwparker
nwparker merged commit 39330c5 into main Sep 2, 2026
17 checks passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…ll scan storms (stablyai#17832)

* fix(relay): stop three CPU growth terms in a long-running remote session

pty.resize gated only on `managed.disposed`, which is bookkeeping rather than
liveness. A shell that exits without node-pty's `onExit` leaves an undisposed
entry holding a closed master fd, and UnixTerminal.resize has no fd guard, so
the ioctl threw `ioctl(2) failed, EBADF` into the dispatcher's generic
parse-error catch. Nothing retired the entry, so it stayed advertised and kept
activePtyCount above zero -- which is what stops a relay with an unlimited
grace from reaching its idle-no-ptys exit (stablyai#12423). Probe liveness with the
same helper attach/listProcesses use, retire a provably dead pid, and contain
an ioctl failure over a live-or-unverifiable process.

processHasChildren forked `pgrep -P` per pane per inspection poll, uncached.
procps-ng opens six procfs files per process to resolve one ppid, so each call
cost O(host process count). Answer from the TTL-cached `ps` table the same RPC
already captured for the foreground lookup (stablyai#13537).

The remote AI Vault scanner had no parse cache at all, so every forced rescan
re-read and re-parsed the whole transcript corpus, including files untouched
for a month. Give it the mtime+size keyed memo the local scanner has (stablyai#13753).

* fix(pty): invalidate the descriptor when node-pty gives up the handle (stablyai#17930)

Carried forward from PR stablyai#17930, which merged into this branch. Rebased onto
current main; main's newer node-pty-fd-leak test is kept as-is.

* fix(ai-vault): refresh codex titles on the remote parse-cache reuse path

The remote cache keys on the transcript's (mtime, size, host), but codex
titles live in $CODEX_HOME/session_index.jsonl and are written after the
rollout — so a cache hit froze the fallback title forever. Mirrors the
local scanner's existing reuse-path refresh via a shared core.

* fix(relay): publish the exit a reap performs, and rescan for close decisions

Two review findings on the CPU work.

reapExitedPty told only the relay-internal exit listener, so a retirement left
the client's pane mounted against a session the relay had already forgotten --
the next attach answered `PTY "<id>" not found` with nothing before it to
explain why. Pre-existing on three probe paths; resize made it user-triggered.
Publish the same pending-exit the natural onExit path publishes, carrying -1
("gone, status unrecoverable"), and skip it when onExit already reported the
real code.

processHasChildren now answers from a 500ms TTL-cached table. That is right for
pty.inspectProcess, which every tracked pane polls, but pty.hasChildProcesses
gates the window-close confirmation and workspace cleanup's idle evidence --
one destructive decision per answer, where a child started inside the window
would be killed unasked. Give that RPC a fresh scan; pgrep used to.

* fix(relay): publish a reap's exit only on proven-exited evidence

The publication is a verdict the client acts on by retiring the pane, so it
must not be reachable from the disposed-record sweep, which retires off our own
bookkeeping rather than the host's process table. Only ESRCH earns it.

* fix(i18n): restore the activity-options key the rebase dropped

* fix(i18n): union en.json with main so the rebase cannot drop keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Remote relay busy-loops at ~95% CPU after 'ioctl(2) failed, EBADF' — host looks connected but every new terminal exits instantly

1 participant