Forward agent_needs_input notifications to Warp - #91
Draft
sohumgaitonde wants to merge 1 commit into
Draft
sohumgaitonde wants to merge 1 commit into
sohumgaitonde wants to merge 1 commit into
Conversation
Subscribe the existing Notification hook to agent_needs_input in addition to idle_prompt so Warp is told when Claude Code is blocked waiting for user input. The hook script already forwards the notification type generically and does not inspect the message. Bump the warp plugin to 2.3.0 so the Warp client can require a version that emits this event, and add tests covering the matcher, version sync between plugin.json and marketplace.json, and the payload shape. Co-Authored-By: Warp <agent@warp.dev>
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Subscribes the
warpplugin'sNotificationhook to Claude Code'sagent_needs_inputnotification, in addition toidle_prompt.on-notification.shalready forwards the notification type generically, so no new script is needed and the notification message is never inspected.Why
Claude Code can pause mid-session on a prompt that only a person can answer, for example a confirmation dialog, and emit
agent_needs_input. This plugin only subscribed toidle_prompt, which means "finished and waiting for your next prompt". Warp therefore never learned that the session was stuck, and it kept reporting the run as in progress.That matters most for unattended runs. Nobody is watching the terminal, so a session waiting on input can sit indefinitely. Warp has no signal to mark the run as blocked, notify anyone, or start any timeout, and the run only ends when a coarse infrastructure timeout eventually fires.
Forwarding
agent_needs_inputgives Warp that signal and keeps it separate fromidle_prompt.idle_promptmeans the session is done and idle, so Warp deliberately ignores it for status.agent_needs_inputmeans Claude cannot continue without input.This is intentionally generic. It reacts to Claude's own notification type, not to the content of any particular dialog, so it covers prompts we don't know about yet.
Changes
hooks/hooks.json: Notification matcher changes fromidle_prompttoidle_prompt|agent_needs_input. The hook forwards the notification type unchanged and sends no input to Claude.2.3.0inplugin.jsonandmarketplace.json, so the Warp client can require a version that emits this event.agent_needs_input, plugin and marketplace versions stay in sync, and theagent_needs_inputpayload shape is correct.Follow-up
This PR only emits the event. Warp currently ignores unknown event names, so there is no behavior change until a client PR parses it as a generic needs-input event, maps it to the existing blocked status, and requires plugin
>= 2.3.0. That should merge after this version is published.Testing
plugins/warp/tests/test-hooks.sh: 62 passed.plugins/oz-harness-support/tests/test-hooks.sh: 34 passed.Co-Authored-By: Warp agent@warp.dev