Agentic Copilot Repeatedly Kills Long-Running Server Process by running new commands in the same terminal #170008
Replies: 11 comments 2 replies
-
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
|
Yup, this is an issue. There should be an option to give the co-pilot a "terminal context" I noticed the "Agent awareness of user-created terminals," but that does not work. Consider adding a setting when you create a new terminal to add, like a checkbox to let Co-Pilot have access to that as context. |
Beta Was this translation helpful? Give feedback.
-
|
Yeah, this is a huge nuisance for me. I'm unable to get it to understand or obey instruction that it's killing the very terminal running it's trying to inspect the running service of. Big leap forward with terminal interactions, but this is a huge blocker. |
Beta Was this translation helpful? Give feedback.
-
|
This is driving me crazy. I have tried every promot I can think of. And when it runs as a "task", copilot never sees the output and seems to think everyhting worked just fine. I've had builds that clearly showed erros in the output window, but copilot was "everything is good". But when runin the terminal, it see the output fine. But then its not in the background so it cant start the process (web site) and then run a curl command. ... This is a huge issue.. |
Beta Was this translation helpful? Give feedback.
-
|
Same behaviour. What the heck is happening ? It's since 1 entire week. I will unsubscribe to this garbage |
Beta Was this translation helpful? Give feedback.
-
|
I am glad I am not crazy and other folks are experience this too.. but yes, it would be grand to fix this.. |
Beta Was this translation helpful? Give feedback.
-
|
Please fix. It should be simple enough to code and would save so many going down a rabbit hole moments because it starts and tests in the same window. It gets doublely frustrating when you try and seperate API from UI, as it will only start the UI server for example despite it depending on the API server in the odd moment when it does perform a test in a seperate console. |
Beta Was this translation helpful? Give feedback.
-
|
I’ve used a workaround to bypass this issue, and I’m sharing it here in case you want to try it. Stop scriptStart ScriptThen add instruction to copilot instructions to guide Agent how to start/stop & check server log |
Beta Was this translation helpful? Give feedback.
-
|
My solution to this is to instruct the agent to use |
Beta Was this translation helpful? Give feedback.
-
|
Hey guys, I've actually noticed a lot less drama with this since the latest
Github Copilot update because it runs things in hidden terminals and it
seems to track things better in them - I think it spawns a new terminal
more sensibly now.
HOWEVER, I have had more success with running my apps with pm2 for example
which then my agent knows to restart that service or start it up, but it
all runs in the background so it can't as easily kill the terminal it
started the process in! It's been working much better than running straight
from the terminal and node.
…On Tue, 17 Feb 2026 at 17:13, Federico Feroldi ***@***.***> wrote:
My solution to this is to instruct the agent to use tmux then running
commands
—
Reply to this email directly, view it on GitHub
<#170008 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA5JSXUUIZWTKYC3DTPL3DL4MLLUDAVCNFSM6AAAAACEBPYAA6VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTKOBTGI4TOMI>
.
You are receiving this because you commented.Message ID:
***@***.***>
--
Kind regards,
Joshua A
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Bug
Copilot Feature Area
VS Code
Body
🐞 Bug Report: Agentic Copilot Repeatedly Kills Long-Running Server Process by running new commands in the same terminal
Summary
When using GitHub Copilot in agent mode, Claude sonnet 4, I observed that it consistently executes new commands in the same terminal where a long-running server process was started. This behavior causes the server to be terminated prematurely.
Steps to Reproduce
curl).Expected Behavior
Copilot should not run any new commands in the same terminal where the server was started, especially after being explicitly instructed not to do so.
Actual Behavior
Despite multiple feedbacks and explicit instructions, Copilot continues to reuse the same terminal. This results in the server being killed repeatedly.
Even when I create a new terminal to run the command, copilot will still select the wrong terminal and runs the command in the server terminal.
A lot of work is lost because we need to restart to process.
Evidence
Copilot itself acknowledged the issue with the following comment:
However, after restarting the server, Copilot ran a
curlcommand in the same terminal again, killing the server once more.Additional Context
I have included a
.copilot/instructions.mdfile with the explicit instruction:Yet this instruction is not being respected.
Suggested Fix
Ensure that Copilot:
.copilot/instructions.mddirectives reliably.Let me know if you need logs, config files, or a reproducible environment to investigate further.
Beta Was this translation helpful? Give feedback.
All reactions