Add agent nudge control#798
Open
BakedSoups wants to merge 2 commits into
Open
Conversation
Collaborator
|
Oh that's really cool. I had planned this here: |
Collaborator
|
I need to do some rewiring for this to work with all the runners, but this is really really cool. |
Author
|
Awesome, Thank you for checking out my pr. |
Move the live nudge channel out of Anthropic agent initialization and into the shared harness execution inputs. Linear and orchestrator flows now pass the TUI nudge source to the resolved harness. Anthropic continues to deliver nudges through its prompt stream, and Pi forwards them through agentSession.steer().
Author
|
Just as a little extra thing to do, I gave your idea of making nudges work across all runners a try by threading the TUI nudge source through the shared harness inputs. Both linear and orchestrator flows now pass the nudge source to the selected runner. Anthropic continues using its existing prompt stream, while Pi forwards nudges through agentSession.steer(). Feel free to check it out when you have a chance. verified with pnpm build, pnpm test, and pnpm fix. |
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
Currently, once the wizard agent is running, the user can mostly observe or cancel. If the agent appears to be looping, over-investigating, or stuck on a dead end, there is no lightweight intervention control to steer it forward without ending the run.
This PR adds an
nkey binding on the run screens that nudges the active agent to finish the current line of work and move on if it is stuck. The nudge is streamed into the active Anthropic SDK prompt as a follow-up user message, so it works during an in-flight run instead of waiting for a restart.This is similar in spirit to Claude Code-style human intervention, but deliberately uses an explicit
nudge agentaction instead of overloadingEscorCtrl+C, which users reasonably expect to mean interrupt, cancel, or exit.I made this a PR since its something I personally found useful
Changes
n/nudge agentkey binding on normal and audit run screensTest plan
pnpm buildpnpm vitest run src/ui/tui/__tests__/store.test.tspnpm fixpnpm test