CopilotForXcode icon indicating copy to clipboard operation
CopilotForXcode copied to clipboard

Not writing to the files

Open gordingin opened this issue 7 months ago • 9 comments

Copilot seems to work, but when it says it makes a change to the files, I do not see them. I'm verifying this by looking at any sort of Unstaged files in GIT

  • Copilot for Xcode: 0.36
  • Xcode: 16.4
  • macOS: 15.5

Image

Image

Even agrees with me that the changes were not made. I am in agent mode.

gordingin avatar Jun 07 '25 12:06 gordingin

I have seen this issue too; the Agent is only successfully applying changes about half of the time. Sometimes (but not always), if you ask the Agent to try again, it successfully modifies the files.

ETA: my versions all match @gordingin’s

wellshuxley avatar Jun 07 '25 15:06 wellshuxley

Hi @gordingin, @wellshuxley.

Thanks for reaching out. We've noticed this issue and are currently investigating it. Would you mind sharing the log file located at ~/Library/Logs/GitHubCopilot/github-copilot-for-xcode.log. It's really helpful.

lijie-lee avatar Jun 09 '25 01:06 lijie-lee

@lijie-lee thanks for the response - hope this helps!

github-copilot-for-xcode-redacted.log

wellshuxley avatar Jun 09 '25 12:06 wellshuxley

Same here

oronbz avatar Jun 11 '25 18:06 oronbz

Hi @wellshuxley , @gordingin. Thanks for sharing the log file. We're working on this issue. Will keep you updated then.

lijie-lee avatar Jun 17 '25 02:06 lijie-lee

For me this seems to be related to how the files are detected with the automatic context. If I just let it try to edit the selected file then it fails. If I explicitly add the file I want to edit as context it succeeds.

If I ask copilot why it can't edit the files I'm told that it can't find it from the workspace.

It seems the file /Users/josh.wisenbaker/Documents/MenusExtra/ContentView.swift cannot be found in the workspace. However, the directory structure confirms the presence of the MenusExtra/ folder. This suggests that the file might be missing or located elsewhere.

I recommend verifying the file's existence and location. If the file is misplaced or renamed, let me know the correct path so I can proceed with the edits.

macshome avatar Jun 25 '25 15:06 macshome

Hi @gordingin , @wellshuxley.

Sorry for the late reply. We've being working on this issue to figure out the root cause. We've improved the editing file tool to make it more robust. It will be released within the next version of GitHub Copilot for Xcode.

Thanks.

lijie-lee avatar Jun 27 '25 06:06 lijie-lee

Hi!
I have had this issue too, but later I noticed that I was trying to change a file from a Swift package with agent, but it is read-only. =)

mstroshin avatar Jul 17 '25 09:07 mstroshin