Skip to content

bug(asks): a credential ask is filed for an assigned primary who cannot open the agent, and then nobody can fill it #4579

Closed

Description

@webmixgamer

Build: v1.0.5-rc2 (af465288a), enterprise edition, local, PostgreSQL. Matrix row: B2. Same kind of dead end as #4501, on a different path.

What happens

  1. A person is seated as the agent's primary, and the agent is not shared with them. (The API allows this state, as it does for an approver.)
  2. The agent raises a credential ask. A credential ask can only be addressed to primary.
  3. The receipt says 201, to_role: primary, resolved: true, expires_at: null.
  4. The seated person does not see the ask in their Workspace Inbox. GET …/asks/{id}/context and POST …/asks/{id}/credential answer 404 not_found for them.
  5. Nobody else can fill it either:
    • Operations: POST /api/operator-queue/{id}/respond as the owner (an admin) answers 422 credential_answer_via_field ("answered in the person's Workspace through the secret field").
    • The owner's own Workspace does not list it, and POST …/asks/{id}/credential as the owner answers 404.

So the ask waits on one person who cannot see it, the only door that can end it as answered is closed to everyone else, and it never expires. Only a cancel ends it. The agent was told resolved: true.

Why

  • A credential ask has one reader by design: it is answered only through the Workspace secret field (ask_service.answer refuses anything else with CredentialAnswerRefused).
  • That field's door is client_portal/asks/service.py::_owned_ask: the addressee and on the agent's roster.
  • The raise resolves primary through role_addressing.resolve_addressee with no reach check, so a seated primary who cannot open the agent becomes the single addressee.
  • fix(asks): an ask to the approver reaches only approvers who can open the agent, and is refused by name when none can (#4501) #4506 added the reach check for to: approver only. On dev the primary arm is unchanged (read in the code, not run there).

Expected

One of:

Repro (local, rc2)

  • POST /api/enterprise/assignments/agents/<agent> {"user_id": <id>, "kind": "primary"} for a person the agent is not shared with → 201.
  • With the agent's key: POST /api/agents/<agent>/operator-queue {"request_id": "x", "title": "x", "type": "credential", "to": "primary", "context": {"credential_name": "SOME_TOKEN"}} → 201, resolved: true.
  • As the seated person: GET /api/enterprise/client-portal/asks does not list it; GET …/asks/<id>/context → 404; POST …/asks/<id>/credential → 404.
  • As the owner: POST /api/operator-queue/<id>/respond → 422 credential_answer_via_field; POST …/client-portal/asks/<id>/credential → 404.
  • Control: share the agent with the person → the ask appears in their list and its context reads 200.

Also seen

  • The raise attaches the ask to a Main chat for the person and the agent (context.workspace_session_id), a chat the person cannot open.

Severity

Suggested P2, like #4501: an agent can wait forever on a credential nobody can give it, with a receipt that says a person will see it. The way out today is to share the agent with the primary, or cancel the ask.

Not the same as

Activity

  1. added
    priority-p2
    type-bug
    theme-reliability
    on Nov 14, 2026
  2. webmixgamer commented on Nov 14, 2026

    @webmixgamer
    ContributorAuthor

    /claim

  3. added
    status-in-progress
    on Nov 14, 2026
  4. github-actions commented on Nov 14, 2026

    @github-actions

    Claimed by @webmixgamer. Label status-in-progress added.

    Next steps:

    1. Create branch: feature/4579-<short-slug>
    2. Implement the feature
    3. Open a PR with Fixes #4579
  5. added
    status-in-dev
    and removed
    status-in-progress
    on Nov 15, 2026
  6. removed
    status-in-dev
    on Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

priority-p2theme-reliabilitytype-bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions