-
Notifications
You must be signed in to change notification settings - Fork 2.1k
fix: Model behavior, not detecting the correct environment #688
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
7462e86
to
0c19cd7
Compare
0c19cd7
to
3b92430
Compare
Thanks for working on this, was wondering why codex wasn't recognizing. Really needed someone to fix this lol. |
}) => { | ||
const envName = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change to terminal-header.tsx is unrelated to the actual core fix in this PR to have the instructions depend on the environment. Would prefer if we revert this as we don't want to clutter the header with this information preferably.
const prefix = `You are operating as and within the Codex CLI, a terminal-based agentic coding assistant built by OpenAI. It wraps OpenAI models to enable natural language interaction with a local codebase. You are expected to be precise, safe, and helpful. | ||
|
||
All commands should be formatted for: ${shellEnv}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move this at the end, below the "You MUST adhere to the following criteria" section
|
||
export interface ShellDetection { | ||
shellOption?: boolean | string; | ||
environment: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make this an enum
import { parse } from "shell-quote"; | ||
|
||
export interface ShellDetection { | ||
shellOption?: boolean | string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I can tell this is not used. Please remove
Thank you for the contribution! Left some comments that I would like to see addressed before taking another look. |
Fix agent behavior, not detecting PowerShell and seeing an empty directory
What's Changed
Why
Previously, the model would not detect any directory whatsoever especially on Windows PowerShell, and incorrectly running Linux commands on PowerShell, resulting in viewing an empty directory.
In fact, the model thinks it is living inside a Linux environment
How
Result