Skip to content

Fix agent OpenFGA organization membership tuple lifecycle #55

@casey-brooks

Description

@casey-brooks

Context

chat-app CI artifacts from run 26158428825 show llm-proxy returning 403 access denied after resolving the model endpoint in TestLLM. This likely causes agent reply and trace-link timeouts.

The suspected missing authorization tuple is:

user=identity:<agent_id>
relation=member
object=organization:<org_id>

Without this tuple, model.can_use membership checks from organization membership fail for agent identities.

Intent

  • On CreateAgent, write the OpenFGA tuple for the created agent identity as an organization member.
  • On DeleteAgent, remove that tuple.
  • On rollback from a failed delete, restore the tuple.
  • Add unit tests covering tuple writes, deletes, and restore-on-rollback behavior.

Notes

Use @main everywhere; do not pin cross-repo actions or dependencies for this fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions