Repository navigation
herdr: send the full tool call with blocked, and send the first idle once the TUI reads keys #4012
Gaurav-Gosain
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi! I maintain tuios, a terminal multiplexer. Every tuios pane answers herdr's agent protocol, so Crush's herdr reports drive tuios's agent list and its Inbox. #3541 fixes the state races we hit (my test results are there). Two things are still missing for us, and I'd like to ask before anyone writes code.
1. The full tool call with
blockedWith #3541, a permission prompt reports:
The message is capped at 80 runes, so the end of the command is cut, with no sign that it was cut. Here the lost part is
| sh. Only the first line of a multi-line command is sent.tuios checks a call against risk rules before it lets you approve it from the Inbox. For example,
curl ... | shtakes a second press. Those rules need the real command or path, not a summary.Ask: send the tool call as separate fields next to the message, for example:
The short message can stay as it is for herdr's UI. If herdr does not accept extra fields on
pane.report_agent, a separate method would work just as well.2. The first
idleonce the TUI reads keysCrush sends its first
idleduring app setup, before the TUI runs. In my runs the prompt box was drawn 25 to 60 ms later. A tool that waits foridleand then types a prompt can lose it. Withtuios fan --agent crushin a fresh git worktree, the prompt was lost in 7 of 8 runs on v0.96.1 and 5 of 5 on #3541's branch. When I held the firstidleback by one second in a socket proxy, 3 of 3 prompts arrived.Ask: send the first
idlefrom the TUI once it is ready for keys.3. Answering a permission prompt from outside
#2719 and the
PermissionRequesthook in #3146 already cover this, so I left a comment there.Who this helps
Today tuios reads Crush's dialog off the screen to do this. That works, but it breaks when the dialog wraps a long command or when its wording changes.
I'm happy to send a PR for 1 and 2 if you'd like them.
Drafted with the help of Claude Code.
All reactions