Menu

Qwen Code 0.29: How Workspace Memory Works Across Worktrees

Qwen Code v0.29.0 changes the way workspace memory behaves when an agent session runs inside a Git worktree. Previously, memory could become fragmented because each worktree was a separate directory with its own local state. Starting with this release, workspace memory stays bound to the session's starting directory or the saved workspace rather than to the individual worktree path, and a new /memory migrate-worktree command is available to handle transitions explicitly.

The stable release landed on November 28, 2026, roughly an hour and eighteen minutes after the v0.29.0-preview.0 preview and following v0.28.7. The release notes contain 67 entries, including 22 features and 25 fixes, with no known breaking changes reported. Qwen Code Desktop v0.29.0 and the TypeScript SDK v0.1.40, which bundles the CLI, shipped the same day. For teams that lean on worktrees to isolate parallel tasks, the memory changes are the most consequential part of this update.

What Git worktrees are and why they complicate memory

A Git worktree is an additional working copy of the same repository. All worktrees share one commit history, but each has its own set of checked-out files and its own branch. Qwen Code uses this mechanism through the --worktree flag and the enter_worktree tool to isolate experimental edits from the main checkout. When a session starts with qwen --worktree, the CLI creates a worktree under the repository's .qwen/worktrees/ directory with a corresponding branch such as worktree-<slug> before any model turn runs.

The trade-off of this isolation is that a worktree is, from the file system's perspective, a different directory. Any state that was keyed to the directory path, rather than to the logical project, would not follow the agent into the new checkout. Workspace memory fell into that category in earlier versions. A developer who had taught Qwen Code project conventions in the main checkout could start a task in a worktree and find that the accumulated memory did not carry over, which forced redundant re-explanation across sessions and undermined the value of automated memory.

How memory binding changed in v0.29.0

The core fix in Qwen Code v0.29.0 is a change in what workspace memory is attached to. Instead of being anchored to the physical directory of the current checkout, memory now remains tied to the session's starting directory or to the saved workspace. In practice this means that when a task runs in a worktree, the memory accumulated about the project still resolves back to the logical workspace the developer launched from, not to the temporary .qwen/worktrees/<slug> path.

This matters because Qwen Code maintains memory through several complementary mechanisms documented in the official docs. QWEN.md files hold instructions written by the user, auto-memory holds notes the agent writes based on what it learns, and external memory can be queried on demand. These are managed under project and user directories, and keeping them bound to the logical workspace means the same preferences, conventions, and learned patterns remain available regardless of which checkout the current session happens to operate in.

The /memory migrate-worktree command

Alongside the binding change, the release introduces a dedicated /memory migrate-worktree command. This command gives developers an explicit way to move or reconcile workspace memory when a task's location changes, such as when work begun in one worktree needs to be associated with the original checkout or with a saved workspace.

The command is useful for the edge cases that automatic binding cannot fully infer. If a developer started work in an isolated worktree, decided to keep the changes, and then continued in the main directory, the command provides a controlled path to bring the relevant memory along. Rather than guessing where notes belong, the agent can be told directly where to migrate them. For configuration details and the exact syntax, the official Qwen Code documentation is the authoritative reference, and behavior may evolve between minor releases.

Related changes in the same release

Memory is only one part of what v0.29.0 adjusts. The /auth flow for custom providers now retrieves candidate models automatically from an OpenAI- or Anthropic-compatible endpoint, with search, activation, and manual entry as fallbacks. This reduces the setup friction of pointing Qwen Code at a self-hosted or third-party model endpoint and complements the memory changes by making it easier to run the same workspace across different model backends.

The pull request review commands /verify-pr and /autofix-pr also received stronger safeguards in this release. Before executing code from an untrusted PR, the tool now requires a host or VM to be selected and trust or approval to be confirmed, with host probes running in a fail-closed mode on Linux KVM and Apple Silicon. The Web Shell gained search over archived conversations and control over scheduled session tasks, while the Hosted Harness can resume an interrupted turn after a broker failover. These are separate from workspace memory but show the release's broader emphasis on isolation and safe execution.

What this means for day-to-day workflows

For developers who run several tasks in parallel, the practical effect is that memory continuity no longer depends on staying in a single directory. A session started in the main checkout and continued in a worktree, or started directly in a worktree, now resolves memory against the logical workspace, so preferences and project conventions persist without repeated setup. This removes one of the more subtle sources of inconsistency in agent-assisted coding, where the same project could behave differently depending on where the session happened to be launched.

The change also aligns with the trend toward running multiple agent sessions against the same repository at once. When each session gets its own worktree to avoid file conflicts, memory that follows the workspace rather than the checkout keeps the agents informed about the same accumulated context. Teams should still verify how their specific setup stores memory, since managed memory directories and pinned content can differ between user-level and project-level configurations, and the exact migration behavior is best confirmed against the official documentation for the installed version.

FAQ

What does "workspace memory across worktrees" mean in Qwen Code 0.29?

It means the agent's accumulated memory is no longer tied to the physical worktree directory. Memory stays bound to the session's starting directory or the saved workspace, so preferences and project notes persist even when the session runs in an isolated Git worktree.

What is the /memory migrate-worktree command used for?

It provides an explicit way to move or reconcile workspace memory when work changes location, such as when a task started in one worktree needs its memory associated with the original checkout or a saved workspace.

Do I need to change my configuration to get memory continuity across worktrees?

The release notes report no known breaking changes and describe the new binding as the default behavior for v0.29.0. Developers with explicit memory settings should confirm how their existing configuration interacts with the update, and consult the official Qwen Code documentation for the installed version.

Are the memory changes related to the /verify-pr and /autofix-pr updates?

They are separate features in the same release. The memory change addresses continuity across worktrees, while /verify-pr and /autofix-pr gained additional trust and approval safeguards before running code from untrusted pull requests.