Skip to content

docs: map agent definition warnings and worktree removal on archive in the pstack adapter - #145

Merged
ibetitsmike merged 7 commits into
mainfrom
mike/pstack-adapter-batch-child-wakes
Nov 10, 2026
Merged

ibetitsmike merged 7 commits into
mainfrom
mike/pstack-adapter-batch-child-wakes

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 #137 (agent definitions in the context popup) and #138 (subagent worktrees removed when their family is archived), and re-pins the citations that #119 and #125 moved. The page now says what fork main at 77b20734d2 does.

  • Agent definitions in the context popup (feat(site/src): show agent definition warnings in the context popup #137). The Custom agent types section now says that the context usage indicator lists the pinned definition files under Agent definitions, with each ok definition's warnings under its name and the other files as issues, and that a definition with warnings turns the indicator to its warning color.
  • Worktree removal on archive (feat(coderd/x/chatd): remove subagent worktrees when their family is archived #138). The Worktree isolation section no longer says that Coder Agents always keeps a child's worktree and branch. It now says:
    • after you archive the root chat, Coder Agents removes each child's worktree and branch in the background;
    • this also happens when the deployment archives the root as inactive;
    • it keeps a worktree with uncommitted or untracked files, one that is off its branch, one with submodule commits on no remote, and one whose branch or HEAD and branch reflogs reach a commit on no other branch or remote, and keeps them all when the workspace agent is unreachable or older than the server;
    • the root chat gets one notice that lists each kept worktree with its branch and reason;
    • so merge or push each child's branch and its submodule commits, and keep any commit that a reset dropped, before archiving, and remove kept worktrees by hand.
  • Evidence. New entries cite ContextUsageIndicator.tsx, fork_family_lock.go, auto_archive.go, fork_isolation_cleanup.go, and the agent's delete checks in fork_worktrees.go. feat: accept secret answers to descendant questions outside chat messages #119 and feat(coderd): expire chat secret answers after 24 hours #125 moved ranges in fork_chat_questions.go, fork_chat_routes.go, and fork_descendant_questions.go, and they are updated. feat(coderd): expire chat secret answers after 24 hours #125 (secret answers expire after 24 hours) needs no prose, because the page doesn't cover secret answers yet. The header names 77b20734d2.

Validation

  • Block-match checks of every cited range in the files changed from 5a47dc7bed to 77b20734d2: the moved ranges are updated, and the two changed ones (fork_chat_routes.go:53, fork_chat_questions.go:29-72) were re-read and re-cited.
  • markdownlint-cli2 0.16.0 on the page: 0 errors. The added lines have no em dashes, en dashes, spaced double hyphens, or semicolons outside  .
  • UAT on the isolated 3100 server at 77b20734d2, as a member, with fork-agent-definitions (feat(site/src): show agent definition warnings in the context popup #137) and fork-subagent-isolation (feat(coderd/x/chatd): remove subagent worktrees when their family is archived #138) enabled:
    • With w7-ok.md, w7-warn.md (no description and an unknown flavor key), and w7-bad.md (name W7_Bad) in ~/.coder/agents, the context popup showed Agent definitions with the /home/coder/.coder/agents directory, w7-ok, and w7-warn with missing description; unknown front-matter field "flavor" ignored under it, and w7-bad.md under Issues with agent name "W7_Bad" is not kebab-case.
    • With only w7-ok.md and w7-warn.md, the indicator had the warning color and its label ended with Some agent definitions have warnings. With only w7-ok.md, it had neither.
    • A root chat spawned two worktree children in a scratch repo. One only ran pwd, the other wrote an untracked note.txt. After PATCH /api/v2/chats/{root} with archived: true, the clean child's worktree and branch were gone within 45 seconds, the dirty child's were kept, and the root chat got the notice Archiving this chat kept 1 subagent git worktree(s)... naming the path, the branch, and has 1 uncommitted or untracked changes; commit or discard them first.
    • Every test chat is archived, the fixtures, kept worktree, branch, and scratch repo are removed, the workspace is stopped, and the ops agent restores the server's daily experiments.
  • Docs only. No code change.

Xum opened this PR on behalf of @ibetitsmike.

@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum acted for Mike on this comment.

@codex review

@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-10T14:16:43.610534Z 1a19549 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 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: 48007d590d

ℹ️ 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 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: ac7710fb5f

ℹ️ 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
@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. What shall we delve into next?

Reviewed commit: 1a19549320

ℹ️ 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
ibetitsmike merged commit e44a0a2 into main Nov 10, 2026
10 checks passed
@ibetitsmike
ibetitsmike deleted the mike/pstack-adapter-batch-child-wakes branch November 10, 2026 14:49
@ibetitsmike

Copy link
Copy Markdown
Owner Author

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

Merge evidence for head 1a19549320213d62475195a8495793123723a03b:

  • Docs only (docs/fork/pstack-adapter.md). fork-ci pull_request run 42832028736 passed on this head; it merged cleanly onto main after feat: summarize isolated subagent worktrees in wait_agent #141 (64965c9488), and main fork-ci on the squash commit gates the deploy. All checks green.
  • Codex on this exact head: no major issues (comment 6769659936). 0 unresolved review threads. Three earlier P2s (auto-archive cleanup, submodule commits, reflog-only commits) were fixed.
  • Gate on :3100 at 77b20734d2: the context popup showed agent definitions with their warnings and issues, and archiving a root removed the clean child's worktree and kept the dirty one with the notice. 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