---
title: "Comment by Mike Dabydeen on \"Authorizing AI Agent Chains in Production\" | Hashnode"
description: "The holder count and the execution-time recheck both read the directory export, so both inherit how that export treats a disabled account. If a leaver's account"
url: "https://hashnode.com/posts/agent-authorization-in-production/6aebd30687a2fa4bdc363b9c/comment/6aedc67819115b2ec5c5e8b7"
---

[Discussion](https://hashnode.com/posts/agent-authorization-in-production/6aebd30687a2fa4bdc363b9c)

Comment [Authorizing AI Agent Chains in Production](https://hashnode.com/posts/agent-authorization-in-production/6aebd30687a2fa4bdc363b9c)

[Mike Dabydeen](https://hashnode.com/@firelinks)

[Nov 6](https://hashnode.com/posts/agent-authorization-in-production/6aebd30687a2fa4bdc363b9c/comment/6aedc67819115b2ec5c5e8b7)

The holder count and the execution-time recheck both read the directory export, so both inherit how that export treats a disabled account. If a leaver's account is disabled but keeps its group memberships in the export, it still counts as a holder, and an approval that person signed shortly before leaving still passes the second check when the destroy runs.

I'd put account state in the data the policy reads: either the export drops disabled users, or User carries an active attribute that destructive-needs-approval requires and the holder count filters on. Then the policy, the recheck and the count agree on who can approve, and reactivating a dormant account shows up in the diff as a move from one holder to two instead of passing silently.

[dvaddi](https://hashnode.com/@dvaddi)

[4d ago](https://hashnode.com/posts/agent-authorization-in-production/6aebd30687a2fa4bdc363b9c/comment/6aedc67819115b2ec5c5e8b7#reply-6af722bdb9e3849d26be321d)

Mike, you're right, and the post didn't cover it. It said the count is only as current as the export, and that the approver may have left the tenant by the time the destroy runs. It said nothing about an account that is disabled but still in the export with its groups. The policy reads no account state, so the policy and the count still treat that user as a holder, and so would a recheck that re-evaluates the same policy. The recheck is a design in the post, not code in the series. The post now says this in two places: under "Approvals go stale" and under "What this check is not". The approval's expiry limits how long a leaver's approval stays usable, but only to whatever the issuer set; nothing caps that lifetime. The count has no time bound at all. Both of your options work, and they trade differently. Dropping disabled users at the export needs no policy change, but it holds only as long as the export keeps doing it, and nothing fails if it stops. An active attribute on User puts the rule in the policy, where it can be tested, at the cost of a schema change. On the diff: if the export drops disabled users, a reactivated account shows as one holder becoming two, which the diff flags today. If it keeps them, the diff sees nothing.

[Mike Dabydeen](https://hashnode.com/@firelinks)

[2d ago](https://hashnode.com/posts/agent-authorization-in-production/6aebd30687a2fa4bdc363b9c/comment/6aedc67819115b2ec5c5e8b7#reply-6afaf5581694eeaed3bd0ba7)

The export option can be made to fail loudly with one assertion in the job that publishes it: compare the exported holders against the directory's list of disabled accounts and stop the publish if the overlap isn't empty. That keeps the no-schema-change route and gives it the failure signal the active attribute gets from the policy tests.
