claude-code - 💡(How to fix) Fix Agent allow-list not enforced correctly mid-session: presets enabled after session start are visible in agent_availability but rejected by call_agent [1 comments, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#57807Fetched 2026-05-11 03:24:52
View on GitHub
Comments
1
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×2closed ×1commented ×1
  • Session: project "memory" (/storage/projects/memory)
  • Presets affected: Board Curator (jn7a9c2fmr2f09v5vv35v8csn5868h4v), Wiki Curator (jn77bt8qmw81jjs9d9yx9kjd0s868b4h)
  • The agent_availability injection listed 23 presets correctly; list_agents returned 0; call_agent rejected all of them
  • Date: 2026-05-10

Error Message

Error: preset "<id>" is not allow-listed for this project. Run list_agents to see available ids, or ask the user to enable it from the chat HUD agent picker.

Root Cause

  • Session: project "memory" (/storage/projects/memory)
  • Presets affected: Board Curator (jn7a9c2fmr2f09v5vv35v8csn5868h4v), Wiki Curator (jn77bt8qmw81jjs9d9yx9kjd0s868b4h)
  • The agent_availability injection listed 23 presets correctly; list_agents returned 0; call_agent rejected all of them
  • Date: 2026-05-10

Fix Action

Workaround

Starting a fresh chat after enabling presets resolves the issue — the allow-list is read correctly at session start.

Code Example

Error: preset "<id>" is not allow-listed for this project. Run list_agents to see available ids, or ask the user to enable it from the chat HUD agent picker.
RAW_BUFFERClick to expand / collapse

Bug report

Severity: warning Category: code-bug Service: chat / multi-agent

What happened

When a user enables agent presets mid-session via the chat HUD agent picker, the updated allow-list is injected into the next turn via the agent_availability system-reminder block — the newly enabled presets appear with their preset IDs and descriptions. However, calling call_agent with those preset IDs fails with:

Error: preset "<id>" is not allow-listed for this project. Run list_agents to see available ids, or ask the user to enable it from the chat HUD agent picker.

Additionally, list_agents returns an empty list throughout the same session, even after multiple turns following the user enabling presets.

Steps to reproduce

  1. Start a new chat with no agent presets allow-listed for the project.
  2. During the chat, the user enables one or more presets via the HUD agent picker.
  3. On the next turn, agent_availability injection correctly shows the newly enabled presets with their IDs.
  4. Call list_agents — returns empty.
  5. Call call_agent with a preset ID from the agent_availability injection — returns the error above.

Expected behaviour

Presets enabled mid-session should become callable via call_agent in the same session. At minimum, list_agents should reflect the current allow-list state.

Actual behaviour

list_agents returns empty. call_agent rejects the preset as not allow-listed. The agent_availability injection and the runtime enforcement are out of sync.

Workaround

Starting a fresh chat after enabling presets resolves the issue — the allow-list is read correctly at session start.

Context

  • Session: project "memory" (/storage/projects/memory)
  • Presets affected: Board Curator (jn7a9c2fmr2f09v5vv35v8csn5868h4v), Wiki Curator (jn77bt8qmw81jjs9d9yx9kjd0s868b4h)
  • The agent_availability injection listed 23 presets correctly; list_agents returned 0; call_agent rejected all of them
  • Date: 2026-05-10

Additional note

The report_issue tool specified in the system prompt for bug reporting is not registered in this environment (not found in deferred tool list). Filing via GitHub as fallback.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING