The best way to control Claude Code, Codex and more from any computer or phone
fix(muse): the thread error banner no longer shows unredacted failure text (#29910)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Alex Southwell committed
Nov 3, 2026 at 23:39 UTC
1f87f64bfd4ee7a28540ef8f125a319ff0b65b76
2 files changed
+18
-3
packages/provider-muse/src/server/adapter.test.ts
+10
-2
@@ -767,12 +767,20 @@ describe("MuseAdapterV2", () => {
767
yield* fake.emit("turn/completed", {
768
turnId: nativeId,
769
terminal: "failed",
770
- error: { message: "Provider rejected this turn" },
770
+ error: { message: "Provider rejected this turn: api_key=abc123" },
771
});
772
const terminal = yield* harness.takeEvent("turn.terminal");
773
assert.strictEqual(terminal.status, "failed");
774
assert.strictEqual(terminal.threadDisposition, "reusable");
775
- assert.isNotNull(terminal.failure);
775
+ assert.strictEqual(
776
+ terminal.failure?.message,
777
+ "Provider rejected this turn: api_key=[REDACTED]",
778
+ );
779
+ assert.strictEqual(
780
+ harness.allEvents.findLast((event) => event.type === "provider_session.updated")
781
+ ?.providerSession.lastError,
782
+ terminal.failure?.message,
783
+ );
784
assert.isTrue(
785
harness.allEvents.some(
786
(event) =>
packages/provider-muse/src/server/adapter.ts
+8
-1
@@ -395,7 +395,14 @@ export const makeMuseAdapterV2 = Effect.fn("makeMuseAdapterV2")(function* (
395
status: OrchestrationV2ProviderSession["status"],
396
lastError: string | null = null,
397
) {
398
- session = { ...session, status, lastError, updatedAt: yield* DateTime.now };
398
+ session = {
399
+ ...session,
400
+ status,
401
+ // lastError is the thread banner, so it gets the failure item's bounded, redacted text.
402
+ lastError:
403
+ lastError === null ? null : makeProviderFailure({ message: lastError }).message,
404
+ updatedAt: yield* DateTime.now,
405
+ };
406
yield* emit({
407
type: "provider_session.updated",
408
driver: MUSE_PROVIDER,