Skip to content

docs: map workspace isolation in the pstack adapter and re-pin stale cites - #150

Merged
ibetitsmike merged 3 commits into
mainfrom
mike/pstack-adapter-batch-secret-workspace
Nov 10, 2026
Merged

ibetitsmike merged 3 commits into
mainfrom
mike/pstack-adapter-batch-secret-workspace

Conversation

@ibetitsmike

@ibetitsmike ibetitsmike commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

Part of #13 and #8.

Updates docs/fork/pstack-adapter.md for #144 (isolation: "workspace"), and re-pins citations that went stale, some of them since #135. The page now says what fork main at 5f6b636911 does.

  • Workspace isolation (feat(coderd): spawn subagents into their own workspace with isolation workspace #144). A new Workspace isolation section says that, with fork-subagent-isolation, isolation: "workspace" gives the child its own new workspace. It covers:
    • the workspace comes from the active version of the parent workspace's template, with the parameters of its latest build, and belongs to the chat owner;
    • spawn_agent returns only once the workspace's agent is ready and its startup scripts finished, and the child gets its prompt after that;
    • the workspace has none of the parent's files, so tell the child where to get the code and to push its work;
    • the isolation and workspace_name (or workspace_error) fields in spawn_agent and wait_agent;
    • the error messages, including the template checks (Coder Agents allowed, no externally managed agent) that create_workspace runs before any build;
    • the single, unretried archive and stop after a failed spawn, which never deletes the workspace, and that Coder Agents never stops or deletes the workspace of a child that spawned.
      The environment: "cloud" row now points to it.
  • feat(coderd): give descendant tools secret answers without showing them to the model #126 (secret answers for descendant tools). No prose. The secret question option stays off in the code (descendantQuestionTool.secret is never set outside tests), so nothing changes for a chat yet. The SendToUser secret requests row keeps W2 (secret questions).
  • Evidence. New entries cite fork_isolation_workspace.go, the workspace branches in fork_isolation.go, fork_isolation_report.go, and fork_subagents.go, the template checks in chattool/createworkspace.go, and the root-only workspace tools in turn_environment.go. The header names 5f6b636911.
  • Stale citations. A per-line audit (each evidence line checked from the header commit it was last edited under to 5f6b636911) found ranges that feat(coderd/x/chatd): bind isolated subagents to their worktree #135, feat(coderd): give descendant tools secret answers without showing them to the model #126, and feat(coderd): spawn subagents into their own workspace with isolation workspace #144 moved without a re-pin, in fork_subagents.go, turn_environment.go, fork_agent_definitions.go, fork_isolation.go, fork_descendant_questions.go, and fork_chat_questions.go. They are updated, and the changed ones (fork_isolation.go:101-115, :135-141, fork_isolation_report.go:48-103, fork_subagents.go:220-233) were re-read and re-cited.

Validation

  • The per-line citation audit reports no moved or changed range on the committed page.
  • markdownlint-cli2 0.16.0 and markdown-table-formatter 1.6.1 on the page: 0 errors, no changes. The added lines have no em dashes, en dashes, spaced double hyphens, or semicolons outside  .
  • UAT on the isolated 3100 server (5f6b636911 with fork-subagent-isolation): the repo_path error, the new workspace and its template, the return after agent ready, the isolation and workspace_name fields in spawn_agent and wait_agent, the child's separate workspace, and the workspace that outlives the archive all matched. Details in docs: map workspace isolation in the pstack adapter and re-pin stale cites #150 (comment). The template checks and the failed-build cleanup are checked against the code only.
  • Docs only. No code change.

Xum opened this PR on behalf of @ibetitsmike.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T17:32:20.063985Z 7a4ce5e 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.

@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum acted for Mike on this comment.

@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: 64944324d2

ℹ️ 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".

Comment thread docs/fork/pstack-adapter.md Resolved
Comment thread docs/fork/pstack-adapter.md Resolved
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum acted for Mike on this comment.

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 7a4ce5e2ad

ℹ️ 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".

@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum acted for Mike on this comment.

UAT on the isolated 3100 server

Head 7a4ce5e2ad, server v2.39.1-devel+5f6b636911, experiments: the 6 daily ones plus fork-subagent-isolation. The member root chat ran on uat3100-smoke (uat3100-docker template).

Doc claim Observed
repo_path or base_branch with isolation: "workspace" fails with repo_path and base_branch need isolation worktree spawn_agent returned {"error":"repo_path and base_branch need isolation worktree"}
spawn_agent creates a new workspace from the parent workspace's template, as the chat owner New workspace uatmember/uat3100-docker-5258 on template uat3100-docker, created 19:18:41 by the spawn call
spawn_agent returns only after the agent is ready and startup scripts finished Build job completed 19:18:44.27, agent ready at 19:18:44.48, spawn_agent result at 19:18:45.69
The spawn_agent result adds isolation and workspace_name {"status":"running","isolation":"workspace","workspace_name":"uat3100-docker-5258",...}
The child's tools run in the new workspace, which has none of the parent's files Child execute printed hostname uat3100-docker-5258, pwd /home/coder, CODER_WORKSPACE_NAME=uat3100-docker-5258, and no ~/.coder/worktrees
wait_agent adds isolation and workspace_name without a diff_summary {"isolation":"workspace","workspace_name":"uat3100-docker-5258",...}, no diff_summary key
Coder Agents doesn't stop or delete the child's workspace after you archive the chats Root archive returned 204, both chats archived=true, and 90 seconds later uat3100-docker-5258 was still start/succeeded

Not exercised on 3100: the template checks (Coder Agents not allowed, externally managed agent) and the cleanup after a failed build, which would need a template change or a broken build. They are checked against chattool/createworkspace.go:178-190 and fork_isolation_workspace.go:88-100, :170-227.

Cleanup: both chats archived, uat3100-docker-5258 deleted and its volume gone (host back to 18 volumes), uat3100-smoke stopped, uatmember back to 13 unarchived chats, 3100 back to 1 workspace.

@ibetitsmike
ibetitsmike merged commit d1bb658 into main Nov 10, 2026
10 checks passed
@ibetitsmike
ibetitsmike deleted the mike/pstack-adapter-batch-secret-workspace branch November 10, 2026 19:23
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum (AI agent) merged this on behalf of @ibetitsmike.

Merge evidence for head 7a4ce5e2ad30d040bee7f395aa83dcf00266d77d:

  • Docs only (docs/fork/pstack-adapter.md). fork-ci pull_request run 42865481168 passed on this head; it merged cleanly onto main after feat(coderd/x/chatd): cap chat wake-ups per day and add notify_user #115, and main fork-ci on the squash commit gates the deploy. All checks green.
  • Codex on this exact head: no major issues (comment 6774442609). 0 unresolved review threads. Round 1's two P2s (template checks, best-effort cleanup after a failed build) were fixed.
  • Gate on :3100 at 5f6b636911 with fork-subagent-isolation on (gate comment 6775801977): the repo_path error, the new workspace from the parent's template, the return after the agent is ready, isolation and workspace_name in spawn_agent and wait_agent with no diff_summary, and the child running in its own workspace all matched the rows. Cleanup verified by Fork ops.

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