Make switching to code mode navigation, not a step of writing - #125
Draft
jurgenwerk wants to merge 2 commits into
Draft
Make switching to code mode navigation, not a step of writing#125jurgenwerk wants to merge 2 commits into
jurgenwerk wants to merge 2 commits into
Conversation
The environment skill told the model to call switch-submode before every new file, then write the SEARCH/REPLACE block. Models followed it literally: one switch per file, plus no-op re-switches to a file already open, each ending a turn without a write. A SEARCH/REPLACE block with (new) creates the file by itself. The decision tree, the workflow recipes, and the command reference now say: files are created and edited with SEARCH/REPLACE alone; switch-submode is optional navigation, at most once per task, never when the tab is already in code mode on that file, and codePath is a plain URL without the (new) marker. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Workspace Sync Dry-Run CompleteDry-run completed successfully - no changes were made Dry-Run Results |
A model built a card family with placeholder tool calls between reads and writes, re-confirmed code mode it was already in, passed a .gts path as a card id, and spent a turn announcing a fix before writing it. The text now says: a reply carries prose, SEARCH/REPLACE blocks and tool calls together and never needs a tool call to end; the last tool result's context says where the tab is, so no confirming switch, and no bare switch in code mode; a card instance id is the instance URL without extension, never a file path; after a failed check, re-read and fix in the same reply. The workflow recipes are prose about what goes in one reply instead of arrow chains that read as turns. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
(Written by Claude on Matic's behalf.)
In a local Sonnet 5 session that built a wedding planner app, 20 of 37 turns were
switch-submodecalls: one before each of 12 new files, and 8 re-switches to a file that was already open ("stay in code mode", "confirm code mode"). Each call ended the turn without a write and re-sent a 70k to 170k token conversation. The session cost $2.28. Sonnet 4.6 on the same prompt made no such calls.The habit comes from this skill. The decision tree said, for every new card or definition:
switch-submodewithcreateFileand the path, then SEARCH/REPLACE. The workflow recipes and the command reference repeated it, and nothing said "only if you are not already there". A SEARCH/REPLACE block with(new)after the URL creates the file by itself, so the switch was never part of writing.The text now says, in each of those places:
(new)for a new file. No mode switch is needed before writing.switch-submodeis navigation for the user's benefit. At most once per task, and never when the tab is already in code mode on that file. The last tool result'scontext.codeMode.currentFilesays where the tab is.codePathis a plain file URL. The(new)marker belongs after the URL in a SEARCH/REPLACE block, never inside a tool argument. A model did put it there, and the host stalled on the path.Files:
index.md,boxel-environment/SKILL.md, and the environment referencesworkflows-and-orchestration.md,host-commands-reference.md,calling-commands.md.The host side hardens
switch-submodeagainst the same two habits, in boxel PR "Clean switch-submode's codePath and skip the switch when already on that file".🤖 Generated with Claude Code