You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature]: Run ! shell commands in structured Claude chats, as the TUI does #32165
In a Claude Code chat that runs as a structured chat (Claude launched with --input-format stream-json --output-format stream-json), a !-prefixed line does not run as a shell command. The composer sends !pwd as an ordinary prompt, and the model answers it in prose. Running the command takes a full model turn, and the result depends on the model choosing to call its Bash tool.
The same line does run in a terminal-backed chat, because the composer types it into the Claude TUI and the TUI's bash mode runs it (see #25956, fixed by #31204). So ! works or silently doesn't depending on which kind of chat the user opened, and the composer gives no hint which one it is.
No <bash-input> turn is recorded. The assistant replies with the working directory it read from its system context and says it did not run a shell.
On main (77f1523), classifyNativeChatSend in src/shared/native-chat-slash-commands.ts special-cases only / (and $ for Codex), and the structured send path has no ! handling either. src/shared/claude-bash-input.ts only displays <bash-input> turns that already exist in a transcript.
Orca 1.4.237, macOS.
Proposed solution
Support ! in structured Claude chats the way the TUI does:
The chat shows the command and its stdout/stderr as a command row.
Orca passes the command and its output to the agent with the next message, in the same shape the TUI records (<bash-input> plus <bash-stdout>/<bash-stderr>), so the agent sees it as context without spending a turn on it.
If this is out of scope, a smaller step would help: when a structured chat's draft starts with !, show a hint that bash mode is only available in terminal-backed chats.
Alternatives or additional context
Workarounds today: open the conversation in a terminal tab and use the TUI's !, or ask the agent to run the command and wait for a turn.
Activity