Skip to content

Add agent nudge control#798

Open
BakedSoups wants to merge 1 commit into
PostHog:mainfrom
BakedSoups:add-agent-nudge-button
Open

Add agent nudge control#798
BakedSoups wants to merge 1 commit into
PostHog:mainfrom
BakedSoups:add-agent-nudge-button

Conversation

@BakedSoups

@BakedSoups BakedSoups commented Jul 3, 2026

Copy link
Copy Markdown

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 n key 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 agent action instead of overloading Esc or Ctrl+C, which users reasonably expect to mean interrupt, cancel, or exit.

I made this a PR since its something I personally found useful

Changes

  • add an n / nudge agent key binding on normal and audit run screens
  • store nudges in the TUI store with monotonic ids and analytics
  • stream nudges into the active Anthropic SDK prompt as follow-up user messages
  • add store coverage for nudge sequencing, waiting, and abort cleanup

Test plan

  • pnpm build
  • pnpm vitest run src/ui/tui/__tests__/store.test.ts
  • pnpm fix
  • pnpm test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant