Repository navigation
Conversation
houko
force-pushed
the
feat/editor-agent-failure-states-1024
branch
from
November 26, 2026 11:17
4508ea6 to
9601581
Compare
houko
force-pushed
the
feat/editor-agent-failure-states-1024
branch
2 times, most recently
from
November 26, 2026 12:23
869d569 to
f51c036
Compare
…e review pause, preconditions, theme reactivity, and race/deadlock safety
…r mid-press and preserve agent request count
houko
force-pushed
the
feat/editor-agent-failure-states-1024
branch
from
November 26, 2026 12:52
f51c036 to
373cd84
Compare
This branch has not been deployed
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.
Closes #1024.
Implements the six non-happy-path Agent panel states defined in
docs/design/editor/AgentStates.dc.htmlusing exclusivelySpecPalettetokens (both Dark and Light appearances), while keeping every manual editing tool (Select, Move, Inspector,CheckProblems, and Play) working in every state.Summary of Changes
AgentPartialState): renders"Done N of M · couldn't place <target>"with reason, Keep these, Let me point (clicking in the 2D viewport picks world coordinates viaPickAgentPointWorld;Esccancels cleanly), Try another way, and the change-count review strip (N changes · 1 file | +X −Y | Review).AgentStuckState): when the same MCP tool (such asscene_edit) fails three times in a row (AgentStuckFailureThreshold = 3), pauses/cancels the active request instead of guessing again, transitions the header chip toWaiting for you, lists all three refused calls with their errors in a recessed monospace log, and offers Hint for the agent with Continue with hint or Stop here (refused edits never touch the scene or disk file).AgentLostState): when an MCP client drops or a model API fails mid-request, marks the interrupted step"cut off, nothing written", captures completed edits in an unkeptAgentTurnReviewwith no partly written file on disk, shows timestamp and step alongside Reconnect, Review N changes, and Troubleshoot (or Retry now and fallback switching for model errors such as 529 overloaded), and asks before picking up at the next step once reconnected.AgentStoppedState): displaysDONEandNOT DONEstep lists with Resume (starting strictly at the first not-done step without redoing completed steps) and Review N changes; changes stay unkept until reviewed.AgentMismatchReport): checks every turn summary against the actual scene diff (CheckAgentSummaryAgainstDiff) and displays theWHAT · SUMMARY · REVIEWtable when they disagree, auto-explaining transient add/remove edits when known, with Ask why and Open review. Keep always applies the actual review diff, never the prose summary.AgentStatusOffline): displaysDisconnected · offlineand"You're offline", keeps Select, Move, Inspector, game check, and Play working, queues requests with timestamps and remove actions, and never auto-runs queued items when returning online—each queued request waits for an explicit Send.packages/game/editor/editormcp/server.go): snapshots external edit baselines beforeActionEditcalls and records concise call summaries andEditError.Problemmessages viaEditor.RecordAgentToolCall.docs/en/editor.mdanddocs/zh/editor.md(and removed the stray conflict marker), addedchangelog.d/editor-agent-failure-states.md, and recorded.agents/notes/implemented/feature/2026-11-26-editor-agent-failure-states.md.Verification
env -u GOROOT go tool nsgo check(desktop +-target ios) passed for./editor,./editor/editormcp, and./editor/editorcmd.TMPDIR=/tmp env -u GOROOT go tool nsgo test -run "TestAgent|TestConnectDialog|TestParseClaude|TestLocaleCatalogsComplete" ./editor: 18/18 passed.env -u GOROOT go tool nsgo test ./editor/editormcp: 48/48 passed (including scripted MCP client acceptance tests for 3 failedscene_editcalls pausing the request, dropped connection leaving a review and untouched disk file, Resume after Stop skipping done steps, and summary-vs-diff mismatch).env -u GOROOT go tool nsgo test -target macos -screenshots ... -run TestAgentFailureStatesMacOSScreenshots ./editor/editorcmd: captured and visually inspected real native macOS screenshots for Partial, Partial (pointing), Stuck, Lost, Stopped, Mismatch, and Offline besidedocs/design/editor/AgentStates.dc.html.env -u GOROOT go run ./tools/changelog checkandbun run verify-notes: passed.