Skip to content

feat(coderd/x/chatd): accept model_config_id and reasoning_effort for computer_use spawns - #95

Merged
ibetitsmike merged 6 commits into
mainfrom
mike/custom-agent-types-r12-1-computer-use
Nov 10, 2026
Merged

ibetitsmike merged 6 commits into
mainfrom
mike/custom-agent-types-r12-1-computer-use

Conversation

@ibetitsmike

@ibetitsmike ibetitsmike commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

Xum opened this PR on behalf of @ibetitsmike.

Part of #7

With fork-agent-definitions on, spawn_agent now accepts model_config_id and reasoning_effort for type: "computer_use" (brief item R12.1). Before this change, the spawn rejected both, and a computer use child always ran on the organization's computer use model.

Change

  • spawnAgent rejects the two arguments for computer_use only when the experiment is off (subagent.go, one condition).
  • forkLookupSubagentDefinition wraps the built-in computer_use type when the experiment is on. An explicit model_config_id must support computer use (chatprovider.ComputerUseProvider), or the spawn fails with the provider and the requirement. An OpenAI model must also not set use_responses_api: false, since computer use needs the Responses API. The child then runs on that config and drops the organization override's reasoning effort, which belongs to the override's model. An explicit reasoning_effort still applies last, as for the other types. Without the arguments nothing changes.
  • appendForkTools wraps spawn_agent with the experiment on, so its description and parameter descriptions no longer say the arguments are unsupported for computer_use.
  • docs/fork/pstack-adapter.md describes the behavior and updates the line citations that moved.

Upstream behavior with the experiment off is unchanged, and TestSpawnAgent_ComputerUseRejectsModelArgs still covers it.

Tests

  • TestForkComputerUseSpawnOverrides: an explicit model and effort, an explicit model alone (the override's high effort is dropped), an explicit effort alone (stays on the override model), a Google model that is rejected with no child created, and an OpenAI model with the Responses API disabled that is rejected the same way.
  • TestForkComputerUseSpawnOverridesToolText: the rewritten text with the experiment on, and the upstream text with it off.
  • Negative controls, all restored clean: restoring the upstream rejection, dropping the lookup wrap, skipping the model override, keeping the override effort, skipping the capability check, skipping the Responses API check, and removing each of the three text rewrites and the tool wrapper's experiment gate. Each one turns its subtest red.
  • Ran in Colima: go test ./coderd/x/chatd/ ok. golangci-lint reports nothing in the touched files.

Size

About 290 changed lines: about 135 implementation, about 145 tests, and 13 doc lines.

@ibetitsmike

Copy link
Copy Markdown
Owner Author

@codex review

Xum posted this 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-10T07:49:54.381516Z d8ff71d 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 posted this on behalf of @ibetitsmike.

UAT at 9d1a59d: PASS (Colima, real coder server + Postgres, mock OpenAI-compatible provider, non-admin member alice spawning from a parent chat on mock-a; org override for computer use = mock-a / high).

spawn_agent type=computer_use args fork-agent-definitions ON Control: experiment OFF
model_config_id=mock-b, reasoning_effort=low child on mock-b, effort low upstream "not supported for type computer_use" error
model_config_id=mock-b child on mock-b, effort unset same upstream error
reasoning_effort=low child on mock-a, effort low same upstream error
model_config_id=<gemini on google provider> tool error: provider cannot run computer_use; no child same upstream error
no args child on mock-a, effort high (override kept) child on mock-a, effort high

Tool text sent to the model: with the experiment on, spawn_agent says the overrides apply to every type and a computer_use model_config_id must support computer use, and the parameter descriptions drop "Not supported for type 'computer_use'" (10/10 requests). With it off, the upstream wording is unchanged (10/10 requests).

@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: 9d1a59df43

ℹ️ 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 coderd/x/chatd/subagent.go Resolved
@ibetitsmike

Copy link
Copy Markdown
Owner Author

@codex review

Xum posted this on behalf of @ibetitsmike.

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: bb376edcaa

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

@codex review

Xum posted this on behalf of @ibetitsmike.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 15b41cf865

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

@codex review

Xum posted this on behalf of @ibetitsmike.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 76c5d04b89

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

…es-r12-1-computer-use

# Conflicts:
#	coderd/x/chatd/fork_tools.go
#	docs/fork/pstack-adapter.md
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum posted this on behalf of @ibetitsmike.

Merged origin/main at 24fcb8445d into this branch as d8ff71d268. The merge resolves only two conflicting hunks and changes no behavior on either side:

Validation on d8ff71d268: go test ./coderd/x/chatd/ -count=1 passes (57s), including TestAppendForkTools, TestForkComputerUseSpawnOverrides*, TestDescendantQuestion* and the spawn tests. golangci-lint run ./coderd/x/chatd/ reports no findings in any file this merge touches. Because the merge changes no behavior, the earlier UAT verdict still holds.

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: d8ff71d268

ℹ️ 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 (AI agent) closed and reopened this on behalf of @ibetitsmike.

Closing and reopening only to make GitHub recompute the merge ref against current main (f924e36f98) and run fork-ci on it. The head is unchanged.

@ibetitsmike ibetitsmike reopened this Nov 10, 2026
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum (AI agent) closed and reopened this again on behalf of @ibetitsmike.

The merge ref now points at current main (f924e36f98), but the run started by the first reopen was queued against the old merge ref. This second reopen starts fork-ci on the recomputed merge. The head is unchanged.

@ibetitsmike ibetitsmike reopened this Nov 10, 2026
@ibetitsmike
ibetitsmike merged commit 2d635ea into main Nov 10, 2026
26 of 34 checks passed
@ibetitsmike
ibetitsmike deleted the mike/custom-agent-types-r12-1-computer-use branch November 10, 2026 09:18
@ibetitsmike

Copy link
Copy Markdown
Owner Author

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

Merge evidence for head d8ff71d268bd35e43d141a5c5edef4aedeebd2b5:

  • fork-ci pull_request run 42786355578 passed; its build job checked out Merge d8ff71d268 into f924e36f98 (current main). All checks green. Run 42777678675 had also passed on this head.
  • Codex on this exact head: no major issues (comment 6761994535). 0 unresolved review threads. The earlier P1 on computer_use availability was declined: it stays tied to the organization's computer-use setup.
  • d8ff71d268 merges main at 24fcb8445d and resolves two hunks without changing behavior (comment 6761940631): fork_tools.go keeps main's descendant question block and then the withComputerUseSpawnOverrides wrap, and docs/fork/pstack-adapter.md keeps both sides' citations. go test ./coderd/x/chatd/ passes on this head.
  • UAT PASS at 9d1a59d (comment 6757206078), accepted as covering this head: as member alice with fork-agent-definitions on, spawn_agent type=computer_use honored model_config_id and reasoning_effort together and separately, refused a provider that cannot run computer use without creating a child, and kept the org override with no args. With the experiment off, every override case returned the upstream "not supported for type computer_use" error. The tool text changes only with the experiment on (10/10 requests each way).

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