Repository navigation
feat: discover plugin packs in agentcontext behind fork-plugins - #156
Conversation
A plugin pack is a directory holding a Claude Code, Cursor or agent-plugins.org manifest. The agentcontext resolver now discovers packs among the direct children of every scan root (and the root itself), reads their manifests, and emits the pack's declared skills and agents directories like ordinary skill and agent containers, honoring Cursor manifest dir overrides while rejecting declarations that leave the pack root. Pack-contributed resources carry the manifest path in SourcePath, and a new chatd gate drops them from the prompt and the context popup when the fork-plugins experiment is off, so a deployment without the flag matches upstream. The KindPlugin manifest resource itself stays agent-local: no DRPC or workspace body kind carries a plugin payload yet, so nothing is pushed for the manifest. The watcher watches pack roots and their declared containers so pack changes re-resolve, and ~/.coder/plugins joins the default scan roots for installed packs.
Adds fork-plugins to the Experiment enum in the generated spec, the schemas.md value list and the site Experiment type, matching the constant added in the parent commit. The enum entries are inserted at the committed position; swag's map-order nondeterminism across deployment.go and fork_experiments.go is not committed.
|
@codex review
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7f5983b999
ℹ️ 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".
…manifest edits Codex review follow-ups on PR #156: - Custom agent types now flow through the fork-plugin gate, so pack agents are not offered while fork-plugins is off (the prompt and the context popup already were). - isPackContribution splits on both path separators: the source path is stamped by the workspace agent, which may run on Windows while coderd runs on Linux. - A scan root that is itself a pack now routes through the pack walk, so its resources carry the manifest path and the gate can drop them; ordinary container discovery would have claimed the same files unstamped. - The watcher re-resolves on plugin manifest edits, which fsnotify reports as writes that the recognized-name list did not cover.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8b922558d1
ℹ️ 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".
…oundary, cap pack resources last Codex round-2 follow-ups on PR #156: - readPluginManifest stats the manifest and rejects files over the 64 KiB per-resource payload cap before reading, so a multi-gigabyte plugin.json cannot be pulled into memory during resolve or watcher synchronization. - Pack skills and agents resolve symlinks against the pack directory instead of the enclosing scan root, so a pack cannot import resources from outside its own boundary. - applyCaps sorts pack contributions last within each kind, so the count cap cuts hidden pack rows before ordinary workspace resources and the chatd fork-plugin filter never leaves an ordinary resource excluded on behalf of a pack. Covers codex threads 4530856974, 4530856958, 4530856947.
… gate The round-1 gate fix left the import behind; go build fails the package and every package that imports it (fork-ci run 42906095273).
|
@codex review
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 941441ef23
ℹ️ 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".
…pack rows out of drift Codex round-3 follow-ups on PR #156: - readPluginManifest Lstats the manifest and requires a regular file, so a checked-in plugin.json symlink (even to /dev/zero) or a FIFO is never read, whatever its apparent size. - A manifest that parses but declares no name is not a pack: the directory keeps ordinary discovery instead of being stamped with the pack marker the fork-plugin gate filters. - driftResources drops pack rows, so installing or editing a pack cannot change the drift hash that hash-comparing subscribers read as a prompt change while fork-plugins is off. Covers codex threads 4531571858, 4531571869, 4531571863.
…discovery Three round-3 tests were written against a wrong mental model and their first execution was the first container validation run: - TestResolver_PluginPacksExcludedFromDrift resolved two different TempDirs and required equal AggregateHashes. The hash covers absolute ID and Source strings, so snapshots of different directories can never hash equal; a stream diff showed the first differing byte was the TempDir serial digit. Resolve one root before and after the pack appears instead: identical paths, so the only way the hash can move is a pack row leaking into the drift set, which is what the test must catch. - TestResolver_PluginPacksNamelessManifest expected a nested pstack/AGENTS.md to be discovered, but ordinary discovery only recognizes instruction files at the scan root's top level. Give the root a top-level AGENTS.md as the positive control and a pack-style skills container under pstack that would be stamped if a nameless manifest were accepted, then require nothing from pstack to appear. - TestResolver_PluginPacksManifestSymlinkRejected passed only vacuously: with no pack containers in its layout, even an accepted symlink emits nothing. Add the skills container and require nothing from pstack to appear.
|
@codex review Round-3 follow-ups are in. Head is now d8004d8: a81524e fixes the three round-3 findings (manifest Lstat + regular-file guard, nameless-manifest rejection, pack rows excluded from the drift hash) and d8004d8 corrects the three round-3 tests to match actual resolver discovery (same-root before/after for the drift hash; positive controls and no-pstack-leak assertions for the nameless and symlink cases). Container validation is green on this exact head. Threads replied and resolved.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d8004d8a91
ℹ️ 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".
Codex round-4 follow-ups on PR #156: - The agent excludes pack contributions from its pushed aggregate hash unconditionally because it has no experiment knowledge. With fork-plugins on, pack rows are pinned prompt content, so editing one must mark bound chats dirty; the pushed hash never changed and live-sync covers only MCP and ACP, leaving chats on stale pack content. chatd now derives the drift hash itself from the pushed rows via an optional ContextDriftHasher capability: agentapi stores the derived hash on the snapshot row and hydrates and dirties chats against it, so the create-time and refresh pinning paths, which re-read the snapshot row, stay consistent with the push path by construction. With the experiment off the derivation reproduces the agent's exclusion, making the derived hash byte-identical to the pushed one. - addPackWatchDirs arms the deepest existing ancestor of each declared pack container path: a manifest declaring "skills": "components/skills" while only components/ exists got no watch that fires when components/skills is created later (fsnotify is non-recursive), leaving the pack undiscovered until an unrelated resync. Covers codex threads 4532602312 and 4532602321.
The derived drift hash must land on the snapshot row and return to the dirty marker so create-time and refresh pinning stay consistent with the push path.
|
@codex review Round-4 follow-ups are in. Head is now b6161ee: 3f1ce49 makes the chat drift hash experiment-aware (chatd derives it from the pushed rows via a new agentapi ContextDriftHasher capability and the derived value is stored on the snapshot row, so the create-time and refresh pinning paths stay consistent with the push path; with fork-plugins on, pack rows join the drift hash while MCP/ACP stay live-synced, and with it off the derived hash is byte-identical to the agent's pushed aggregate) and arms ancestor watches for missing declared pack containers so a late-created declared container still fires; b6161ee adds the agentapi push-path test for the derived hash. Container validation is green on this exact head (agentcontext suite, chatd drift/gate tests, agentapi push tests, builds). Threads replied and resolved.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b6161ee009
ℹ️ 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".
Round 5 of the codex review loop on PR #156 (threads 4533498689, 4533498695, 4533498700. Emission negotiation (P1, 4533498700): pack rows reached the shared context tables on the agent's first push, so a rolling upgrade with a newer agent behind an older coderd replica could persist pack skills that the old replica pins without a pack gate. PushContextStateResponse now carries a fork_plugin_packs capability (field 100, fork convention), agentapi sets it from a server option wired to the fork-plugin-packs experiment, and the agent's resolver only emits pack rows once a server advertised it; the Manager triggers a resync whenever the advertised value flips in either direction, so retraction applies on the next push. Drift hash (P2, 4533498689): with fork-plugin-packs on but fork-agent-definitions off, pack subagent rows stayed in the derived drift hash although ContextResources removes every subagent entry, so pack agent edits dirtied chats without changing their prompt, tools or visible inventory. DriftHash now skips KindSubagent pack rows unless agent definitions are enabled; ordinary subagent rows stay hashed. Live sync (P2, 4533498695): SyncAgentChatsContextLiveResources compared only bodies, so an unchanged .mcp.json that gains or loses a plugin.json manifest reclassified its MCP rows without ever reaching chat pins. Both change comparisons now include source_path (IS NOT DISTINCT FROM). Rename (lead decision): experiment fork-plugins -> fork-plugin-packs, const ExperimentForkPlugins -> ExperimentForkPluginPacks, with swagger/apidoc/site types regenerated accordingly; fork_plugin_* file names are unchanged. Validated in containers w6-r3val5/r3val5b/r3val5c (protoc 23.4 + pinned plugins, sqlc fork 337309bfb9524f38466a5090e310040fc7af0203 with SKIP_DUMP_SQL=1): agentcontext suite, targeted chatd and agentapi tests, and builds of agent/... agentapi/... chatd/... codersdk/... all green. EOF )
|
@codex review Round-5 fixes are on the new head 4846347 (pushed; PR head moved from b6161ee): emission negotiation via the push-response capability, drift-hash pack-subagent exclusion while fork-agent-definitions is off, source_path in both live-sync change comparisons, plus the fork-plugins -> fork-plugin-packs experiment rename. Threads 4533498689/4533498695/4533498700 replied and resolved; container-validated (w6-r3val5c, all green).
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4846347c21
ℹ️ 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".
Round 6 of the codex review loop on PR #156 (threads 4534564265, 4534564269, 4534564274). Reconnect leak (P1, 4534564265): a long-lived agent that re-established its dRPC connection against an older replica reused the Manager with the previous connection's advertised flag still set, so the initial push of the new connection led with the pack-bearing snapshot before the new peer's response could reset the capability. RunPush now resets the advertised flag at entry and re-resolves before the first push, so every connection starts pack-free and earns the capability back from its own peer. Root-pack leak (P1, 4534564269): a scan root that is itself a pack stamped its top-level AGENTS.md and .mcp.json before the gated emitPacks call, so an older replica received pack-provided instructions and MCP configuration marked with a marker it ignores. The capability gate now covers the whole root-pack branch: without the advertisement nothing is discovered from a pack root, top-level files included. API artifacts (P2, 4534564274): the round-5 rename missed the x-enum-varnames line in swagger.json (ExperimentForkPlugins) and the value-list row in docs/reference/api/schemas.md (fork-plugins); both now carry the canonical fork-plugin-packs spelling, matching the committed insertion style of 7f5983b without swag's map-order churn. Validated in container w6-r3val6 (no network, warm caches): agentcontext suite, targeted chatd and agentapi tests, and builds of agent/... agentapi/... chatd/... codersdk/... all green.
|
@codex review Round-6 fixes are on the new head 665ce22 (pushed; PR head moved from 4846347): every push connection now starts unadvertised with a pre-push resync, the root-pack branch is gated end to end (a pack root contributes nothing before the capability, top-level files included), and the two stale rename artifacts (swagger.json x-enum-varnames, schemas.md value list) now carry fork-plugin-packs / ExperimentForkPluginPacks. Threads 4534564265/4534564269/4534564274 replied and resolved; container-validated (w6-r3val6, all green, no network).
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 665ce22e9a
ℹ️ 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".
Round 7 of the codex review loop on #156 (threads 4534780508, 4534780514, 4534780521): - Reconnection reset republishes a non-mutating negotiation snapshot: Snapshot gains CapabilityGeneration, resyncNegotiating bumps it and re-publishes with SnapshotError "plugin-pack capability renegotiating", PushContextStateRequest carries capability_generation (proto field 7), and PushContextState skips HydrateAndMarkChatsDirty while it is nonzero. A no-op reconnect can no longer dirty chats pinned to the pack-inclusive hash; the settling push (generation 0) re-pins normally. - Pack agent rows are omitted entirely while the fork-agent-definitions capability is unadvertised. applyCaps count cap is index-based, so previously excluded rows still consumed slots and could starve live MCP/ACP provider rows. PushContextStateResponse gains fork_agent_definitions (field 101), wired from the experiment via agentapi Options and workspaceagentsrpc. - Pack manifests whose SourcePath exceeds the 1024-byte transport limit (coderd/agentapi rejects the whole snapshot, and pushWithRetry would retry a permanently-invalid request) are dropped before emission. Validated in containers w6-r3val8 (proto regen + steps green) and w6-r3val9c (steps green); w6-r3val9b step 1 failed on a wrong Source path in a new test, disclosed to ops and fixed.
|
@codex review Round-7 fixes are on the new head 465f92d (pushed; PR head moved from 665ce22): the reconnect reset now publishes a non-mutating negotiation snapshot (Snapshot.CapabilityGeneration, request field capability_generation, HydrateAndMarkChatsDirty skipped while nonzero), pack agent rows are omitted before cap accounting while the fork-agent-definitions capability is unadvertised (response capability fork_agent_definitions, field 101), and packs whose manifest path exceeds the 1024-byte transport limit are dropped before emission. Threads 4534780508/4534780514/4534780521 replied and resolved; container-validated (w6-r3val8 regen + w6-r3val9c, all green).
|
Round 8 of the codex review loop on #156 (threads 4535979811, 4535979823): - The DRPC push adapter now maps resp.GetForkAgentDefinitions() into PushResponse, so the production path advertises the capability the peer reported instead of only the in-memory test path. - RunPush settles a negotiation push (nonzero capability generation) with a generation-zero successor resync even when neither capability flipped: a no-flip reconnect previously left the non-mutating negotiation snapshot in place, so chats created while disconnected stayed unhydrated and MCP/ACP live-sync stalled until an unrelated resolver event. Validated in container w6-r3val10 (agentcontext, chatd, agentapi steps and build all green).
|
@codex review Round-8 fixes are on the new head 6adf7da (pushed; PR head moved from 465f92d): the DRPC push adapter now forwards resp.GetForkAgentDefinitions() so the production path advertises the definitions capability (thread 4535979811), and a negotiation push now always settles with a generation-zero resync even when no capability flips, so a no-flip reconnect can no longer leave chats unhydrated or stall MCP/ACP live-sync (thread 4535979823). Both threads replied and resolved; container-validated (w6-r3val10, all green, no network).
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6adf7da13a
ℹ️ 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".
…on rejects Round 9 of the codex review loop on #156 (threads 4536229387, 4536229396): - A negotiation push (capability_generation != 0) now persists nothing: no snapshot row, no resource upserts, no stale deletes, no chat state. The previous persist-but-skip-hydration behavior left the temporary pack-free snapshot as the agent's latest, so a chat created or refreshed during the reconnect window pinned a hash the settling push immediately dirtied. Create- and refresh-time hydration now keep consuming the last settled snapshot and its resources as one consistent pair; the settling push (generation 0, guaranteed by the round-8 settle resync) persists the settled inventory and defines the baseline. - The rejected (replay or out-of-order) response now carries both advertised capability fields, not just fork_plugin_packs: the agent reads a zero capability as a retraction and would resync without pack rows until the next accepted response. Agent-side doc comments updated to the probe design; no agent behavior change. Validated in container w6-r3val11 (agentcontext, chatd, agentapi steps and build all green).
|
@codex review Round-9 fixes are on the new head 7a9736d (pushed; PR head moved from 6adf7da): a negotiation push is now a pure capability probe that persists nothing (no snapshot row, no resource upserts, no stale deletes, no chat state), so create- and refresh-time hydration keep consuming the last settled snapshot and its resources as one consistent pair and can no longer pin a hash the settling push immediately dirties (thread 4536229387), and the rejected response now carries both advertised capability fields so a dropped push no longer reads as a retraction (thread 4536229396). Both threads replied and resolved; container-validated (w6-r3val11, all green, no network).
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7a9736d61d
ℹ️ 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".
…ent resolves Round-10 codex review findings on 7a9736d: - agent/agentcontext/push.go: the connection-start capability reset now also fires while a negotiation window is already open (sticky flag), and a failed reset resync returns an error instead of only logging, so a connection whose rebuild failed never pushes the retained pack-bearing snapshot as settled inventory and the still-open window makes the next connection retry the reset. advertise() gains a negotiated argument that closes the window once the probe was processed, even when the response carries no capabilities, and a single settle trigger covers window close and capability flips. (codex 4536654735) - agent/agentcontext/manager.go: every snapshot published while the negotiation window is open carries a nonzero capability generation. Both publish sites (Resync and resolveAndBroadcast) capture the flag when the resolve starts, so a watcher- or provider-triggered resolve that starts inside the window publishes a probe even if it finishes after the window closes; the first generation-zero publish after the close is capability-complete. (codex 4536654704) - agent/agentcontext/fork_plugins.go: addPackWatchDirs also watches the directory containing a nested manifest (.claude-plugin/plugin.json), which fsnotify cannot see from the pack root; without it manifest edits went unnoticed until an unrelated event. Watcher regression test TestWatcher_FiresOnNestedPackManifestEdit. (codex 4536654717) - agent/proto/agent.proto (+ regenerated agent.pb.go, comment-only): the capability_generation contract now states the negotiation push is a non-persisting capability probe; only its generation-zero successor is stored. (codex 4536654727) Validation: container w6-r3val12 (golang:1.26.10-bookworm, protoc 23.4 regen + go test agentcontext, chatd targeted, agentapi push, build) STEP0-4 all rc=0; regenerated agentsocket.pb.go byte-identical. Closes codex review threads 4536654735, 4536654704, 4536654717, 4536654727.
|
@codex review Round-10 fixes are on the new head 85cb26b (pushed; PR head moved from 7a9736d): the capability reset now also fires while a negotiation window is open and a failed reset resync fails the connection instead of letting the retained pack-bearing snapshot be pushed (thread 4536654735), every resolve started inside the window is stamped as a probe at publish time in both publish sites (thread 4536654704), addPackWatchDirs watches the directory holding nested manifests so their edits fire (thread 4536654717), and the proto/Snapshot comments now describe the non-persisting probe contract (thread 4536654727). All four threads replied and resolved; container-validated in w6-r3val12 (protoc 23.4 regen + STEP1-4, all rc=0, agent.pb.go comment-only, agentsocket.pb.go byte-identical).
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 85cb26b3b3
ℹ️ 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".
…ly, watch manifest candidates Round-11 codex review findings on 85cb26b: - push.go: a capability reset whose resync pass was superseded by a concurrent resolve gets the previously published snapshot back from Resync's stale-epoch path, which can be the retained pack-bearing generation-zero inventory. RunPush now fails the connection when the reset returns a settled (generation-zero) snapshot; the negotiation window stays open, so the next connection retries the reset. (codex 4537198965) - push.go: advertise swaps the response's capabilities in while the window is still open, then closes the window and settles with a synchronous Resync instead of an asynchronous Trigger, so no resolve can publish a generation-zero snapshot from the reset defaults in the gap between window close and the settling pass. (codex 4537198976) - fork_plugins.go: addPackWatchDirs also watches existing nested manifest candidate directories (.claude-plugin/, .cursor-plugin/) of the scan root and its child directories, whether or not a manifest parses there, so creating or restoring plugin.json fires an event. (codex 4537198982) Tests: TestRunPush_SupersededResetFailsConnection (deterministic gate on Resolver.MCPResources parks the reset resolve behind a newer manual resync) and TestWatcher_FiresWhenNestedPackManifestAppears. Also moves TestWatcher_FiresWhenDeclaredPackContainerAppears' doc comment back onto its function. Validation: container w6-r3val13 STEP1-4 all rc=0 (agentcontext suite, chatd targeted, agentapi push, build).
|
@codex review Round-11 fixes are on the new head c87dff7 (pushed; the PR head moved from 85cb26b):
All three threads have replies and are resolved. Container-validated in w6-r3val13 (STEP1-4 all rc=0).
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c87dff7e1b
ℹ️ 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".
Resolves the conflict in coderd/x/chatd/fork_agent_definitions.go: main extracted the definition parsing loop into parseAgentDefinitionResources, and this branch filters pack-contributed rows before parsing. The resolution keeps the fork-plugin-packs filter in workspaceAgentDefinitions and calls the extracted helper.
The agent type catalog from main (#188) parses workspace agent context rows directly and copied only BodyKind, Body and Status, so it bypassed the fork-plugin-packs filter: with the experiment off it listed pack agent types that spawn_agent does not offer. agentRowDefinitions now carries SourcePath into the converted rows and runs filterPackResources before parsing, matching workspaceAgentDefinitions. TestAgentRowDefinitionsGatesPackAgents covers both experiment states.
|
@codex review Head a6f9fee merges main (1a88b7c) into this branch. While resolving the conflict in
|
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
…s, skip subagent drift when definitions are off - agentcontext: track whether a push connection has been established and reset capability negotiation on the first connection after an agent restart, so the probe runs even when the manager already published a settled snapshot. Only the generation-0 push clears the initial flag, and an unimplemented push RPC closes the negotiation window. - agentcontext: treat writes inside a pack's declared agents container as relevant watcher events and watch those directories. - chatd: exclude every subagent row from the drift hash while fork-agent-definitions is disabled, matching the catalog, context and listing gates. Addresses Codex review comments 4537652618, 4537652671 and 4537652692. Validated in containers w6-r3val15 (agentcontext, chatd, agentapi tests, build) and w6-r3val15b (agent tests on an internal network).
|
@codex review Head
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8d940e5d7b
ℹ️ 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".
…test Capability negotiation now settles synchronously on the first connection, so TestRunPush_AdvertisedPacksTriggerResync could write its file before Run's watcher registered its watches and then wait forever for a watcher-driven push (fork-ci agent-sdk on 8d940e5). Drive the re-resolve with Manager.Resync like the sibling push tests. Validated in container w6-r3val16: the fork-ci agent-sdk command and -count=20 over every TestRunPush_ test.
|
@codex review Head
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8d56c345b7
ℹ️ 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".
Merged as a squash of head
|
A plugin pack is a directory holding a Claude Code (
.claude-plugin/plugin.json), Cursor (.cursor-plugin/plugin.json) or agent-plugins.org (plugin.json) manifest. The agentcontext resolver now discovers packs among the direct children of every scan root (and the scan root itself), reads their manifests, and emits the pack's declared skills and agents directories like ordinary skill and agent containers, honoring the Cursor manifest's declared directories.Pack-contributed resources carry the manifest path in
SourcePath, and a new chatd gate drops them from the pinned prompt and the context popup when thefork-plugin-packsexperiment is off, so a deployment without the flag matches upstream.Round 5 (codex review) additions: pack emission is negotiated -
PushContextStateResponsecarries afork_plugin_packscapability that the server sets from the experiment, and the agent emits pack rows only after seeing it, so a rolling upgrade with a newer agent behind an older replica never persists pack rows; the derived drift hash skips pack subagent rows whilefork-agent-definitionsis off; and the live-sync change comparisons includesource_pathso a pack marker flip on an unchanged.mcp.jsonreclassifies its MCP rows. The experiment was renamedfork-plugins->fork-plugin-packs(ExperimentForkPlugins->ExperimentForkPluginPacks); file namesfork_plugin_*.goare unchanged. TheKindPluginmanifest resource itself stays agent-local: no DRPC or workspace agent context body kind carries a plugin payload yet, so nothing is pushed for the manifest. Manifest-declared directories that escape the pack root (absolute paths or..) are rejected.The watcher watches pack roots and their declared containers so pack changes re-resolve the snapshot, and
~/.coder/pluginsjoins the default scan roots as the install location for the later PRs in the stack.Refs #12 (PRD 6.7, R7.1, R7.4, R7.5). First of five stacked plugin-packs PRs; install, per-chat enable, rules and pinned skills follow.