You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Non-Latin-1 text: (a) tasks attachment download puts the raw file name in a response header (HTTP 500 + ByteString TypeError); (b) bb secrets CLI bare fetch() hits undici's 300s headersTimeout while the human fills the form #1621
confirmed-reproBug reproduced again from a clean trusted checkout; see linked reporthostHost daemon, process lifecycle, memory, event loopsecretsBuilt-in plugin: secrets
When text fields routed through the interaction/plugin-CLI response path contain non-Latin-1 characters (observed: em dash, U+2014 / charCode 8212), the server throws an unhandled TypeError while constructing response Headers, the response dies, and the CLI caller sees only a generic fetch failed after a long hang. Agent-authored text makes this a high-frequency trap: LLM agents use em dashes constantly, so unattended bb secret request calls fail in a way that looks like broken vault infrastructure.
Observed
Production server log (~/.bb/logs/server.6.log), 12 unhandled errors in one burst — three distinct header values (em dash at index 35 / 43 / 46), each retried 4x:
{"level":50,"time":1786733867423,"component":"server","err":{"type":"TypeError","message":"Cannot convert argument to a ByteString because the character at index 43 has a value of 8212 which is greater than 255.","stack":"TypeError: ... at new Headers (node:internal/deps/undici/undici:11124:36) at get headers (.../server/dist/start-server.js:279347:21) at set res (.../start-server.js:281376:38) at dispatch ..."},"msg":"Unhandled server error"}
Timestamps: 2026-08-14T18:57:47Z (burst of 12).
Client-side symptom in the invoking agent thread: bb secret request NAME --purpose "…" --describe … --write-env … hangs ~4 min, then fails with fetch failed. No credential produced, no actionable error.
Three consecutive real-world failures were misdiagnosed as "vault fetch path broken" before log inspection found the header serialization crash.
Control test (isolates the trigger)
Same host, same day: bb secret request FS_TEST_PROBE --purpose "ASCII only transport probe - safe to cancel" --write-env /tmp/probe.env — pure-ASCII text — completed cleanly, including a ~2.5-minute held connection while the human filled the form. Transport and long-hold are fine; the non-Latin-1 header value is the trigger.
Expected
Free-text fields (title/purpose/describe or any user/agent-authored text) must never be placed raw into HTTP header values; encode (RFC 8187) or move to the body.
If header serialization fails anyway, surface a structured error to the caller (invalid characters in <field>), not a dead connection retried 4x into fetch failed.
Impact
Any unattended agent workflow that requests credentials via the secrets plugin fails nondeterministically based on punctuation. Workaround until fixed: keep all bb secret request text fields ASCII-only.
Verdict: PARTIALLY REPRODUCED · root-cause confidence: high
Root cause (short): Two unrelated things: (a) the secrets/plugin-CLI/interaction path never puts text into headers (em-dash requests succeed end to end); the user-visible 'hangs then fetch failed' is the CLI's single bare fetch() to POST /api/v1/plugins/secrets/cli hitting undici's default 300 s headersTimeout while the human fills the form, which aborts the pending interaction; (b) the logged ByteString TypeError is a real bug in the bundled tasks plugin: its attachment download route puts the raw attachment file name into Content-Disposition filename="..." (sanitizeFileName keeps non-Latin-1 chars), and @hono/node-server's lazily-validated Response makes Hono log it (levels at or outside compress)+1 times per request (4 on 0.37.0, 5 on main) while the client gets a JSON 500 / broken .
Proposed fix: (1) plugins/tasks/attachments/index.ts download route: follow RFC 6266 -- filename="<ASCII fallback: fileName.replace(/[^\x20-\x7e]/g,'-') with quotes/backslashes stripped>"; filename*=UTF-8'' (or drop filename= and keep only filename*); the failing unit test plugins/tasks/attachments/issue-1621-non-latin1-filename.test.ts encodes the expected header. (2) Harden packages/plugin-sdk/src/internal/host-policy.ts adoptHttpRouteResponse to always rebuild new Response(body, {status, statusText, headers: new Headers(value.headers)}) so an invalid header value throws once at the plugin invoke…
Caveats: The tasks-attachment source of the reporter's 12 log lines is inferred from the identical message/stack, the per-request count rule (4 on 0.37.0) and the index arithmetic (35/43/46 = 'inline; filename="' or 'attachment; filename="' prefix + dash offset); the reporter did not include the header value, so which route/files produced their burst is not proven, only shown to be a bundled bb entry point…
The report has copy-paste repro steps, screenshots where the bug is visual, code permalinks at 16ceb3a54, and repro artifacts. It was independently re-run by a second agent (see its Verification section).
changed the title [-]Non-Latin-1 chars (em dash) in interaction/secret-request text crash server response serialization; client sees only 'fetch failed'[/-][+]Non-Latin-1 text: (a) tasks attachment download puts the raw file name in a response header (HTTP 500 + ByteString TypeError); (b) bb secrets CLI bare fetch() hits undici's 300s headersTimeout while the human fills the form[/+]on Aug 18, 2026
Retitled to the two real defects (https://get-bb.github.io/reports/issues/1621.html). Refuted: the secrets/plugin-CLI/interaction path never places request text in HTTP headers — em dashes in --purpose, --describe, and the secret value succeed end to end (HTTP 200, file written). What is real: (a) the bundled tasks plugin's GET /api/v1/plugins/tasks/http/attachments/download sets Content-Disposition: filename=<raw name> — a non-Latin-1 file name gives HTTP 500 and the ByteString TypeError log lines, and the task detail view re-fails on every render; fix is RFC 6266 (filename= ASCII fallback + filename*=UTF-8''…), failing unit test in the report. (b) the CLI's single bare fetch() to POST /api/v1/plugins/secrets/cli aborts after undici's default 300 s headersTimeout while the human is still filling the form — that is the observed "hangs then fetch failed". Both are Effort Low; happy to split (b) into its own issue if preferred.
confirmed-reproBug reproduced again from a clean trusted checkout; see linked reporthostHost daemon, process lifecycle, memory, event loopsecretsBuilt-in plugin: secrets
Activity
docs(finite-state): interim ASCII-only rule for bb secret request text (
SawyerHood commentedon Aug 18, 2026
Reproduction & root-cause report: https://get-bb.github.io/reports/issues/1621.html
The report has copy-paste repro steps, screenshots where the bug is visual, code permalinks at
16ceb3a54, and repro artifacts. It was independently re-run by a second agent (see its Verification section).[-]Non-Latin-1 chars (em dash) in interaction/secret-request text crash server response serialization; client sees only 'fetch failed'[/-][+]Non-Latin-1 text: (a) tasks attachment download puts the raw file name in a response header (HTTP 500 + ByteString TypeError); (b) bb secrets CLI bare fetch() hits undici's 300s headersTimeout while the human fills the form[/+]SawyerHood commentedon Aug 18, 2026
Retitled to the two real defects (https://get-bb.github.io/reports/issues/1621.html). Refuted: the secrets/plugin-CLI/interaction path never places request text in HTTP headers — em dashes in
--purpose,--describe, and the secret value succeed end to end (HTTP 200, file written). What is real: (a) the bundled tasks plugin'sGET /api/v1/plugins/tasks/http/attachments/downloadsetsContent-Disposition: filename=<raw name>— a non-Latin-1 file name gives HTTP 500 and the ByteString TypeError log lines, and the task detail view re-fails on every render; fix is RFC 6266 (filename=ASCII fallback +filename*=UTF-8''…), failing unit test in the report. (b) the CLI's single barefetch()toPOST /api/v1/plugins/secrets/cliaborts after undici's default 300 sheadersTimeoutwhile the human is still filling the form — that is the observed "hangs then fetch failed". Both are Effort Low; happy to split (b) into its own issue if preferred.Fix non-Latin-1 attachment names and plugin CLI headers timeout (#1621)
Fix non-Latin-1 attachment names and plugin CLI headers timeout (get-…