@@ -144,6 +144,27 @@ the agent calls these tools and reports back the resume command.
144144> directory, so registering this server inside Cowork may not work even though registering
145145> it in Claude Code does.
146146
147+ ## Experimental: switch the model without leaving Cowork
148+
149+ ` cowork2code switch-model ` creates a ** new Cowork session** that continues an existing
150+ conversation on a different model — so you can keep working in Cowork instead of moving to
151+ Claude Code.
152+
153+ ``` console
154+ $ cowork2code switch-model --title " emerging" --to-model claude-sonnet-4-6
155+ New Cowork session: Research: emerging LLM trends (→ claude-sonnet-4-6) (claude-haiku-4-5 -> claude-sonnet-4-6)
156+ Session id: local_…
157+ Quit Cowork fully (Cmd+Q) and relaunch to see it on the new model.
158+ Cleanup: rm -rf "…/local_…" "…/local_….json"
159+ ```
160+
161+ This authors a session in Cowork's local storage (your own machine, your own data) and is
162+ ** experimental and unsupported** : Cowork's on-disk format is undocumented and may change
163+ across updates. The original session is never modified, every run prints a one-line cleanup,
164+ and the new session's config and audit log are written with owner-only permissions.
165+ Rendering the conversation on the new model is reliable; whether the * next* turn retains full
166+ prior context depends on Cowork internals — verify before relying on it.
167+
147168## What gets created in the target directory
148169
149170- The session's ` outputs/ ` and ` memory/ ` files.
@@ -184,13 +205,16 @@ Project layout:
184205
185206```
186207cowork2code/
187- paths.py project-directory escaping and path resolution
188- transcript.py locate, rewrite, and write transcript JSONL
189- discover.py scan the sessions root and resolve selectors
190- notes.py render the configuration-notes sidecar
191- rehome.py plan and execute a re-home
192- cli.py the cowork2code command
193- mcp_server.py the local MCP server
208+ paths.py project-directory escaping and path resolution
209+ transcript.py locate, rewrite, and write transcript JSONL
210+ discover.py scan the sessions root and resolve selectors
211+ notes.py render the configuration-notes sidecar
212+ rehome.py plan and execute a re-home (Cowork -> Claude Code)
213+ audit.py build Cowork's audit.jsonl from a transcript
214+ cowork_session.py synthesize a new Cowork session (switch-model)
215+ _fs.py shared file-tree copy helper
216+ cli.py the cowork2code command
217+ mcp_server.py the local MCP server
194218cowork2code_mcp.py zero-install uv launcher for the MCP server
195219install.sh install the CLI and register the MCP server
196220```
0 commit comments