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
The Zoo Code terminal integration causes issues on PyCharm Terminal:
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Loading personal and system profiles took 11080ms.
At C:\Users\%user%\.run-vs-agent-shell-integration\vscode-powershell\profile.ps1:89 char:21
+ $Result += "]633;A" + $bell
+
Unexpected token ']'in expression of statement.
At C:\Users\%user%\.run-vs-agent-shell-integration\vscode-powershell\profile.ps1:144 char:22
+ $Result += $esc + "]633;C" + $bell
+
Unexpected token ']'in expression of statement.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : UnexpectedToken
It runs on latest Zoo Code version (3.82.1) on PyCharm. It breaks Python environment activation (conda) on PyCharm Terminal. The issue disappear when the Zoo Code plugin is disabled.
I opened an issue on this on the original Zoo Code repo: Zoo-Code-Org/Zoo-Code#1752. Some initial investigation was done on the issue. Hope that it gets translated into a bugfix soon.
I want to highlight this issue again. In PR #10 step 1 was taken to fix compatibility issues, the emojis that were causing an issue are removed. thanks!
However, a second part is still not fixed: running PyCharms activation scripts. The response in Zoo-Code-Org/Zoo-Code#1752 suggests as a solution to add in ZooCode's profile.ps1:
I tried that on my own system. I added the snippet under the section # Load user's original PowerShell profile if shell integration was injected. So the code becomes:
# Load user's original PowerShell profile if shell integration was injected
if ($env:VSCODE_INJECTION -eq "1") {
# Source user's original profile if it exists
$UserProfile = $PROFILE.CurrentUserCurrentHost
if (Test-Path $UserProfile) {
. $UserProfile
}
$env:VSCODE_INJECTION = $null
}
$pyCharmScript = $env:ORIGINAL_POWERSHELL_SCRIPT
if ($pyCharmScript -and (Test-Path -LiteralPath $pyCharmScript)) {
. $pyCharmScript
}
$env:ORIGINAL_POWERSHELL_SCRIPT = $null
$Global:__VSCodeOriginalPrompt = $function:Prompt
$Global:__LastHistoryId = -1
$Global:__VSCodeIsInExecution = $false
On my system this change reactivates the virtual environment, i.e. solves the issue. You can try this in a live PyCharm window with the ZooCode plugin enabled. In the default state, the virtual environment is not activated. Next, open C:\Users\<user>\.run-vs-agent-shell-integrations\vscode-powershell\profile.ps1, replace the code as above. After saving the file, open a new PowerShell instance in PyCharm. You should see that the active interpreter is now correctly activated.
Can this extra section be added to the profile.ps1 script?
Activity
olconstant commentedon Sep 25, 2026
Any plan to fix this bug? I'm stuck with Cline because of this bug. Having a working Terminal on IDE is important. Thanks.
[-]PowerShell terminal is reporting ] as unexpected[/-][+]PowerShell Terminal broken: Unexpected token: ']'[/+]aGitForEveryone commentedon Oct 5, 2026
I opened an issue on this on the original Zoo Code repo: Zoo-Code-Org/Zoo-Code#1752. Some initial investigation was done on the issue. Hope that it gets translated into a bugfix soon.
aGitForEveryone commentedon Oct 22, 2026
I want to highlight this issue again. In PR #10 step 1 was taken to fix compatibility issues, the emojis that were causing an issue are removed. thanks!
However, a second part is still not fixed: running PyCharms activation scripts. The response in Zoo-Code-Org/Zoo-Code#1752 suggests as a solution to add in ZooCode's
profile.ps1:I tried that on my own system. I added the snippet under the section
# Load user's original PowerShell profile if shell integration was injected. So the code becomes:On my system this change reactivates the virtual environment, i.e. solves the issue. You can try this in a live PyCharm window with the ZooCode plugin enabled. In the default state, the virtual environment is not activated. Next, open
C:\Users\<user>\.run-vs-agent-shell-integrations\vscode-powershell\profile.ps1, replace the code as above. After saving the file, open a new PowerShell instance in PyCharm. You should see that the active interpreter is now correctly activated.Can this extra section be added to the
profile.ps1script?aGitForEveryone commentedon Oct 22, 2026
To already make a headstart in solving this issue, I made a PR: #11.
Note that I only verified this change in PyCharm as that is the only JetBrains tool that is use. Do you have tests to check other JetBrains IDEs?