Skip to content

Commit 0cf6fc1

Browse files
authored
docs(protocol): restore the success gate on terminal auth reconnect (#2623)
* docs(protocol): restore the success gate on terminal auth reconnect * docs(protocol): allow retrying terminal auth on the existing connection first
1 parent 48b5344 commit 0cf6fc1

4 files changed

Lines changed: 4 additions & 6 deletions

File tree

‎docs/protocol/v1/authentication.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ For a `terminal` method, the Client:
177177
3. Presents the terminal to the user and waits for the process to exit. Exit
178178
status zero signals success; a non-zero status, termination without an exit
179179
status, or cancellation signals failure.
180-
4. Reconnects and reinitializes the ACP Agent.
180+
4. On success, reconnects and reinitializes the ACP Agent.
181181

182182
The descriptor cannot provide a command. The Client derives the command from its
183183
own Agent configuration. Agents **SHOULD** provide arguments that enter a

‎docs/protocol/v1/draft/authentication.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ For a `terminal` method, the Client:
177177
3. Presents the terminal to the user and waits for the process to exit. Exit
178178
status zero signals success; a non-zero status, termination without an exit
179179
status, or cancellation signals failure.
180-
4. Reconnects and reinitializes the ACP Agent.
180+
4. On success, reconnects and reinitializes the ACP Agent.
181181

182182
The descriptor cannot provide a command. The Client derives the command from its
183183
own Agent configuration. Agents **SHOULD** provide arguments that enter a

‎docs/protocol/v2/authentication.mdx‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,7 @@ For a `terminal` method, the Client:
206206
3. Presents the terminal to the user and waits for the process to exit. Exit
207207
status zero signals success; a non-zero status, termination without an exit
208208
status, or cancellation signals failure.
209-
4. Reconnects and reinitializes the ACP Agent, then retries an operation rejected
210-
for requiring authentication. For an already-inserted prompt, see
209+
4. On success, retries an operation rejected for requiring authentication. The Client **SHOULD** first close the existing ACP connection, start and initialize a new one, and resume with `session/resume` any sessions it wants to keep, since the running Agent may not pick up the new credentials. It **MAY** instead retry on the existing connection first, and reconnect only if the retry still fails with `auth_required`. For an already-inserted prompt, see
211210
[Authentication failures during session work](#authentication-failures-during-session-work).
212211

213212
The descriptor cannot provide a command. The Client derives the command from its

‎docs/protocol/v2/draft/authentication.mdx‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,7 @@ For a `terminal` method, the Client:
206206
3. Presents the terminal to the user and waits for the process to exit. Exit
207207
status zero signals success; a non-zero status, termination without an exit
208208
status, or cancellation signals failure.
209-
4. Reconnects and reinitializes the ACP Agent, then retries an operation rejected
210-
for requiring authentication. For an already-inserted prompt, see
209+
4. On success, retries an operation rejected for requiring authentication. The Client **SHOULD** first close the existing ACP connection, start and initialize a new one, and resume with `session/resume` any sessions it wants to keep, since the running Agent may not pick up the new credentials. It **MAY** instead retry on the existing connection first, and reconnect only if the retry still fails with `auth_required`. For an already-inserted prompt, see
211210
[Authentication failures during session work](#authentication-failures-during-session-work).
212211

213212
The descriptor cannot provide a command. The Client derives the command from its

0 commit comments

Comments
 (0)