Skip to content

agent pane: a no-project chat is trusted from its first frame, not after a settings read - #34730

Merged
cmux-bot[bot] merged 2 commits into
feat-cmux-nextfrom
lane/pane-open-instant
Nov 4, 2026
Merged

cmux-bot[bot] merged 2 commits into
feat-cmux-nextfrom
lane/pane-open-instant

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Leo, 2026-11-03, beside the "This pane is still opening; try again in a moment." toast:

and this is extremely bad. i should be able to just close immedeiately.
and why does it even take time to read settings? you know what things are. the read defaults/the "not working in a project" thing that should all be instant

The close half is already fixed on base (#34367, #34530). This PR takes one piece of the second half: a chat in no project ("Do not work in a project") runs in its workspace's agent-home folder, which acpmux always trusts (trust.rs, made_by_cmux). The pane still drew no trust answer for that folder until acp.trust.get came back. That read opens and parses the agents' settings files (~/.claude.json, ~/.codex/config.toml) and checks git, with a 1.5 s timeout (TRUST_READ_TIMEOUT_MS). The folder is new for every workspace, so the pane's trust cache never had it. Until the read answered, the chat was not shown as trusted, and prompts held behind trust waited (trustHeldWaits).

What changes:

  • folderTrust.ts adds agentHomeTrust(cwd), which returns acpmux's own answer ({level: "trusted", decided: true}) for a direct child of ~/Library/Application Support/cmux/agent-home. It returns nothing for a folder inside one, for the root itself, or for a look-alike path.
  • useFolderTrustAsk uses that answer on the first frame, but only for a chat whose folder is on this computer and that has nothing cached for it. The read still runs and replaces it. acpmux's trust gate is still the authority, so a refusal reads the folder again as before.

Test: newtab/agentHomeTrust.test.tsx covers three cases, all with a read that never answers. An agent-home chat is trusted with no block on every frame, and the read is still made. Any other unread folder still waits. A remote chat at the same path, or a subfolder, gets no seed.

Not changed here (findings, for follow-ups):

  • The New Tab folder chip keeps its place unlabelled for up to RESERVE_MS (2 s) when the tab has no folder and acpmux has not listed chats yet (NewTabScreen.tsx projectPending). This is deliberate (Leo 2026-10-19: no "Choose folder" then flip).
  • The access chip draws PendingMode until _acpmux/start_mode or the session's modes answer. The model catalog and the cmux.json agentPane.models arrive with models.catalog, not the handshake.

Risk: small. A webview first-frame seed for one folder class, with acpmux's gate unchanged.

Leo-ask: ask-fa845ab0fd

🤖 Generated with Claude Code

Agent session: agent session


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Shows a no-project chat as trusted on the first frame instead of waiting for a settings-file read, so prompts no longer hold behind trust while acp.trust.get runs.

  • folderTrust.ts adds agentHomeTrust(cwd), which returns acpmux's trusted answer for a direct child of ~/Library/Application Support/cmux/agent-home.
  • useFolderTrustAsk seeds that answer on the first frame for local chats with nothing cached; the read still runs and replaces it, and acpmux's trust gate remains the authority.
  • A remote chat at the same path, a subfolder, or any other unread folder still waits on the read.

Written for commit 7fe8ab5. Summary will update on new commits.

View guided diff Turn on auto-fix

teamleaderleo and others added 2 commits November 4, 2026 03:31
… first frame

acpmux trusts the folder the app made for a chat in no project (trust.rs
made_by_cmux). The pane drew no trust answer until acp.trust.get had read
the agents' settings files (up to 1.5 s); it now draws acpmux's answer at
once and the read only refreshes it.

Leo-ask: ask-fa845ab0fd

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-36c741e8cc8b4594cd3c
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-36c741e8cc8b4594cd3c
@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review afe105a: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr34730 -f ref=lane/pane-open-instant -f platform=macos -f backend_mode=local

Gallery before/after for afe105a: 16 states rendered, 0 images differ, 1424 more touched states not rendered. Images are in the run's artifact, not on this public PR; the independent review of this head reads them on its own, so the PR needs no hand-made screenshots of these states.

gh run download 41768310553 -R manaflow-ai/cmux -n gallery-advisory-34730-afe105a8019af9d38f4cfaeb6e6bb3bf3f3d5798 (then read gallery-review.json)

States
State Theme Status Diff Picked by
agent-pane.auth-health/signed-in Apple System Colors Light unchanged 0% imports folderTrust.ts (1 hops)
agent-pane.auth-health/signed-in Apple System Colors unchanged 0% imports folderTrust.ts (1 hops)
agent-pane.auth-health/signed-out Apple System Colors Light unchanged 0% imports folderTrust.ts (1 hops)
agent-pane.auth-health/signed-out Apple System Colors unchanged 0% imports folderTrust.ts (1 hops)
agent-pane.auth-health/expired Apple System Colors Light unchanged 0% imports folderTrust.ts (1 hops)
agent-pane.auth-health/expired Apple System Colors unchanged 0% imports folderTrust.ts (1 hops)
agent-pane.auth-health/unknown Apple System Colors Light unchanged 0% imports folderTrust.ts (1 hops)
agent-pane.auth-health/unknown Apple System Colors unchanged 0% imports folderTrust.ts (1 hops)
agent-pane.bottom-stack/pr-queue Apple System Colors Light unchanged 0% imports useFolderTrustAsk.ts (1 hops)
agent-pane.bottom-stack/pr-queue Apple System Colors unchanged 0% imports useFolderTrustAsk.ts (1 hops)
agent-pane.bottom-stack/trust-permission-queue Apple System Colors Light unchanged 0% imports useFolderTrustAsk.ts (1 hops)
agent-pane.bottom-stack/trust-permission-queue Apple System Colors unchanged 0% imports useFolderTrustAsk.ts (1 hops)
agent-pane.bottom-stack/trust-individual-queue Apple System Colors Light unchanged 0% imports useFolderTrustAsk.ts (1 hops)
agent-pane.bottom-stack/trust-individual-queue Apple System Colors unchanged 0% imports useFolderTrustAsk.ts (1 hops)
agent-pane.bottom-stack/trust-then-permission Apple System Colors Light unchanged 0% imports useFolderTrustAsk.ts (1 hops)
agent-pane.bottom-stack/trust-then-permission Apple System Colors unchanged 0% imports useFolderTrustAsk.ts (1 hops)
agent-pane.bottom-stack/trust-then-individual Apple System Colors Light unchanged 0% imports useFolderTrustAsk.ts (1 hops)
agent-pane.bottom-stack/trust-then-individual Apple System Colors unchanged 0% imports useFolderTrustAsk.ts (1 hops)
agent-pane.bottom-stack/trusted-permission-queue Apple System Colors Light unchanged 0% imports useFolderTrustAsk.ts (1 hops)
agent-pane.bottom-stack/trusted-permission-queue Apple System Colors unchanged 0% imports useFolderTrustAsk.ts (1 hops)
agent-pane.bottom-stack/trusted-individual-queue Apple System Colors Light unchanged 0% imports useFolderTrustAsk.ts (1 hops)
agent-pane.bottom-stack/trusted-individual-queue Apple System Colors unchanged 0% imports useFolderTrustAsk.ts (1 hops)
agent-pane.bottom-stack/trusted-individual-waiting Apple System Colors Light unchanged 0% imports useFolderTrustAsk.ts (1 hops)
agent-pane.bottom-stack/trusted-individual-waiting Apple System Colors unchanged 0% imports useFolderTrustAsk.ts (1 hops)
agent-pane.chat-width/standard Apple System Colors Light unchanged 0% imports folderTrust.ts (1 hops)
agent-pane.chat-width/standard Apple System Colors unchanged 0% imports folderTrust.ts (1 hops)
agent-pane.chat-width/wide Apple System Colors Light unchanged 0% imports folderTrust.ts (1 hops)
agent-pane.chat-width/wide Apple System Colors unchanged 0% imports folderTrust.ts (1 hops)
agent-pane.chat-width/wide-blocks Apple System Colors Light unchanged 0% imports folderTrust.ts (1 hops)
agent-pane.chat-width/wide-blocks Apple System Colors unchanged 0% imports folderTrust.ts (1 hops)
agent-pane.composer/font-size-chat-14 Apple System Colors Light unchanged 0% imports useFolderTrustAsk.ts (1 hops)
agent-pane.composer/font-size-chat-14 Apple System Colors unchanged 0% imports useFolderTrustAsk.ts (1 hops)

Pick other states with a Gallery: entry.id, entry.id/variant line in the PR body.

Shipped in:

@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Nov 4, 2026
@blacksmith-sh

blacksmith-sh Bot commented Nov 4, 2026

Copy link
Copy Markdown

Found 5 test failures on Blacksmith runners:

Failures

Test View Logs
main.DeveloperIdAppTests.test_download_prints_the_active_profile_only/
test_download_prints_the_active_profile_only
View Logs
stubs: /System/Library/Frameworks/Security.framework/Versions/A/Security has no stub/
Security has no stub
View Logs
stubs: CoreFoundation.tbd: install-name /System/Library/Frameworks/
CoreFoundation.framework/Versions/A/CoreFoundation, missing 1: ['_CFRetain']/
CoreFoundation, missing 1: ['_CFRetain']
View Logs
stubs: CoreFoundation.tbd: install-name /System/Library/Frameworks/
CoreFoundation.framework/Versions/A/CoreFoundation, missing 1: ['_log2']/
CoreFoundation, missing 1: ['_log2']
View Logs
test_the_type_check_covers_every_webviews_test_file (main.WorkflowShape.test_the_ty
pe_check_covers_every_webviews_test_file)/
test_the_type_check_covers_every_webviews_test_file (main.WorkflowShape.test_the_ty
pe_check_covers_every_webviews_test_file)
View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@teamleaderleo teamleaderleo left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review (codex gpt-6-astra high, next-review, since=20261104T041521Z): SHIP at afe105a

SHIP at afe105a
Visual verdict: no images; Leo tries the build

  1. [P2] [follow-up] [category:correctness] [finding:F1] [outcome:pending] The matcher trusts look-alike folders. folderTrust.ts:103 matches /tmp/project/Library/Application Support/cmux/agent-home/ws. Unlike made_by_cmux, it verifies neither the actual home root nor the marker file. This incorrectly displays trusted and removes the initial send hold; the false state persists if the read times out. The server gate still protects execution. Seed from verified native agent-home identity and add coverage for look-alikes outside the home directory.

Confirmed the matcher behavior with Node; React tests could not run because Bun and dependencies are unavailable.

Follow-ups:

  • F1: Restrict the seed to verified agent-home folders and cover false matches.

@cmux-bot
cmux-bot Bot merged commit 60c3b41 into feat-cmux-next Nov 4, 2026
171 of 173 checks passed
@cmux-bot
cmux-bot Bot deleted the lane/pane-open-instant branch November 4, 2026 05:11

This branch was previously deployed

1 inactive deployment
ci-routing-agent — afe105a8 Deployed Nov 4, 2026 by teamleaderleo via wait for same-key tree publisher #109220
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant