Conversation
…ctive CL…" This reverts commit 90b1d37.
|
🛸 Aliens watching our repo just upgraded @muddlebee's threat level to: do not engage — too competent. 👽 👋 Join us on Discord - OpenSRE : hang out, contribute, or hunt for features and issues. Everyone's welcome. |
Greptile SummaryThis PR reverts #1252, which had added a
Confidence Score: 3/5Not safe to merge — re-introduces a known regression in shell built-in command detection. A P1 functional regression is re-introduced: app/cli/interactive_shell/agent_actions.py — Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["User input text"] --> B["_looks_like_direct_shell_command(text)"]
B --> C{"first token is None?"}
C -- Yes --> D["return False"]
C -- No --> E{"first in _NON_COMMAND_STARTS?"}
E -- Yes --> D
E -- No --> F{"starts with ./ ../ /?"}
F -- Yes --> G{"Path exists?"}
G -- Yes --> H["return True"]
G -- No --> I["return False"]
F -- No --> J["shutil.which(first)"]
J -- found --> H
J -- "not found (always for cd)" --> I
style I fill:#f88,stroke:#c00
Reviews (1): Last reviewed commit: "Revert "Fix detection of shell built-in ..." | Re-trigger Greptile |
| if first.startswith(("./", "../", "/")): | ||
| return Path(first).exists() | ||
| return shutil.which(first) is not None |
There was a problem hiding this comment.
Shell built-ins (
cd) silently broken again
shutil.which('cd') always returns None because cd is a pure shell built-in with no external binary. After this revert, _looks_like_direct_shell_command will return False for any invocation of cd (e.g. cd /tmp), so the interactive CLI will route it to the natural-language path instead of executing it as a shell command. The same issue may affect echo/pwd on macOS where the external binaries are absent from $PATH. PR #1252 existed specifically to fix this.

Reverts #1252