Skip to content

🌳 feat: Isolate Attached Workspaces by Conversation - #16107

Merged
danny-avila merged 4 commits into
devfrom
danny-avila/conversation-workspaces
Sep 20, 2026
Merged

danny-avila merged 4 commits into
devfrom
danny-avila/conversation-workspaces

Conversation

@danny-avila

@danny-avila danny-avila commented Sep 19, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • derive an opaque, stable attached-workspace instance identity from the authenticated user and conversation
  • activate conversation isolation only when the selected worker root advertises git_worktree support
  • carry the binding through ordinary workspace tools, repository instructions, approvals, background work, and programmatic execution
  • preserve legacy behavior for workers that do not advertise instance support

Stack dependencies

Focused verification

  • 118 focused code workspace tests pass across command, workspace, capability, and repository-instruction paths
  • the real published 3.8.8 SDK test verifies programmatic Bash sends the same opaque workspace_instance_id used by ordinary workspace tools
  • dependency resolution selects the published 3.8.8 tarball with its registry integrity
  • package API typecheck remains blocked by unrelated current-dev local workspace build skew; CI builds the internal packages in dependency order

Security properties

  • clients cannot choose the instance identity
  • malformed or forged identities fail validation
  • approval resumes are bound to the same instance
  • ordinary and programmatic Bash stay on the same conversation checkout
  • older workers never receive the new field

@danny-avila

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-19T19:15:02.218473Z 471a652 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Something went wrong. Try again later by commenting “@codex review”.

Unknown error
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danny-avila

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6fe50eba60

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

...(attached
? {
workspaceId: context.codeWorkspace?.workspaceId,
workspaceInstanceId: context.codeWorkspace?.workspaceInstanceId,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Pin the Agents release before forwarding workspace instances

When programmatic tool calling is enabled for an attached workspace advertising git_worktree, this only passes workspaceInstanceId as an untyped extra option while package-lock.json still pins @librechat/agents 3.8.7, whose declared PTC options do not include or forward that field. Consequently PTC commands continue executing in the shared base workspace while the native file and Bash tools use the conversation worktree, defeating the isolation guarantee and potentially exposing changes across conversations. Pin the Agents release that implements workspace-instance forwarding before enabling this path.

Useful? React with 👍 / 👎.

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.

Valid blocker. Workspace-instance forwarding is implemented by companion Agents PR LibreChat-AI/agents#548, but that PR is still open and no package release containing it exists yet. This LibreChat PR remains draft and will not be marked ready until that release is pinned in package.json/package-lock.json. Merge commit 471a652 only reconciles the branch with current dev and intentionally does not pretend 3.8.7 supports this option.

…on-workspaces

# Conflicts:
#	packages/api/src/agents/execution.ts
#	packages/api/src/code/capabilities.ts
#	packages/api/src/code/command.ts
@danny-avila

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the current PR head 471a652. Confirm that this exact commit is the reviewed commit and ignore findings that apply only to earlier heads.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 471a65270a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danny-avila
danny-avila marked this pull request as ready for review September 20, 2026 00:28
@danny-avila
danny-avila marked this pull request as draft September 20, 2026 01:20
@danny-avila

Copy link
Copy Markdown
Collaborator Author

Security review correctly identified that the currently locked Agents 3.8.7 does not forward workspaceInstanceId through PTC. I restored this PR to draft. Do not merge or deploy this integration until LibreChat-AI/agents#548 is merged and released, the dependency and lockfile are updated here, and ordinary + programmatic calls are verified against the same instance. Green CI with the old SDK is not evidence that this boundary works. Code Interpreter findings are addressed separately in #239 at f255141135e7636c106d506f47cf67b0e4e0dc1f.

@danny-avila
danny-avila marked this pull request as ready for review September 20, 2026 01:41
@danny-avila
danny-avila merged commit 2df937d into dev Sep 20, 2026
40 checks passed
@danny-avila
danny-avila deleted the danny-avila/conversation-workspaces branch September 20, 2026 03:19
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.

1 participant