Skip to content

Hand Solo chats' Canvas to their agents - #1308

Merged
morgmart merged 2 commits into
mainfrom
carl/project-folder-agents
Oct 18, 2026
Merged

morgmart merged 2 commits into
mainfrom
carl/project-folder-agents

Conversation

@morgmart

@morgmart morgmart commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Project settings (folders, worktree location, base branch, instructions) are written into a Solo chat's Canvas, but no agent runtime ever read the Canvas. Agents started in their own workspace (~/.buzz), were never told about the project, and researched the wrong repo. Claude also could not stay in a project folder: Claude Code resets the shell to its start folder after any cd outside its allowed folders.

Change

  • Each Solo chat turn reads the chat's Canvas and hands it to the agent as a <workspace-canvas> section, with a short note naming the project folders and worktree location. Applies to Claude Code, Codex and goose.
  • Claude also gets the project folders and worktree location as --add-dir, so a cd into them (for example into a new worktree) persists. Its start folder stays the agent workspace, because Claude's session resume, transcripts and titles are located by start folder.
  • Changing a chat's folders restarts its idle Claude session with the new folders, resumed where it was. A Canvas that can't be read keeps the folders the chat already had.
  • Only a Canvas whose current version was written by the chat's owner, or by an agent they attest, is handed over; anything else is ignored. When the Canvas is empty, cleared or not the owner's, the agent is told explicitly to disregard any earlier one and its folders.
  • Shared channels are unchanged: their Canvas can be edited by any member, so it isn't handed over.

Not included

  • Existing chats don't pick up later edits to project defaults (settings are copied into a chat when it's created).
  • The generated workspace instructions still live visibly in the Canvas.
  • Watch and timer turns don't get the Canvas.

Validation

  • New and updated unit tests for the workspace parser, the project section, and Claude, Codex and goose runtimes (Solo chat gets the Canvas and folders, shared channel gets none, folder changes resume the session, failed reads keep the session, non-owner edits and cleared Canvases are disregarded).
  • Checked against the bundled Claude Code binary: with --add-dir, cd into the folder persists across commands; without it the shell resets. ~ paths and missing folders are accepted.
  • Pre-commit and pre-push checks pass apart from one timing-sensitive agent service test that also times out on main under the same load and passes when run alone. The local hook bridge references a removed .githooks script, so the checks were run directly before pushing.

Screenshots

No screenshots: this changes what agents receive behind the scenes, with no visible interface change.

🤖 Generated with Claude Code

@morgmart
morgmart requested a review from a team as a code owner October 18, 2026 03:19

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🤖 Star Lord’s automated source review via Wes’s account.

Reviewed head 67222ab9dd1eac3a86641ad2cc760a02d668f6b3 against base b90bd29c145255fb8b992c4de1eea0b601b6f061. Integrated independent Rocket (systems/lifecycle), Mantis (correctness/security), and Groot (product/user-flow) coverage.

Two actionable findings are inline: one P1 and one P2. Assessment: 8/10; the implementation is focused, but these trust and instruction-lifecycle defects keep it below the repository’s 9/10 bar. This is a non-blocking COMMENT review, not approval or a merge decision.

Source coverage includes all 14 changed files, callers, Canvas access/sharing, session reuse, failure/retry paths, and the public PR description and commit. No attached images or additional public-material disclosure finding. The settings UI is unchanged; rendered focus/accessibility behavior was not exercised.

Validation: findings are based on pinned source; PR code, tests and the app were not executed. Hosted CI was still in progress at the snapshot; Windows validation was skipped. Live relay, native/session resume and cross-platform behavior remain unverified. A reviewer separately ran two installed-CLI probes outside the repository, beyond the requested source-only scope; both exited and were excluded from validation.

Optional: directory-bearing Claude sessions no longer match the unkeyed metadata fingerprint or directory-free warmed spare (sessions.ts:109-119,414-416,453-461, runtime.ts:194-196,689-691). Consider measuring the resulting discovery/cold-start cost; no performance regression magnitude is established.

Comment thread src/features/agents/reads.ts Outdated
Comment thread src/features/agent-harness/project.ts
morgmart and others added 2 commits October 17, 2026 22:16
Project settings write a workspace block into a Solo chat's Canvas, but no
agent runtime ever read it, so agents started in their own workspace and
never learned the project's folders, worktree location or instructions.

Each Solo chat turn now reads the chat's Canvas and hands it to the agent
as a project-canvas section, for Claude Code, Codex and goose alike. Claude
also gets the project folders and worktree location as --add-dir, so a cd
into them persists; its start folder stays the agent workspace, where its
session resume, transcripts and titles live. A Canvas that cannot be read
keeps the folders the chat already had.

Co-authored-by: Carl <c217fe6b9d958f41c3a5e030dccc7f626775a923089cb6491305eade75ea1f1b@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
A shared Solo chat keeps its Solo placement, so its members can write the
Canvas an agent was handed as the owner's standing instructions, and
Claude took its folders as --add-dir. Only a Canvas head the owner, or an
agent they attest, wrote is handed over now, in all three runtimes.

A cleared Canvas, or one someone else wrote, used to send nothing, so an
agent kept following the one it was handed before. It now sends an
explicit replacement telling the agent to disregard it; a failed read
still keeps what the chat had.

Co-authored-by: Carl <c217fe6b9d958f41c3a5e030dccc7f626775a923089cb6491305eade75ea1f1b@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
@morgmart
morgmart force-pushed the carl/project-folder-agents branch from 67222ab to acbdbed Compare October 18, 2026 06:14

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🤖 Star Lord’s automated source review via Wes’s account.

Follow-up review of head acbdbedc36adbfb57061d4507ea232853b929758 against base dc305c9e3bff304719cde2d06994a4c163c096db, integrating independent Rocket (systems/lifecycle), Mantis (correctness/security), and Groot (product/user-flow) lanes.

No new actionable findings; 9/10. Both prior findings in review 5561257576 are addressed in source:

  • Canvas instructions and Claude launch directories now require an owner-authored or cryptographically owner-attested head. The real query adapters verify event signatures before this gate.
  • Empty or rejected-author Canvas heads produce an explicit replacement section across Claude, Codex and goose. Claude drops cached directories and replaces an idle process while resuming its conversation; failed or timed-out reads retain prior state.

Coverage includes the nine-file fix, its integration with the 14-file feature diff, session reuse/steering, Solo-label routing, shared Canvas reads, and added test source. Claude tests exercise populated → failed read → changed folders → untrusted → cleared; Codex exercises untrusted replacement; goose exercises empty replacement; the shared helper covers blank/absent content and author attestation.

Optional product follow-up: settings still display the latest Canvas even when its author makes it ineligible for agent instructions (src/features/solo/WorkspaceSettings.tsx:115-119; src/features/agent-harness/project.ts:57-65). Consider showing that distinction to the owner. This is not a requested change for this review.

The public PR description and both commit messages were inspected; no attached images or public-material disclosure finding. No UI/focus code changed.

Validation is source-only: no tests, binaries, probes, or app launches were run. Hosted application CI was still in progress at the snapshot; Windows validation was skipped. Actual session resume, busy steering, live relay behavior, latency, rendered accessibility/focus and human acceptance remain unverified. This COMMENT review is not approval or merge authorization.

@morgmart
morgmart merged commit 7d50425 into main Oct 18, 2026
32 checks passed
@morgmart
morgmart deleted the carl/project-folder-agents branch October 18, 2026 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants