Fix third-party harness model leak in AugmentArgsForTask (REMOTE-2161)#110
Merged
Merged
Conversation
Only emit --model for Oz runs. Third-party harnesses (claude, codex, gemini) resolve their model from the task snapshot's harness config, so forwarding the top-level Oz model_id as --model caused them to reject the run (e.g. REMOTE-2161: invalid model 'claude-4-8-opus-high'). - Add Harness.IsOz() helper (nil / empty / 'oz' type → true) - Guard --model emission with IsOz() check in AugmentArgsForTask - Add test case covering third-party harness model suppression Mirrors the equivalent fix in warpdotdev/warp-server#12751. Co-Authored-By: Oz <oz-agent@warp.dev>
liliwilson
approved these changes
Jul 16, 2026
liliwilson
marked this pull request as ready for review
July 16, 2026 05:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Mirrors the worker fix from warpdotdev/warp-server#12751 (REMOTE-2161) for the self-hosted
oz-agent-worker.Root cause
Named agents get their base model stamped onto the snapshot.
AugmentArgsForTaskthen forwarded that top-levelmodel_idas--modelto any harness, including Claude Code/Codex/Gemini. Those harnesses interpret--modelas their own CLI model and rejected the Oz model id (e.g.claude-4-8-opus-high).Changes
internal/types/messages.go— addsHarness.IsOz()helper (nil / empty /"oz"type → true)internal/common/task_utils.go— guards--modelemission: only emitted whenIsOz()is trueinternal/common/task_utils_test.go— adds test case:claudeharness with an Oz model_id does not produce--modelin argsValidation
All tests pass (
go test ./internal/...).Conversation: https://staging.warp.dev/conversation/834798b3-c270-4964-a103-e78f1681049a
Run: https://oz.staging.warp.dev/runs/019f688e-e9ee-7c86-a614-51054d86bce0
This PR was generated with Oz.