Skip to content

Prevent agents from interacting with the user #197

@MaherDissem

Description

@MaherDissem

Using ClaudeSDKClient, agents will sometimes try to interact with the user at different times during complex query execution to ask for approval e.g. "Shall I begin?" or "Do you want me to continue?", even when the system prompt explicitly instructs the model to act autonomously and not ask for any user input or feedback.
Is there a systematic way to prevent this behaviour beside prompt engineering?

Looking at the documentation, It seems query is intended for unidirectional tasks like this one while ClaudeSDKClient is actually designed for conversations. However, unlike ClaudeSDKClient, query does not allow the use of custom tools through MCP servers which I require.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions