Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
118d432
feat(agent-session): a queued message can carry the failed start it w…
brennanb2025 Oct 1, 2026
2f05224
fix(native-chat): record a failed start on the message it was for, an…
brennanb2025 Oct 1, 2026
17d0744
fix(native-chat): a restart continuation whose start failed waits lik…
brennanb2025 Oct 1, 2026
69f7fe2
feat(native-chat): say an agent isn't installed before trying to star…
brennanb2025 Oct 1, 2026
401309b
feat(native-chat): a message waiting for its next start says why
brennanb2025 Oct 1, 2026
c1e2bd9
Merge remote-tracking branch 'origin/main' into brennanb2025/chat-sta…
brennanb2025 Oct 1, 2026
7ab64d0
fix(native-chat): a message Orca starts again on its own no longer al…
brennanb2025 Oct 1, 2026
15344a6
fix(native-chat): only a start refused before it ran is tried again; …
brennanb2025 Oct 1, 2026
bd237de
fix(native-chat): a message waiting for its next start wakes the loop…
brennanb2025 Oct 1, 2026
bb52ce8
fix(native-chat): restart Continue reports a failed start on its mess…
brennanb2025 Oct 1, 2026
5d26c92
fix(native-chat): a /compact waiting for its next start leaves the co…
brennanb2025 Oct 1, 2026
be493a2
fix(native-chat): Stop is offered while a message waits for its next …
brennanb2025 Oct 1, 2026
16704af
fix(native-chat): a message that fails for good after a later one fin…
brennanb2025 Oct 1, 2026
42dff33
fix(native-chat): an older start's failure row no longer hides why a …
brennanb2025 Oct 1, 2026
3f901e7
fix(native-chat): a goal or rewind waits for the agent's start outsid…
brennanb2025 Oct 1, 2026
1dd249b
Merge remote-tracking branch 'origin/main' into brennanb2025/chat-sta…
brennanb2025 Oct 1, 2026
cd96aee
fix(native-chat): a restart continuation rejected at handover reads a…
brennanb2025 Oct 1, 2026
06b6056
fix(native-chat): a queued card whose agent failed to start no longer…
brennanb2025 Oct 1, 2026
7eb821f
fix(native-chat): only a restart continuation whose agent failed to s…
brennanb2025 Oct 1, 2026
bc1e846
fix(orchestration): a structured worker whose task never reached its …
brennanb2025 Oct 1, 2026
7b20ee9
fix(native-chat): a message its failed start rejected reads as never …
brennanb2025 Oct 1, 2026
d16f647
fix(native-chat): only the real spawn checks that the agent CLI is in…
brennanb2025 Oct 1, 2026
5409352
fix(native-chat): an agent that ended before taking the message count…
brennanb2025 Oct 1, 2026
e53da3f
fix(native-chat): a start whose process could not be proven gone is r…
brennanb2025 Oct 1, 2026
d247143
fix(native-chat): a try that comes due during the loop's step still g…
brennanb2025 Oct 1, 2026
e07f0ff
fix(native-chat): only a failure for good outranks a later finished turn
brennanb2025 Oct 1, 2026
81af760
fix(native-chat): Stop on a message waiting for its next start no lon…
brennanb2025 Oct 1, 2026
696296d
fix(native-chat): a message whose start failed for good is notified o…
brennanb2025 Oct 1, 2026
8ac6105
test(native-chat): each queued message whose start failed is notified…
brennanb2025 Oct 1, 2026
d529b3a
fix(native-chat): a /compact gone past while it waits out a refused s…
brennanb2025 Oct 1, 2026
207e668
docs(native-chat): comments say a failed start is rejected, and only …
brennanb2025 Oct 1, 2026
a067dde
fix(native-chat): no call waits for an agent's start inside the chat'…
brennanb2025 Oct 1, 2026
38e0946
fix(native-chat): a message sent from elsewhere whose start failed st…
brennanb2025 Oct 1, 2026
ada3385
refactor(native-chat): only the start step's refusal can book another…
brennanb2025 Oct 1, 2026
b8a94ab
refactor(native-chat): the waiting message's record is `startRetry`, …
brennanb2025 Oct 1, 2026
26df5cc
fix(native-chat): a message waiting for its next start shows no "Work…
brennanb2025 Oct 1, 2026
bc4e325
fix(native-chat): a message whose start failed for good stays where i…
brennanb2025 Oct 1, 2026
fc880df
fix(native-chat): a new chat whose agent cannot start is created at r…
brennanb2025 Oct 1, 2026
6eea3fe
Merge remote-tracking branch 'origin/main' into brennanb2025/chat-sta…
brennanb2025 Oct 1, 2026
3561d6d
fix(native-chat): close the type seams the merge left: one-argument f…
brennanb2025 Oct 1, 2026
54f9bba
fix(native-chat): a failed start whose stop cannot prove the exit wai…
brennanb2025 Oct 1, 2026
4c59cbe
fix(native-chat): the phone draws a message sent elsewhere that faile…
brennanb2025 Oct 1, 2026
45cd5c6
fix(native-chat): a /compact gone past by a later Claude message wait…
brennanb2025 Oct 1, 2026
6a5698f
fix(native-chat): no "failed" notification for a /compact, or for a w…
brennanb2025 Oct 1, 2026
4ffbd7e
fix(native-chat): a Retry's new message names the one it sends again,…
brennanb2025 Oct 1, 2026
bf1b323
Revert "fix(native-chat): a Retry's new message names the one it send…
brennanb2025 Oct 1, 2026
a37c353
fix(native-chat): Retry of a message no agent took queues that same m…
brennanb2025 Oct 1, 2026
d76bcac
fix(native-chat): what ended a waiting message's wait is the submissi…
brennanb2025 Oct 1, 2026
efa5aec
fix(native-chat): on a host that cannot retry in place, this desktop'…
brennanb2025 Oct 1, 2026
6e4be13
Revert "fix(native-chat): on a host that cannot retry in place, this …
brennanb2025 Oct 1, 2026
2cc8635
test(native-chat): the handover-block fixture keeps its handover flag…
brennanb2025 Oct 1, 2026
0ed94b9
fix(native-chat): a Retry after the chat was closed, put to rest or O…
brennanb2025 Oct 1, 2026
b9be5e6
fix(native-chat): a Retry pressed before the host has answered waits,…
brennanb2025 Oct 1, 2026
8d9fb5d
fix(native-chat): one rule for a message that failed before any agent…
brennanb2025 Oct 1, 2026
cc07b61
fix(native-chat): the latest request walks back only to the newest tu…
brennanb2025 Oct 1, 2026
e6e0e26
docs(native-chat): two comments still said a Retry always sends a new…
brennanb2025 Oct 1, 2026
79ee371
revert(native-chat): a new chat whose agent cannot start is refused a…
brennanb2025 Oct 1, 2026
058a1d7
fix(native-chat): a /compact whose start is refused before it ran is …
brennanb2025 Oct 1, 2026
dd8271c
test(native-chat): a failure written while a later turn ran reads Don…
brennanb2025 Oct 1, 2026
48d0d30
Reapply "fix(native-chat): on a host that cannot retry in place, this…
brennanb2025 Oct 1, 2026
16b3224
fix(native-chat): a retired original is hidden as a row too, so it ne…
brennanb2025 Oct 1, 2026
42a16ed
fix(native-chat): a retired id hides only a send the journal still ha…
brennanb2025 Oct 1, 2026
ce581b3
fix(native-chat): a restart continuation no agent took for Orca's fau…
brennanb2025 Oct 1, 2026
60e7932
fix(native-chat): a message queued again by its Retry is drawn where …
brennanb2025 Oct 1, 2026
e8eab96
fix(native-chat): a Retry pressed before the host answers shows as pe…
brennanb2025 Oct 1, 2026
4958a24
test(native-chat): the structured session test controllers carry the …
brennanb2025 Oct 1, 2026
4aa64f7
test(native-chat): an expired-id resend leaves the in-doubt original …
brennanb2025 Oct 1, 2026
7b87ac8
test(native-chat): the restart continuation mock records its handover…
brennanb2025 Oct 1, 2026
1b850fd
Merge remote-tracking branch 'origin/main' into brennanb2025/chat-sta…
brennanb2025 Oct 1, 2026
d198703
refactor(protocol): the structured message delivery capabilities live…
brennanb2025 Oct 1, 2026
a8c9e6b
refactor(protocol): the client and host share the send-answer capabil…
brennanb2025 Oct 1, 2026
a5409cb
refactor(native-chat): no stored retired ids or held Retry presses; t…
brennanb2025 Oct 2, 2026
3ed98a7
fix(native-chat): a message waiting on a booked start retry is no ver…
brennanb2025 Oct 2, 2026
4cd3af2
fix(native-chat): Retry in place sends the message now, ahead of the …
brennanb2025 Oct 2, 2026
5e4ee13
refactor(native-chat): where a start failed decides whether Orca trie…
brennanb2025 Oct 2, 2026
8c9e418
fix(native-chat): a failed original whose words went through since as…
brennanb2025 Oct 2, 2026
108d72d
test(codex): the question-order test passes the item projector by name
brennanb2025 Oct 3, 2026
89cc5bf
Merge remote-tracking branch 'origin/main' into brennanb2025/chat-sta…
brennanb2025 Oct 3, 2026
06fa7aa
fix(native-chat): typecheck after merging main: unused reducer state …
brennanb2025 Oct 3, 2026
24d51b1
fix(native-chat): ending a failed start writes no Stop: its messages …
brennanb2025 Oct 3, 2026
a51e58e
test(native-chat): renderer projection calls say whether the host sho…
brennanb2025 Oct 3, 2026
d012b01
test(native-chat): the structured session harness keeps the shared pr…
brennanb2025 Oct 3, 2026
a6f8096
test(native-chat): a person's Stop pause holds across a failed start;…
brennanb2025 Oct 3, 2026
b3b44dd
test(native-chat): checked types instead of assertions in the retry-i…
brennanb2025 Oct 3, 2026
ace728f
refactor(native-chat): a child whose start failed ends no work, whoev…
brennanb2025 Oct 3, 2026
873afe7
Merge remote-tracking branch 'origin/main' into brennanb2025/chat-sta…
brennanb2025 Oct 3, 2026
6ce8c1c
Merge remote-tracking branch 'origin/main' into brennanb2025/chat-sta…
brennanb2025 Oct 3, 2026
61845dc
refactor(native-chat): what each refusal reason means in its own modu…
brennanb2025 Oct 3, 2026
31a28d4
Merge remote-tracking branch 'origin/main' into brennanb2025/chat-sta…
brennanb2025 Oct 5, 2026
08bc267
test(claude): hand the auth-isolation fixture its connection, so a mi…
brennanb2025 Oct 5, 2026
e8d86ff
Merge remote-tracking branch 'origin/main' into brennanb2025/chat-sta…
brennanb2025 Oct 5, 2026
e477d91
refactor(native-chat): remove the queued-rejection batch append no ca…
brennanb2025 Oct 5, 2026
d2d9e39
Merge remote-tracking branch 'origin/main' into brennanb2025/chat-sta…
brennanb2025 Oct 5, 2026
d287274
refactor(native-chat): let the restart failure ledger decide that a f…
brennanb2025 Oct 5, 2026
0984037
Merge remote-tracking branch 'origin/main' into brennanb2025/chat-sta…
brennanb2025 Oct 5, 2026
19ec00f
test: require the provider-process lane in the Electron import ratche…
brennanb2025 Oct 5, 2026
bee124f
Merge remote-tracking branch 'origin/main' into brennanb2025/chat-sta…
brennanb2025 Oct 5, 2026
cb6b1dd
Merge commit 'e43a9f729d549a5d03713a5f427aeabd21eb7935' into brennanb…
brennanb2025 Oct 5, 2026
b70b6ff
test: drop the second provider-handle import two fixes on main both a…
brennanb2025 Oct 5, 2026
baf2df4
Merge remote-tracking branch 'origin/main' into brennanb2025/chat-sta…
brennanb2025 Oct 6, 2026
f7078d9
Merge remote-tracking branch 'origin/main' into brennanb2025/chat-sta…
brennanb2025 Oct 6, 2026
0fbe876
Merge remote-tracking branch 'origin/main' into brennanb2025/chat-sta…
brennanb2025 Oct 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions mobile/src/session/MobileNativeChatQueuedMessages.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ function card(
state: 'waiting',
paused: false,
needsAttention: false,
holdsQueue: overrides.state === 'returned',
caption: null,
...overrides
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import {
AGENT_SESSION_PROMPT_CANCEL_RUNTIME_CAPABILITY,
AGENT_SESSION_QUESTION_ANSWERS_RUNTIME_CAPABILITY,
AGENT_SESSION_QUEUED_MESSAGES_RUNTIME_CAPABILITY,
AGENT_SESSION_REPEATED_STOP_RUNTIME_CAPABILITY
AGENT_SESSION_REPEATED_STOP_RUNTIME_CAPABILITY,
AGENT_SESSION_RETRY_MESSAGE_RUNTIME_CAPABILITY
} from '../../../src/shared/protocol-version'
import { structuredAgentSessionHostSupport } from './mobile-structured-agent-session-host-support'

Expand All @@ -13,39 +14,53 @@ describe('structuredAgentSessionHostSupport', () => {
promptCancel: false,
questionAnswers: false,
queuedMessages: false,
quietRepeatedStop: false
quietRepeatedStop: false,
retryMessage: false
})
expect(
structuredAgentSessionHostSupport([AGENT_SESSION_QUESTION_ANSWERS_RUNTIME_CAPABILITY])
).toEqual({
promptCancel: false,
questionAnswers: true,
queuedMessages: false,
quietRepeatedStop: false
quietRepeatedStop: false,
retryMessage: false
})
expect(
structuredAgentSessionHostSupport([AGENT_SESSION_PROMPT_CANCEL_RUNTIME_CAPABILITY])
).toEqual({
promptCancel: true,
questionAnswers: false,
queuedMessages: false,
quietRepeatedStop: false
quietRepeatedStop: false,
retryMessage: false
})
expect(
structuredAgentSessionHostSupport([AGENT_SESSION_QUEUED_MESSAGES_RUNTIME_CAPABILITY])
).toEqual({
promptCancel: false,
questionAnswers: false,
queuedMessages: true,
quietRepeatedStop: false
quietRepeatedStop: false,
retryMessage: false
})
expect(
structuredAgentSessionHostSupport([AGENT_SESSION_REPEATED_STOP_RUNTIME_CAPABILITY])
).toEqual({
promptCancel: false,
questionAnswers: false,
queuedMessages: false,
quietRepeatedStop: true
quietRepeatedStop: true,
retryMessage: false
})
expect(
structuredAgentSessionHostSupport([AGENT_SESSION_RETRY_MESSAGE_RUNTIME_CAPABILITY])
).toEqual({
promptCancel: false,
questionAnswers: false,
queuedMessages: false,
quietRepeatedStop: false,
retryMessage: true
})
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import {
AGENT_SESSION_PROMPT_CANCEL_RUNTIME_CAPABILITY,
AGENT_SESSION_QUESTION_ANSWERS_RUNTIME_CAPABILITY,
AGENT_SESSION_QUEUED_MESSAGES_RUNTIME_CAPABILITY,
AGENT_SESSION_REPEATED_STOP_RUNTIME_CAPABILITY
AGENT_SESSION_REPEATED_STOP_RUNTIME_CAPABILITY,
AGENT_SESSION_RETRY_MESSAGE_RUNTIME_CAPABILITY
} from '../../../src/shared/protocol-version'

/** Structured-session features the connected host advertised; null until the status probe answers. */
Expand All @@ -13,6 +14,8 @@ export type StructuredAgentSessionHostSupport = {
queuedMessages: boolean
/** A Stop that stopped nothing adds no row, so a repeated Stop is quiet. */
quietRepeatedStop: boolean
/** A message whose start failed for good can be queued again; an older host's stay hidden. */
retryMessage: boolean
}

export function structuredAgentSessionHostSupport(
Expand All @@ -22,6 +25,7 @@ export function structuredAgentSessionHostSupport(
promptCancel: capabilities.includes(AGENT_SESSION_PROMPT_CANCEL_RUNTIME_CAPABILITY),
questionAnswers: capabilities.includes(AGENT_SESSION_QUESTION_ANSWERS_RUNTIME_CAPABILITY),
queuedMessages: capabilities.includes(AGENT_SESSION_QUEUED_MESSAGES_RUNTIME_CAPABILITY),
quietRepeatedStop: capabilities.includes(AGENT_SESSION_REPEATED_STOP_RUNTIME_CAPABILITY)
quietRepeatedStop: capabilities.includes(AGENT_SESSION_REPEATED_STOP_RUNTIME_CAPABILITY),
retryMessage: capabilities.includes(AGENT_SESSION_RETRY_MESSAGE_RUNTIME_CAPABILITY)
}
}
16 changes: 16 additions & 0 deletions mobile/src/session/mobile-structured-queued-message-cards.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ describe('mobileQueuedMessageCards', () => {
state: 'waiting',
paused: false,
needsAttention: false,
holdsQueue: false,
caption: null
})
})
Expand Down Expand Up @@ -139,6 +140,21 @@ describe('mobileQueuedMessageCards', () => {
expect(cards[1]?.needsAttention).toBe(false)
})

it('holds nothing behind a card returned because its agent failed to start', () => {
const drafts = [
draft({ messageId: 'a', ...returnedAs(agentSessionFailureFact('providerStartFailed')) }),
draft({ messageId: 'b', position: 2 })
]
const cards = mobileQueuedMessageCards(drafts, [], { pendingPrompt: false })
expect(cards[0]).toMatchObject({ state: 'returned', needsAttention: true, holdsQueue: false })
expect(cards[1]?.caption).toBeNull()
expect(
mobileQueueHasResumableCard(
mobileQueuedMessageCards(drafts, [], { pendingPrompt: false, queuePaused: true })
)
).toBe(true)
})

it('hides a waiting card once its hand-off arrived, never a returned one', () => {
const cards = mobileQueuedMessageCards(
[
Expand Down
18 changes: 12 additions & 6 deletions mobile/src/session/mobile-structured-queued-message-cards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
import { readWholeAgentSessionFailureFact } from '../../../src/shared/agent-session-failure'
import type { AgentJournalSubmission } from '../../../src/shared/agent-session-journal-types'
import { agentSessionWriteNoticeEnglish } from '../../../src/shared/agent-session-refusal-notice'
import { dispatchWasWithdrawn } from '../../../src/shared/structured-agent-session-dispatch-rejection'
import {
dispatchWasWithdrawn,
queuedCardHoldsQueue
} from '../../../src/shared/structured-agent-session-dispatch-rejection'
import { structuredAgentSessionAttemptFailureParts } from '../../../src/shared/structured-agent-session-send-disposition'
import {
QUEUED_MESSAGE_PAUSED_SEND_FAILED,
Expand All @@ -21,6 +24,8 @@ export type MobileQueuedMessageCard = {
paused: boolean
/** Returned, or its own send failed: the row leads with an alert. */
needsAttention: boolean
/** Returned for something only the person can resolve: the cards behind it wait. */
holdsQueue: boolean
/** Status under the text; null for a card plainly waiting its turn, the paused queue's too. */
caption: string | null
}
Expand Down Expand Up @@ -64,10 +69,11 @@ const QUEUE_PAUSE_LABELS: Readonly<Record<string, string>> = {
}

/** Whether Resume would send anything: a waiting card with no hold of its own, ahead of any
* returned card. The drain stops at a returned card, so cards behind one never go. */
* returned card that holds the queue. The drain stops at such a card, so cards behind it never
* go. */
export function mobileQueueHasResumableCard(cards: readonly MobileQueuedMessageCard[]): boolean {
for (const card of cards) {
if (card.state === 'returned') {
if (card.holdsQueue) {
return false
}
if (!card.paused) {
Expand Down Expand Up @@ -123,6 +129,7 @@ export function mobileQueuedMessageCards(
: facts.pendingPrompt
? 'Waiting for your answer'
: null
const holdsQueue = queuedCardHoldsQueue(draft)
cards.push({
messageId: draft.messageId,
text: queuedMessageBodyText(draft.body),
Expand All @@ -131,11 +138,10 @@ export function mobileQueuedMessageCards(
needsAttention:
draft.state === 'returned' ||
(paused && draft.pausedReason === QUEUED_MESSAGE_PAUSED_SEND_FAILED),
holdsQueue,
caption
})
if (draft.state === 'returned') {
behindReturned = true
}
behindReturned = behindReturned || holdsQueue
}
return cards
}
4 changes: 3 additions & 1 deletion mobile/src/session/mobile-structured-send-delivery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
//
// accepted/pending — the send happened. The id is spent; a later identical
// message is a new message and must carry a new id.
// rejected — a terminal refusal or rejected submission spends a fresh id. A
// rejected — a terminal refusal or rejected submission spends a fresh id (a
// desktop's Retry may queue that same message again on the host; the phone
// never resends under it). A
// pending-admission refusal, or any refusal after earlier transport doubt,
// keeps it because neither proves a retained delivery did not happen. Two
// exceptions spend it anyway, because the host can never accept the replay
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const CARD = {
state: 'waiting' as const,
paused: false,
needsAttention: false,
holdsQueue: false,
caption: null
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ function Harness({
promptCancel: promptCancelSupported,
questionAnswers: questionAnswersSupported,
queuedMessages: false,
quietRepeatedStop: false
quietRepeatedStop: false,
retryMessage: false
},
onSendError: vi.fn()
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ export const CAPABLE: StructuredAgentSessionHostSupport = {
promptCancel: false,
questionAnswers: false,
queuedMessages: true,
quietRepeatedStop: false
quietRepeatedStop: false,
retryMessage: false
}
export const LEGACY: StructuredAgentSessionHostSupport = { ...CAPABLE, queuedMessages: false }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,7 @@ describe('mobile structured queued messages', () => {
state: 'waiting',
paused: false,
needsAttention: false,
holdsQueue: false,
caption: null
}
])
Expand Down
5 changes: 3 additions & 2 deletions mobile/src/session/use-mobile-structured-agent-session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,10 @@ export function useMobileStructuredAgentSession(args: {
// Off: the phone hands a rejected message back to its composer, so a row would show it twice.
() =>
projectStructuredAgentSessionMessages(transcriptItems, [], state.submissions, {
rejectedInPlace: false
rejectedInPlace: false,
showsFailedStartsSentElsewhere: hostSupport?.retryMessage === true
}),
[transcriptItems, state.submissions]
[transcriptItems, state.submissions, hostSupport?.retryMessage]
)
const turnId = activeStructuredAgentSessionTurnId(state.items)
const turnTiming = useMobileStructuredAgentTurnTiming(
Expand Down
15 changes: 10 additions & 5 deletions src/main/claude/claude-structured-auth-parity.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ describe('claude structured auth parity with the terminal preflight', () => {
})
).rejects.toMatchObject({
message: CLAUDE_AUTH_ENV_CONFLICT_MESSAGE,
reason: 'managedAccountEnvOverride'
reason: 'managedAccountEnvOverride',
needsUser: true
})
})

Expand All @@ -119,7 +120,8 @@ describe('claude structured auth parity with the terminal preflight', () => {
})({ identity: IDENTITY })
).rejects.toMatchObject({
message: CLAUDE_AUTH_ENV_CONFLICT_MESSAGE,
reason: 'managedAccountEnvOverride'
reason: 'managedAccountEnvOverride',
needsUser: true
})
})

Expand Down Expand Up @@ -169,7 +171,8 @@ describe('claude structured auth parity with the terminal preflight', () => {
resolverFor({ stripAuthEnv: true, authSwitchSettleTimeoutMs: 20 })({ identity: IDENTITY })
).rejects.toMatchObject({
message: CLAUDE_AUTH_SWITCH_IN_PROGRESS_MESSAGE,
reason: 'accountSwitchInProgress'
reason: 'accountSwitchInProgress',
needsUser: false
})
})

Expand All @@ -194,7 +197,8 @@ describe('claude structured auth parity with the terminal preflight', () => {
adapter.acquire({ identity: identityFor(), fence: 7, spawnToken: 'spawn-9' })
).rejects.toMatchObject({
message: CLAUDE_AUTH_SWITCH_IN_PROGRESS_MESSAGE,
reason: 'accountSwitchInProgress'
reason: 'accountSwitchInProgress',
needsUser: false
})
// Nothing was spawned, so the refusal must not have opened a connection.
expect(claude.connections).toHaveLength(0)
Expand Down Expand Up @@ -241,7 +245,8 @@ describe('claude structured auth parity with the terminal preflight', () => {
adapter.acquire({ identity: identityFor(), fence: 8, spawnToken: 'spawn-10' })
).rejects.toMatchObject({
message: CLAUDE_AUTH_SWITCH_IN_PROGRESS_MESSAGE,
reason: 'accountSwitchInProgress'
reason: 'accountSwitchInProgress',
needsUser: false
})
// No replacement child was opened, so nothing is left running unowned.
expect(claude.connections).toHaveLength(1)
Expand Down
Loading
Loading