Skip to content

Show the active environment directory after switching a thread workspace #1237

Description

@smsunarto

Summary

After update_environment_directory switches a thread to another directory, the composer footer continues to show the original project name. The thread uses the new directory correctly, but the UI makes it appear that the switch failed.

Reproduction

  1. Start a thread in project project-a.
  2. Call update_environment_directory with /path/to/project-b.
  3. Send another message so the provider starts in the new environment.
  4. Check the workspace label in the composer footer.

Current behavior

The environment is updated correctly:

  • environment.path is /path/to/project-b.
  • The branch and working-tree summary come from project-b.
  • The thread still has the project-a project ID.
  • The footer shows only project-a.

This creates conflicting UI signals. The branch and diff belong to project-b, while the adjacent folder label says project-a.

Expected behavior

When the active environment path differs from the project root, the composer footer should show the active workspace directory:

project-a / project-b

The full environment path should be available in a tooltip:

/path/to/project-b

The UI should update as soon as the thread environment changes. It should not require a page reload.

Activity

  1. added
    ui
    workspaces
    on Aug 18, 2026
  2. smsunarto commented on Aug 26, 2026

    @smsunarto
    ContributorAuthor

    Reproduced on bb 0.40.0 from npm, macOS 26.5.2, using Codex.

    The agent switched from ~/git/dotfiles to ~/git/bb with update_environment_directory. The runtime then used the new directory correctly.

    bb thread show reported:

    project: dotfiles
    environment.path: ~/git/bb
    

    The composer footer still showed dotfiles, while the adjacent branch and workspace state came from bb. A full browser reload did not correct the label.

    This confirms the problem persists in the current release and survives reload.

  3. added a commit that references this issue on Aug 27, 2026
    36e88bf
  4. smsunarto commented on Sep 7, 2026

    @smsunarto
    ContributorAuthor

    Recurrence report

    The reporter is seeing the same symptom again: after bb switches a thread's workspace, the repository label below the composer continues to show the original repository. This issue was closed by #1507, but the current source again renders the original project name.

    Evidence and likely cause

    Inspected upstream main at accd5595926b080a1e17d1ea9b2fa2d7d0505ac6 after pulling:

    This corroborates the reported label behavior when the environment changes but the owning project does not. I have not independently reproduced the live workspace switch in this investigation, so this is an unverified recurrence report with source evidence, not a confirmed end-to-end repro. The original affected thread and a screenshot were not supplied.

    Reproduction to verify

    1. Open a thread in a project named project-a.
    2. Ask the agent to switch this thread to an existing checkout at /absolute/path/to/project-b using update_environment_directory.
    3. After the switch completes, send pwd in the next turn and confirm that execution uses /absolute/path/to/project-b.
    4. Inspect the repository label below the composer without reloading.

    Expected: the footer identifies the active project-b workspace, with its full path available in the tooltip, as specified in this issue.

    Reported actual: the footer continues to show project-a.

    Proposal

    We should reopen this issue and restore active-workspace identity in the composer footer. A regression check should switch the environment while retaining the same thread/project and verify both the visible directory and tooltip without a reload.

    Environment and investigation

    • Investigation CLI: bb 0.42.1. The reporter's browser build was not independently verified.
    • Usage context: bb Connect in a remote browser.
    • Source inspected: upstream commit linked above. No clean-main runtime verification is claimed.
    • Searched open and closed issues with composer repository, workspace switch, and repository stale. This issue matches the symptom exactly.
    • Investigation thread: thr_rdafsga3np, project proj_5vda5bh2f5.

    AGENT GENERATED

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    uiworkspaces

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions