Skip to content

fix(browser): name the missing library when chromium cannot start - #32468

Merged
bolichen97 merged 1 commit into
mainfrom
fix/30312-chromium-early-exit-reason
Nov 8, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
fix/30312-chromium-early-exit-reason

Conversation

@bolichen97

@bolichen97 bolichen97 commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: When Kiro's Chromium cannot start because a system library is missing, Browser Harness says so at once and names the library, instead of a 60 s wait that ends in a generic timeout.

On a Linux host whose Kiro's Chromium needs a shared library the system lacks, Settings > Browser > Connect (or an agent's first browser call) shows "connecting to Kiro's Chromium" for about 60 s, then Connection failed · the Harness daemon did not start in time. The log says only supervisor unavailable: the Harness daemon did not start in time. Nothing names the browser or the library.

Why it matters

Anyone running the gateway on a server or a minimal Linux image hits this the first time they use the browser: the agent has no browser, and the message blames the Harness daemon, which is healthy, instead of naming the one library they need to install. They wait a minute per attempt and still have nothing to search for.

Not a goal

  • A package-manager hint (dnf provides ..., apt-file search ...) or any mapping from a library name to a package: the loader's own line already names the file to look up.
  • Making a browser that cannot load start anyway, such as the headless-shell fallback for a too-old libcups (fix(browser): use the headless shell where libcups cannot load chrome #32210).
  • Capturing Chromium's stderr on Windows, where the browser keeps its debugging port: a browser that exits during the start is reported there by its exit code alone.
  • Keeping or showing Chromium's stderr after a successful start.

What changed (motivation → approach → change)

The browser's stderr went to /dev/null, and the start only watched the Harness daemon. A Chromium that dies at load exits 127 within milliseconds, but nothing noticed until the daemon's 60 s deadline passed.

Piece Change
Kiro's Chromium launch (macOS, Linux) stderr goes to a pipe the gateway owns and drains for the browser's whole life, keeping only the newest 4 KiB in memory, so a chatty browser never blocks and nothing is written to disk. The pipe is not asyncio's, so stopping the browser never waits on a descendant that inherited it.
The daemon wait in browser_harness/supervisor.py it also watches the browser it launched. A browser that exits fails the start at once: Kiro's Chromium exited with code 127: <its last 3 stderr lines>. For a missing library that is the loader's line, error while loading shared libraries: libnss3.so: cannot open shared object file.
Redaction of that tail the repo's one stderr-tail judge, acp/stderr_tail.py:safe_stderr_tail, checks every kept line in both spellings. If anything looks like a secret, even one wrapped across two lines, the whole tail is replaced by stderr withheld: redacted content. The judge takes an optional redact= so the supervisor keeps the companion-aware redact_via_context; its other callers are unchanged. The supervisor reaches it through published_stderr_tail in src/kiro_crew/agent_sdk/__init__.py, as application code must not import the ACP layer. When the 4 KiB cap has cut the oldest line, that piece is dropped first.
docs/system-specs/modules/browser.md records where the stderr goes, the bound, and the new start failure.
src/kiro_crew/security_posture.py the acp/stderr_tail.py entry names the supervisor as its third caller.

Backwards compatibility

Compatible: a browser that starts behaves as before; only a start whose browser has already exited ends sooner, with a different detail string in the same error state.
Removes nothing: no key, route, state or message a reader relies on is taken away; the 60 s timeout still applies to a daemon that never answers while its browser runs.

Tests

  • test/test_browser_harness_supervisor.py::test_a_chromium_missing_a_library_fails_the_start_naming_it runs ensure() through the real /bin/sh pipe launcher against a stand-in chrome script that prints the loader's line and exits 127. It pins that the start raises exited with code 127 and that status()["detail"] carries error while loading shared libraries: libnss3.so. On origin/main it fails with the Harness daemon did not start in time once the daemon's deadline passes; with the fix it passes in about 0.1 s.
  • test_a_key_chromium_wrapped_across_lines_withholds_its_stderr feeds the supervisor a 40-character key split over two stderr lines and pins that the detail is withheld, that a clean tail keeps only its last 3 lines, and that a line the byte cap cut is never shown.
  • The two _start_daemon fakes in test_browser_harness_supervisor.py and test_browser_harness_credentials.py take the browser argument the start now passes.
  • Determinism: the new test passed 20/20 at -n0, 10/10 at -n 4 --dist loadgroup --max-worker-restart=2 beside test_browser_harness_supervisor_cov.py, and once with both supervisor files' tests in a shuffled order (seed 30312).
  • The existing fd-leak tests (test_a_pipe_launch_that_cannot_spawn_leaves_no_pipe_end_open, test_a_pipe_launch_whose_upstream_fails_stops_the_browser) cover the stderr pipe on both failure paths.

Proof: PROVEN test/test_browser_harness_supervisor.py::test_a_chromium_missing_a_library_fails_the_start_naming_it (head dc8676a)

Manual verification

A real dynamic-loader failure, not a stand-in: a small binary linked against libkcfake.so, with the library then deleted, prints ./chrome: error while loading shared libraries: libkcfake.so: cannot open shared object file: No such file or directory and exits 127. With that binary as Kiro's Chromium, a throwaway data home, and a daemon that stays up but never answers, HarnessSupervisor(home).test(90) on this branch returned after 0.5 s with connection='error' and detail="Kiro's Chromium exited with code 127: <path>/chrome: error while loading shared libraries: libkcfake.so: cannot open shared object file: No such file or directory", and left no process behind. The same start on origin/main waits out DAEMON_START_TIMEOUT_SECS (60 s) for the Harness daemon did not start in time, as the issue reports.

Related Issues

Closes #30312

Sibling sweep

Swept: git grep -n -E "chromium.executable|_launch_chromium" -- src/
Swept: git grep -n -E "stderr"?]? ?= ?subprocess.DEVNULL|stderr=subprocess.DEVNULL|stderr=asyncio.subprocess.DEVNULL" -- src/kiro_crew/browser_harness/ src/kiro_crew/computer_use/
Sibling: src/kiro_crew/browser_harness/supervisor.py:857 -- not affected -- the Windows port launcher already polls the browser's exit, and the helper worker below it reports its own failures over stdout
Sibling: src/kiro_crew/computer_use/launch_macos.py:569 -- not affected -- open -a hands off and the launch is confirmed by its window, not its exit
Sibling: src/kiro_crew/computer_use/overlay.py:313 -- not affected -- the overlay speaks JSON over stdout and is not a browser the start waits on

Pattern harvest

Rule candidate: review-prompt
Pattern: a supervisor that launches a child with stderr discarded and then waits on a second process that depends on it, so the first child's death surfaces only as the second one's timeout

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

@bolichen97
bolichen97 requested review from a team and KiroCrewCaptain as code owners November 7, 2026 16:49
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 7, 2026
@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ⏭️ skipped

Revision dc8676a99ab48d29aa1e3a1b1f1e3e35e667d0bb touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Does not block merge.

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of dc8676a99ab48d29aa1e3a1b1f1e3e35e667d0bb — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks. The fix goes at the cause: the start now watches the browser it launched instead of only the daemon that depends on it. The stderr tail it shows is size-bounded and passes through the repo's one stderr-tail redaction check.

Notes

  • _keep_stderr_tail stays registered on the loop until EOF. If a descendant of the browser inherits the write end and outlives the browser, that reader and its fd stay open until the descendant exits; the supervisor's process-group kill already bounds this.

[DESIGN-REVIEWED] dc8676a

Description read

[DESCRIPTION-READ] 0c37368cfa8ff7800c03b5ef372ea0555abca683e38922110b12080eec23cea0

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of dc8676a99ab48d29aa1e3a1b1f1e3e35e667d0bb — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Nothing blocks. One rider is a note: a new public export in agent_sdk has a single caller.

Notes

  • Item 6 — one consumer, generalized: published_stderr_tail(lines, sep, last, redact=None) is listed in agent_sdk.__all__, but grep finds exactly 1 caller (supervisor.py:_chromium_exit_detail). That caller always passes the same " | ", _CHROMIUM_STDERR_TAIL_LINES and redact_via_context. Subtraction: drop it from __all__, or remove the sep and last parameters and fix them at the one call site.

What this change ships

Inventory (7 items) — 6 justified

Intent: when Kiro's Chromium can't load a system library, the person is told right away which library is missing, instead of waiting 60 s for a timeout that blames the daemon. This is a FIX (#30312, with a test that fails on base).

  1. A browser start whose Chromium has already exited now fails at once instead of after 60 s — justified
  2. The failure text gives the exit code and the last 3 stderr lines, i.e. the loader's line naming the missing library — justified
  3. On POSIX, Chromium's stderr now goes to a pipe drained for the browser's whole life (newest 4 KiB, in memory) instead of /dev/null — justified
  4. If any kept stderr line looks like a secret, the whole tail is withheld — justified
  5. safe_stderr_tail takes an optional redact=, so callers can use the companion-aware redactor — justified
  6. New public helper agent_sdk.published_stderr_tail — one consumer, generalized sep/last
  7. _spawn takes a stderr= fd; the browser spec and the security_posture comment are updated — justified

[FIRST-PRINCIPLES-REVIEWED] dc8676a

Description read

[DESCRIPTION-READ] 62d9432f13ee2f168353b119b5a40a8edd092662cc205dc6836dfc0d5c6d3c80

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed dc8676a99ab48d29aa1e3a1b1f1e3e35e667d0bb — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] dc8676a

Verdict parsed from the review's SHA-scoped output markers for commit dc8676a99ab48d29aa1e3a1b1f1e3e35e667d0bb.

False positive or not applicable? A repository writer can comment:
/ai-review override fable dc8676a99ab48d29aa1e3a1b1f1e3e35e667d0bb false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of dc8676a99ab48d29aa1e3a1b1f1e3e35e667d0bb and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] dc8676a

False positive or not applicable? A repository writer can comment:
/ai-review override gpt dc8676a99ab48d29aa1e3a1b1f1e3e35e667d0bb false-positive: <reason, 20 to 500 characters>

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 7, 2026
@bolichen97
bolichen97 enabled auto-merge (squash) November 7, 2026 17:14
@bolichen97
bolichen97 force-pushed the fix/30312-chromium-early-exit-reason branch from 9735304 to da0924b Compare November 7, 2026 20:19
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Nov 7, 2026
@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Sensitive Change Review

Sensitive files changed:

  • src/kiro_crew/security_posture.py

  • @bolichen97 posted a complete reasoning template for dc8676a.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 7, 2026
@bolichen97
bolichen97 force-pushed the fix/30312-chromium-early-exit-reason branch from da0924b to 0fd4789 Compare November 8, 2026 01:02
@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in the Backend shard 5 and 6 tests since this head ran (0850c67 -> 666f962, which carries #32606); CI re-running.

@bolichen97

Copy link
Copy Markdown
Contributor Author
  • Item 2 — a second way to publish a child's stderr tail

fixed in 0fd4789: _chromium_exit_detail no longer redacts on its own; it calls acp/stderr_tail.py:safe_stderr_tail over every kept line, so a key wrapped across lines withholds the whole tail (stderr withheld: redacted content).
safe_stderr_tail gains an optional redact= judge so the supervisor keeps the companion-aware redact_via_context; its two existing callers are unchanged.
Pinned by test_a_key_chromium_wrapped_across_lines_withholds_its_stderr; the old code published auth key=wJalrXUtnFEMI/K7MD | ENG/... for that input.

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Nov 8, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

Sensitive change review

  • Head commit: 0fd4789
  • What rule changed: no rule. security_posture.py only edits the comment on the existing acp/stderr_tail.py entry of NON_EGRESS_REDACTION_MODULES to name the browser supervisor as a third caller. No entry is added or removed.
  • Before -> after (what was allowed/blocked, now): unchanged. The set holds the same modules; the redactor call-site guard classifies every module the same way.
  • Worst case if wrong (breaks commands / leaks secret / locks user out): a stale comment. The behaviour the comment describes is that Chromium's stderr tail is withheld whole when safe_stderr_tail flags it, pinned by test_a_key_chromium_wrapped_across_lines_withholds_its_stderr.
  • Evidence checked (which sandbox result proves it): test/test_security_posture.py (omission detection, stale-entry and both-buckets checks) passed on this head.
  • No regression:
    • Tools still work (which tools/commands were run, result): test/test_browser_harness_supervisor.py, test/test_browser_harness_credentials.py, test/test_acp_stderr_tail_redaction.py passed; local GPT and Opus reviews PASS on this head.
    • Backward compatible (old config / old data / old callers still work, how checked): safe_stderr_tail's new redact= argument defaults to security.redact, so its two existing callers behave as before (test_acp_stderr_tail_redaction.py passed).
    • Existing tests (which suites passed on this head): the four files above; full CI is running on this head.
  • How to undo: revert the PR's commit.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 8, 2026
A Kiro's Chromium that cannot load a shared library exits 127 at once,
but its stderr went to /dev/null and the start only watched the Harness
daemon, so the person waited about 60 s for "the Harness daemon did not
start in time" with no hint of the cause.

On macOS and Linux the browser's stderr now goes to a pipe the gateway
drains for the browser's life, keeping its newest 4 KiB in memory. The
daemon wait also watches the browser: one that exits fails the start at
once with its exit code and its last stderr lines, redacted, which for a
missing library is the loader's own line naming it.

Closes #30312
@bolichen97
bolichen97 force-pushed the fix/30312-chromium-early-exit-reason branch from 0fd4789 to dc8676a Compare November 8, 2026 01:42
@bolichen97

Copy link
Copy Markdown
Contributor Author

Sensitive change review

  • Head commit: dc8676a
  • What rule changed: no rule. security_posture.py only edits the comment on the existing acp/stderr_tail.py entry of NON_EGRESS_REDACTION_MODULES to name the browser supervisor as a third caller. No entry is added or removed.
  • Before -> after (what was allowed/blocked, now): unchanged. The set holds the same modules; the redactor call-site guard classifies every module the same way.
  • Worst case if wrong (breaks commands / leaks secret / locks user out): a stale comment. The behaviour the comment describes is that Chromium's stderr tail is withheld whole when safe_stderr_tail flags it, pinned by test_a_key_chromium_wrapped_across_lines_withholds_its_stderr.
  • Evidence checked (which sandbox result proves it): test/test_security_posture.py (omission detection, stale-entry and both-buckets checks) passed on this head.
  • No regression:
    • Tools still work (which tools/commands were run, result): test/test_browser_harness_supervisor.py, test/test_browser_harness_credentials.py, test/test_acp_stderr_tail_redaction.py passed; local GPT and Opus reviews PASS on this head.
    • Backward compatible (old config / old data / old callers still work, how checked): safe_stderr_tail's new redact= argument defaults to security.redact, so its two existing callers behave as before (test_acp_stderr_tail_redaction.py passed).
    • Existing tests (which suites passed on this head): the four files above; full CI is running on this head.
  • How to undo: revert the PR's commit.

@github-actions github-actions Bot removed the readiness: action required A blocking check or review needs attention label Nov 8, 2026
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 8, 2026

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approving. On head dc8676a the review traced the start path from _start to _start_daemon. A Chromium that exits during start now fails at once with its exit code, where before it waited out the 60 s daemon timeout. The review also checked that the stderr pipe ends are closed on every failure path. Each of three close-site mutations fails an existing fd-leak test, and the new end-to-end test fails when the fix is reverted. The Windows port path never reads the stderr buffer, and the browser.md spec update matches the code.

Done well: the fix goes at the cause. The new test runs the real /bin/sh pipe launcher against a stand-in chrome that prints the loader line and exits 127, so it reproduces the issue end to end.

Security: the PR publishes Chromium stderr that was discarded before, and safe_stderr_tail now accepts a redact= argument. Every kept line is judged in both spellings through the companion-aware redact_via_context, which fails closed. Only the last 3 lines are published, and only after they pass that check. The partial line cut by the 4 KiB cap is dropped, and the agent sees at most the first line, capped at 300 characters. The existing callers of safe_stderr_tail keep the default security.redact.

Optional:

  • Closes #30312 will close an issue that also asks for a package-manager hint, and this PR rules that hint out. Consider Part of #30312 plus a follow-up issue, or a comment on the issue that records the narrower scope.
  • Add a withholding case where the key is split across the 3-line cut. The current wrapped-key case has 2 lines, so it cannot tell "judge all kept lines" apart from "judge only the published lines".
  • In published_stderr_tail (agent_sdk/init.py:167), check with sep so the spelling that is judged is the same one that is published. Once the Design note is answered, the helper could also leave __all__.

@bolichen97
bolichen97 merged commit 908add8 into main Nov 8, 2026
100 checks passed
@bolichen97
bolichen97 deleted the fix/30312-chromium-early-exit-reason branch November 8, 2026 03:19
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 8, 2026
buluoray added a commit that referenced this pull request Nov 8, 2026
…2468)

A Kiro's Chromium that cannot load a shared library exits 127 at once,
but its stderr went to /dev/null and the start only watched the Harness
daemon, so the person waited about 60 s for "the Harness daemon did not
start in time" with no hint of the cause.

On macOS and Linux the browser's stderr now goes to a pipe the gateway
drains for the browser's life, keeping its newest 4 KiB in memory. The
daemon wait also watches the browser: one that exits fails the start at
once with its exit code and its last stderr lines, redacted, which for a
missing library is the loader's own line naming it.

Closes #30312

(cherry picked from commit 908add8)

Original author: @bolichen97

Hand-resolved: added the TYPE_CHECKING import of Callable that main carries from an earlier commit, so the new published_stderr_tail annotation resolves on release.
buluoray added a commit that referenced this pull request Nov 8, 2026
…2468)

A Kiro's Chromium that cannot load a shared library exits 127 at once,
but its stderr went to /dev/null and the start only watched the Harness
daemon, so the person waited about 60 s for "the Harness daemon did not
start in time" with no hint of the cause.

On macOS and Linux the browser's stderr now goes to a pipe the gateway
drains for the browser's life, keeping its newest 4 KiB in memory. The
daemon wait also watches the browser: one that exits fails the start at
once with its exit code and its last stderr lines, redacted, which for a
missing library is the loader's own line naming it.

Closes #30312

(cherry picked from commit 908add8)

Original author: @bolichen97

Hand-resolved: added the TYPE_CHECKING import of Callable that main carries from an earlier commit, so the new published_stderr_tail annotation resolves on release.
buluoray added a commit that referenced this pull request Nov 8, 2026
…2468)

A Kiro's Chromium that cannot load a shared library exits 127 at once,
but its stderr went to /dev/null and the start only watched the Harness
daemon, so the person waited about 60 s for "the Harness daemon did not
start in time" with no hint of the cause.

On macOS and Linux the browser's stderr now goes to a pipe the gateway
drains for the browser's life, keeping its newest 4 KiB in memory. The
daemon wait also watches the browser: one that exits fails the start at
once with its exit code and its last stderr lines, redacted, which for a
missing library is the loader's own line naming it.

Closes #30312

(cherry picked from commit 908add8)

Original author: @bolichen97

Hand-resolved: added the TYPE_CHECKING import of Callable that main carries from an earlier commit, so the new published_stderr_tail annotation resolves on release.
buluoray added a commit that referenced this pull request Nov 8, 2026
…2468)

A Kiro's Chromium that cannot load a shared library exits 127 at once,
but its stderr went to /dev/null and the start only watched the Harness
daemon, so the person waited about 60 s for "the Harness daemon did not
start in time" with no hint of the cause.

On macOS and Linux the browser's stderr now goes to a pipe the gateway
drains for the browser's life, keeping its newest 4 KiB in memory. The
daemon wait also watches the browser: one that exits fails the start at
once with its exit code and its last stderr lines, redacted, which for a
missing library is the loader's own line naming it.

Closes #30312

(cherry picked from commit 908add8)

Original author: @bolichen97

Hand-resolved: added the TYPE_CHECKING import of Callable that main carries from an earlier commit, so the new published_stderr_tail annotation resolves on release.
buluoray added a commit that referenced this pull request Nov 8, 2026
…2468)

A Kiro's Chromium that cannot load a shared library exits 127 at once,
but its stderr went to /dev/null and the start only watched the Harness
daemon, so the person waited about 60 s for "the Harness daemon did not
start in time" with no hint of the cause.

On macOS and Linux the browser's stderr now goes to a pipe the gateway
drains for the browser's life, keeping its newest 4 KiB in memory. The
daemon wait also watches the browser: one that exits fails the start at
once with its exit code and its last stderr lines, redacted, which for a
missing library is the loader's own line naming it.

Closes #30312

(cherry picked from commit 908add8)

Original author: @bolichen97

Hand-resolved: added the TYPE_CHECKING import of Callable that main carries from an earlier commit, so the new published_stderr_tail annotation resolves on release.
buluoray added a commit that referenced this pull request Nov 8, 2026
…2468)

A Kiro's Chromium that cannot load a shared library exits 127 at once,
but its stderr went to /dev/null and the start only watched the Harness
daemon, so the person waited about 60 s for "the Harness daemon did not
start in time" with no hint of the cause.

On macOS and Linux the browser's stderr now goes to a pipe the gateway
drains for the browser's life, keeping its newest 4 KiB in memory. The
daemon wait also watches the browser: one that exits fails the start at
once with its exit code and its last stderr lines, redacted, which for a
missing library is the loader's own line naming it.

Closes #30312

(cherry picked from commit 908add8)

Original author: @bolichen97

Hand-resolved: added the TYPE_CHECKING import of Callable that main carries from an earlier commit, so the new published_stderr_tail annotation resolves on release.
buluoray added a commit that referenced this pull request Nov 8, 2026
…2468)

A Kiro's Chromium that cannot load a shared library exits 127 at once,
but its stderr went to /dev/null and the start only watched the Harness
daemon, so the person waited about 60 s for "the Harness daemon did not
start in time" with no hint of the cause.

On macOS and Linux the browser's stderr now goes to a pipe the gateway
drains for the browser's life, keeping its newest 4 KiB in memory. The
daemon wait also watches the browser: one that exits fails the start at
once with its exit code and its last stderr lines, redacted, which for a
missing library is the loader's own line naming it.

Closes #30312

(cherry picked from commit 908add8)

Original author: @bolichen97

Hand-resolved: added the TYPE_CHECKING import of Callable that main carries from an earlier commit, so the new published_stderr_tail annotation resolves on release.
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.

A missing system library for the browser gives a 60 s generic timeout with no library name or install hint

2 participants