Repository navigation
feat(platform): end coding agents when their sign-in is unsound - #4912
Merged
Merged
Conversation
A coding agent's connection ends when what signed it in is no longer sound, and Tale cleans up after agents every day. - A refresh token used twice: the sign-in server ends the app's sign-in for the person everywhere. Tale reads the presented token before the provider takes it from its table and ends the person's connections of that app, in every organization, only when it did - as the platform's act, with the reason refresh reuse. - A password the person changed (Better Auth's endpoint, or the forced rotation that replaces an expired or admin-set one), an admin's password seizure, the owner reset, an admin's removed passkey or reset second factor: the person's agents end with their sessions. One door does it and a guard holds every session sweep and credential write to it; an admin who did it is named in the trail. - An erasure deletes the person's connections in that organization and scrubs the audit rows that name them. - maintenance.agent_connections_gc removes connections ended 90 days ago, apps nobody connected after a day and tokens retired a month ago.
This was referenced Oct 13, 2026
tale-code-bot
added a commit
that referenced
this pull request
Nov 1, 2026
The fixture "See [Triggers](https://docs.tale.dev/platform/automations/ triggers#4912)." proves that a number in a link's fragment is no citation. lint:links judges every docs.tale.dev address in the tree and refused it: the Triggers page renders no heading "#4912" (fragment-missing), so the Checks workflow's Format job fails. The fixture now links docs.example.com, which the link check does not judge. The validator reads its fragment the same way, and the test still fails when the citation pattern loses its word-character guard. Refs #4785
tale-code-bot
added a commit
that referenced
this pull request
Nov 1, 2026
The fixture "See [Triggers](https://docs.tale.dev/platform/automations/ triggers#4912)." proves that a number in a link's fragment is no citation. lint:links judges every docs.tale.dev address in the tree and refused it: the Triggers page renders no heading "#4912" (fragment-missing), so the Checks workflow's Format job fails. The fixture now links docs.example.com, which the link check does not judge. The validator reads its fragment the same way, and the test still fails when the citation pattern loses its word-character guard. Refs #4785
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A coding agent's connection (#4899) ends when what signed it in is no longer sound, and a daily job cleans up after agents. Sign-in stays off unless an operator turns it on, so no deployment changes until then.
refresh_reuse— only when the server did. A refusal for any other reason, a retry inside the window and a lookup that fails end nothing and never change the agent's answer.account_security, and the admin who did it is named in the trail. One door (auth/account-security.ts) does it, and a source guard holds every session sweep and every credential write to it, so the next place that takes a person's access back cannot forget their agents.maintenance.agent_connections_gc, daily: removes connections that ended 90 days ago, apps that registered themselves or identified by a document and that nobody connected a day after they appeared, and refresh and access tokens that expired or were retired a month ago. An app with a live connection or a working refresh token is never removed, nor an organization's own sign-in application.Rules:
AGCONN-R16–R19(agent connections) andMEMBER-R8widened (members). Not in this PR: the notice a person finds in their bell when an agent is disconnected for a reason that is not theirs — it comes next, with the consent page and the Connected agents tab.Checklist
bun run checkpasses — the gate ran locally on the committed tree. The one red isapp/routes/dashboard.test.tsx("takes a signed-in tab to sign-in on a lapsed-session answer"), which fails identically onmain(715dc15) and does not touch this change.bun run lint:sast— runs in the commit hook.agentConnectionsin en/de/fr.Test plan
checkAgentLifecycle(the real sign-in server's own tables): a refresh used twice ends Ada's connections to two organizations as the platform's doing with their consent and tokens, a retry inside the window answers again and ends nothing, a made-up token ends nothing, and Mia's connection is untouched; Mia's own password change, a refused change (wrong current password) ending nothing, an admin's password seizure and 2FA reset naming the admin, and the forced rotation of a temporary password; an erasure of Eve (two connections in one organization gone, the other organization's kept, the audit rows scrubbed, Ada untouched); the daily job run as the scheduled task over stale, fresh, live, working-token, SSO, owned and plain apps and old and recent tokens. 14 related lanes (files, oauth, consent, door, lifecycle, connections, erasure, member authority, member password policy, two-factor, account authorization, stale-session reauthentication, password confirmation throttle, key owners) 177/178 on the rebased tree; the one red is the object-store seeding probe finding my reused MinIO bucket non-empty.