agent-native icon indicating copy to clipboard operation
agent-native copied to clipboard

Saved automations discover and run tools excluded from the chat action surface

Open nabilkhan199999 opened this issue 3 weeks ago • 1 comments

Saved automations discover and run tools excluded from the chat action surface

Summary

We use native saved automations for unattended work and resolveActionSurface to control which tools the chat agent can discover and run.

With the same createAgentChatPlugin configuration, an excluded tool is unavailable in chat but remains discoverable and callable from a saved manual automation. I could not find a supported configuration that applies an equivalent tool policy to saved automations.

I reproduced this with an inert, read-only test action on the latest stable release. The existing documentation scopes resolveActionSurface to interactive chat, so this report requests equivalent control for saved automations.

Environment

  • Reproduced on: @agent-native/core and @agent-native/agentkit 0.226.0. npm stable checked November 9, 2026.
  • Node.js: 22.22.0 on macOS.
  • Native createAgentChatPlugin in production agent mode, with initialToolNames and lazy tool-search.
  • Isolated H3/Hookable host, native framework migrations, and disposable on-disk PGlite 0.5.9.
  • A deterministic localhost Ollama-protocol provider supplies tool calls. The fixture uses local test identity with authentication disabled. No external model or real credentials are required.

Steps and observed behavior

The accompanying reproduction contains probe.mts, verify.mts, pinned dependencies, and run instructions.

  1. Register an action named inert-denied-probe. It is read-only and returns { "inert": true }.
  2. Configure resolveActionSurface to exclude that name from availableActionNames. Set initialToolNames to ["tool-search"].
  3. Run an interactive turn through the native chat handler. The local provider requests tool-search for the exact name, then attempts a direct call.
  4. Save a manual automation through the native Resources API and queue it with the public queueAutomationRunNow API.
  5. Let the native /_agent-native/agent-chat/_process-run worker process the saved automation. The provider requests the same search and tool call.

Observed results:

Check Interactive chat Saved manual automation
Exact-name tool-search No match One match, marked callable
Probe schema Absent Loaded for the next step
Probe invocation Unknown tool "inert-denied-probe" Returns { "inert": true }
Probe handler calls Zero One, with caller: "automation"
Surface resolver calls One Zero

The automation then called native automation-no-op. Its skipped run record remained present after a separate process reopened the database.

Setup detail: The HTTP Run now action returned 409 approval_required. That guard remained unchanged. The public queue API supplied fixture setup, followed by the real native worker, scheduler dependencies, background loop, and persistence.

This reproduction covers manual saved automations on the minimal host. Scheduled ticks, events/webhooks, MCP, organization identities, and real-provider behavior were not exercised.

Expected behavior

An app needs a supported way to withhold selected tools from both discovery and execution in native saved automations. This must remain effective after lazy tool discovery, independently of the starting tool list.

Allowed tools and native automation completion must continue to work. Saved automations are distinct from durable continuations of an interactive chat.

Impact

An unattended workflow can discover and run capabilities that the app deliberately excludes from chat. This prevents the app from maintaining a consistent tool policy across these execution surfaces.

Relevant code observations

These are static source observations from Core 0.226.0:

nabilkhan199999 avatar Nov 11 '26 16:11 nabilkhan199999

hey, i'm on this one! reproduced it on latest main: chat blocks the hidden tool, but a saved automation finds it through tool-search and runs it. scheduled and event-triggered automations look affected too, since they use the same tool list.

SmitMachhi avatar Nov 12 '26 19:11 SmitMachhi