Repository navigation
fix: cap context push errors where the agent builds the wire request - #44
Conversation
…context resources
…ted MCP servers Claude Code names the reasoning level `effort`; accept it, with `reasoning_effort` taking precedence. Claude Code's `mcpServers` adds servers to the inherited set instead of restricting it, so it no longer switches the definition to a named allowlist.
…t-types-2-discovery
coderd rejects a whole PushContextState request when any resource error exceeds 4096 bytes. A definition with many unknown front-matter fields, or a long invalid name quoted in the parse error, produced an unbounded error and stopped every context resource from syncing. Truncate agent definition errors to 1024 bytes on a rune boundary.
- Skip agent containers that resolve outside their scan root, since definitions are shipped whole. - Watch the existing parent of a missing container (such as .claude) so creating the container later is picked up. - Skip a definition whose source is already a resource (an AGENTS.md in an agents scan root); coderd rejects pushes with duplicate sources. - Reject inline mcpServers definitions, which often carry credentials, instead of shipping them with a warning.
coderd rejects a whole PushContextState when any resource or snapshot error exceeds 4096 bytes, and the agent retries that push forever. Skill name errors and symlink resolution errors quote unbounded user text, so one bad SKILL.md or AGENTS.md symlink stopped all context sync. Truncate every error to 1024 bytes on a rune boundary in pushRequestToProto, replacing the definition-only cap from the agent discovery change. The test drives the agent's pusher into coderd's real handler so it fails if the two caps drift apart. Fixes #40
|
@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. |
|
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". |
…-push-errors # Conflicts: # agent/agentcontext/fork_agents.go # agent/agentcontext/fork_agents_test.go # coderd/agentapi/fork_context_test.go
Merge evidence at head
|
One oversized context error no longer blocks an agent's context sync until the agent restarts.
coderd rejects a whole
PushContextStatewhen any resource or snapshot error is over 4096 bytes (maxContextErrorBytes), and the agent keeps retrying the rejected push. Skill front-matter errors (skill name %q is not kebab-case,front-matter name %q does not match directory %q) and instruction-file symlink errors quote unbounded user text, so a singleSKILL.mdwith a 5000-character name or anAGENTS.mdsymlink to a long path stopped every resource from syncing.pushRequestToProtonow truncates each resource error and the snapshot error to 1024 bytes on a UTF-8 rune boundary, with a(truncated)suffix (agent/agentcontext/fork_push.go). The local resolver output and per-path messages are unchanged.fork_agents.go.TestPushContextStateAcceptsAgentOversizedErrorsdrives the agent'sDRPCPusherinto coderd's realContextAPI.PushContextState. Removing either truncation makes coderd reject the push (error is 5031 bytes, exceeds 4096 byte cap), so the test catches the agent and server caps drifting apart.Fixes #40. Part of #7.