anthropics / anthropics/claude-agent-sdk-python

Prevent agents from interacting with the user

Open
#197 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
8.1k
Forks
1.3k
Avg merge
2d 31m
Merged PRs (30d)
1

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.