Repository navigation
fix(server): keep local edits when the dashboard updates an agent - #967
Merged
Merged
Conversation
Updating an agent from the dashboard replaced the file with the remote version even when the user had edited it since install. Skills were already protected: update skips them and offers a forced retry. Agents had the recorded file hash to compare against, but the update never looked at it. An agent whose file no longer matches its recorded hash is now skipped with the same message as a skill, so the Updates tab offers Force Retry and the agent's own page asks before overwriting. The check runs only once a newer version is about to be written, so an edited agent that is already at the remote version still reports up to date. Assigning targets to an agent from the dashboard rewrites its frontmatter. That rewrite now carries the recorded hash, as it does for skills, so it is not mistaken for a local edit. The confirmation on the agent's page no longer tries to list the local changes: that list is served for skills only and showed a load error.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
6 of 9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type
proposals/only — see CONTRIBUTING.md)approvedlabel)Linked Issue
None. This is the follow-up that #966 lists under "Not covered". It is based on
mainand does not depend on #965 or #966.What changed
Updating an agent from the dashboard replaced the file with the remote version even when the user had edited it since install. Skills were already protected: update skips them and offers a forced retry.
has local changes since install (try force update). The Updates tab then offers Force Retry on the row, and the agent's own page asks before overwriting.website/docs/reference/commands/update.mdand its ja, ko, zh-Hans and zh-Hant copies describe the behaviour.Agents inside a tracked repo are not affected: they update through the repo, which has its own check for uncommitted changes.
Screenshots
Update on
writer, edited locally and behind its remote, from the Agents Updates tab: skipped, with Force retry.Update from the agent's own page: it asks before overwriting.
Checks
make checkin the devcontainer: passed.pnpm lint(0 errors),pnpm format:check,pnpm build.TestMetadataEntry_AgentLocallyModified: unchanged file, edited file, no recorded hash, missing file.TestUpdateAgent_LocallyModifiedIsSkippedWithoutForce: an edited agent behind its remote is skipped and the file is kept. It failed before the fix.TestUpdateAgent_LocallyModifiedAtTheRemoteVersionIsUpToDate: an edited agent at the remote version reports up to date.TestHandleSetSkillTargets_KeepsLocalChangeStateOfRemoteAgent: assigning a target leaves an unedited agent unedited and an edited agent edited.skillshare check agentsstill reportsup_to_date.python3 scripts/ai-context.py check: ok.Not run: website build. The docs change is one plain paragraph per file.
Not covered
skillshare check agentsreports such an agent aslocalfor the same reason.update agentsis not changed.Checklist
make check) — for code changes