Repository navigation
Conversation
Codex Review SummaryThis 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. |
celve
force-pushed
the
LIN-2522/session-images-token-space
branch
from
November 3, 2026 06:48
772e84a to
598527f
Compare
celve
force-pushed
the
LIN-2524/harbor-computer1-session-server
branch
3 times, most recently
from
November 3, 2026 08:28
5f7e7ca to
4af2ea3
Compare
celve
changed the base branch from
LIN-2522/session-images-token-space
to
LIN-2522/session-images-on-4586
November 3, 2026 08:31
celve
force-pushed
the
LIN-2524/harbor-computer1-session-server
branch
3 times, most recently
from
November 4, 2026 12:15
0dd7bf9 to
a648b78
Compare
computer-1 fell to the default binding, which pointed it at OpenAI through env vars it never reads, let it send its own temperature of 0.7 that the session server refuses, and passed a max_seq_len its constructor rejects. Its binding now puts the session URL and Miles's sampling arguments on its LiteLLM (temperature on the constructor, the rest in llm_kwargs so the compactor's and the fallback's calls carry them too) and turns images on. HARBOR_AGENT_IMPORT_PATH replaces the registered agent class, and HARBOR_AGENT_KWARGS adds settings the binding does not own (a coordinate space, the desktop size); HARBOR_VERIFIER_IMPORT_PATH and HARBOR_VERIFIER_KWARGS run a Harbor verifier class in place of a task's tests. agentic_train_args gains session_images, which selects --use-session-server v2 --multimodal-token-space-processing.
celve
force-pushed
the
LIN-2524/harbor-computer1-session-server
branch
from
November 4, 2026 12:15
a648b78 to
546b864
Compare
… behind an env var Harbor rescales actions marked CoordinateSpace.NORMALIZED_0_999, but its generic JSON provider always prompts for pixels and marks them native. HARBOR_CUA_COORDINATE_SPACE=normalized_0_999 patches that provider's from_agent and parse, on a trial's first run, to prompt for a 1000x1000 screen and mark its actions on the grid. It is a stopgap until the provider takes a coordinate_space option.
celve
force-pushed
the
LIN-2524/harbor-computer1-session-server
branch
from
November 5, 2026 00:18
fb5bec6 to
6f19707
Compare
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.
Layer P17 of the CUA upstreaming stack: the Harbor computer-1 binding plus generic agent and verifier hooks, with no model classes. The runnable CUA example (tasks and a launcher) is deferred. It is built and reviewed in celve, and goes upstream with the whole stack once every layer is finished. Base:
LIN-2522/session-images-on-4586(#46,c1265b51a6, approved), which stacks on P15 (#33) and dzorlu's radixark/miles radixark#4586, which itself stacks on Kangrui Du's (Rockdu) radixark#4272. It depends on #46; #38 was dropped. Issue: LIN-2524, hub LIN-2504.Problem. Harbor's
computer-1screenshot agent could not train throughharbor_agent_function.run. It had no binding, so it got the default one. That one setsOPENAI_API_BASE/OPENAI_API_KEYenv vars, which computer-1 never reads, so it went to OpenAI. It sent its own temperature (0.7), which the session server refuses for training, and none of Miles's other sampling arguments. It passed amax_seq_lenthat computer-1's constructor rejects. And there was no way to build an agent class other than Harbor's registered one, or to pass it settings the binding does not know about.Fix.
examples/experimental/harbor/harbor_agent_function.pygains acomputer-1binding (_computer_1_kwargs). It points LiteLLM at the session URL. Miles's temperature goes on the constructor. The other request arguments, plus the key, go inllm_kwargs, which LiteLLM sends on every call, so the compactor's and the final-answer fallback's calls carry them too. It turns images on explicitly (provider=litellm,enable_images=True) and leaves outmax_seq_len(HarnessBinding.accepts_max_seq_len=False).HARBOR_AGENT_MAX_ITERATIONSsets the turn cap.build_trial_config:HARBOR_AGENT_IMPORT_PATHnames the agent class Harbor builds, and the config then setsname=None, because Harbor builds the registered class whenever the name is a registered one.HARBOR_AGENT_KWARGSadds JSON kwargs and refuses any key the binding sets.HARBOR_VERIFIER_IMPORT_PATH/HARBOR_VERIFIER_KWARGSrun a Harbor verifier class in place of a task'stests/. No model is named anywhere: a model's needs, such as its coordinate convention or the desktop size, go through these hooks as configuration.launch_common.agentic_train_args(session_images=True)emits--use-session-server v2 --multimodal-token-space-processing, the flag that carries media through the session server in feat(session): screenshots through the TITO session server on token space (stacked on #4272) radixark/miles#4586. v2 is selected because Check token-space image turns elementwise, compare media in the retry picker, keep session media under the run #46's image-aware retry picker is a v2 picker.harbor_env_varsforwards the four new env vars. The README says how a Qwen3-VL computer-1 run is wired.Stopgap for Qwen3-VL's 0–999 clicks (second commit, Linyu: "I prefer the monkey patch first"). Harbor's generic JSON computer provider always prompts for desktop pixels and marks its actions
NATIVE_PRESCALED. Harbor already rescales actions markedCoordinateSpace.NORMALIZED_0_999(normalize_completion_action, which its Gemini provider relies on), but the generic provider has no option to choose that space. WithHARBOR_CUA_COORDINATE_SPACE=normalized_0_999,harbor_agent_function.apply_coordinate_space()patchesGenericJsonProvider.from_agentto prompt for a 1000×1000 screen andGenericJsonProvider.parseto mark each action on the grid. Harbor's own runtime then rescales the clicks to the desktop. The patch is applied once per process, on the firstrun(), because Harbor is imported lazily there. Unset, nothing is patched; any other value stops the run. It names no model and has no per-model branch.launch_commonforwards the variable. This patch is a stopgap. A Harbor PR adding acoordinate_spaceoption to the generic provider, on harbor-framework'sharbor-miles-v0.20.0, would replace it; that PR is proposed and not started. The patch touches only public Harbor names (GenericJsonProvider.from_agent/parse,ModelStep.action.source,CoordinateSpace), but it is process-wide: every generic-provider agent in that process gets the grid.Rework (Linyu: "rework 17").
546b864717dropsHARBOR_CUA_DESKTOP_WIDTH/HEIGHT(the desktop size now goes inHARBOR_AGENT_KWARGS), names no model class in the code, tests or README, and makes the pass-through test covercoordinate_space. After it, the binding commit is +351/−6 over #46. With the stopgap, the layer is +441/−6, of which source is +114/−6. The stopgap commit alone is +93/−3 (source +43/−3).Tests (EC2 CPU box, Miles venv; the contract tests use
harbor-miles-v0.20.0installed into a private target dir):pytest tests/fast/examples/experimental/harbor: 59 passed, 1 skipped (the contract module, with no Harbor in the venv). Withexamples/experimental/harborreverted to the base, 21 of the new tests fail, includingtest_run_hands_computer_1_the_session_and_miles_sampling, which drivesrun().pytest tests/fast/examples/experimental/harbor/test_harbor_contract.py, with real Harbor: 24 passed. Two new tests drive Harbor's ownAgentFactoryandComputer1. One builds the class from the import path withmax_seq_lenin the metadata. The other runs the agent loop, both compactor summaries and the text fallback against a local chat server, and checks that every request goes to the session path with the dummy key and Miles's sampling arguments. It also checks that the screenshot request carries exactly one image that the session server'scollect_media_refs(feat(session): screenshots through the TITO session server on token space (stacked on #4272) radixark/miles#4586) accepts. With the fix reverted, both fail.pre-commit runon the changed files: passed.e1d0f02e5a, with no conflicts; the head is4af2ea3da1. The rebase changed the session flags as above, and the contract test now checks the screenshot withcollect_media_refs, because Carry images through the v2 session server on SGLang's token-space path #38'sintern_imagesis gone. On it:pytest tests/fast/examples/experimental/harbor59 passed, 1 skipped; the real-Harbor contract module 24 passed;pre-commitpassed.b9fdaed38c, which added Check token-space image turns elementwise, compare media in the retry picker, keep session media under the run #46's four simplification commits; no conflicts, and P17's own diff is unchanged. The head isf5792150a1. On it,pytest tests/fast/examples/experimental/harbor(including the real-Harbor contract module) gives 83 passed.c1265b51a6, which adds the startup refusal without--use-miles-router. The head was0dd7bf90dd, with no conflicts.546b864717(fresh EC2 CPU box):pytest tests/fast/examples/experimental/harbor, including the real-Harbor contract module, gives 83 passed. Withexamples/experimental/harborreverted to Check token-space image turns elementwise, compare media in the retry picker, keep session media under the run #46's head, 5 pass-through tests fail, all among the 21 above:test_agent_kwargs_join_the_bindings_own(it setscoordinate_space,desktop_widthanddesktop_heightinHARBOR_AGENT_KWARGSand checks they reachAgentConfig.kwargs), the threetest_agent_kwargs_cannot_replace_what_the_binding_setscases, andtest_agent_and_verifier_classes_are_forwarded_with_their_kwargs.pre-commitpasses.6f19707331(fresh EC2 CPU box, real Harborharbor-miles-v0.20.0):pytest tests/fast/examples/experimental/harborgives 86 passed. Three new contract tests run on a 1920×1080 computer-1 built through Harbor'sAgentFactory, and parse a click through Harbor's real provider andnormalize_completion_action. With the variable set, the prompt says 1000×1000 and (999, 500) lands on pixel (1919, 540). Unset, the prompt says 1920×1080 and (999, 500) stays (999, 500). An unknown value raises. Withharbor_agent_function.pyreverted to the binding commit, all three fail.pre-commitpasses.Measured. This is the binding LIN-2399's Harbor learning run used: held-out reward went from 0.160 to 0.273 by round 24. It was verified live on Megatron in LIN-2151.
Limits.
SandboxLostdiscard. The integration branch also discards a computer-1 trial whose own in-sandbox command fails after the agent has started (RuntimeRequestError) asInfraAbort("SandboxLost"). That depends on P9'sInfraAbortcontract (Discard agentic episodes that infrastructure failures broke #34, based onmain), which is not in this base. It is added once P9 and this layer sit in one stack.NATIVE_PRESCALED. Harbor already rescalesCoordinateSpace.NORMALIZED_0_999actions (its Gemini provider uses it), but the generic provider has no option to choose it. A ~15-line Harbor PR adding acoordinate_spacekwarg is proposed, which recipes would then set withHARBOR_AGENT_KWARGS={"coordinate_space": "normalized_0_999"}. Until that exists, a Qwen3-VL run setsHARBOR_CUA_COORDINATE_SPACE=normalized_0_999; our fork'sQwen3VLComputer1subclass is no longer needed for it. Running on an image's own desktop works the same way, with the fork'sDesktopQwen3VLComputer1. The CUA example tasks and launcher are deferred.session_images=Trueemits only the session-server flags. The launcher still passes--sglang-enable-token-space-processor(P15 refuses token space without it),--shared-media-dir, and--use-miles-router. That last flag is needed because the default sgl-router dropsmm_token_expansion_start_lenuntil feat(protocol): forward mm_token_expansion_start_len on chat radixark/sgl-router-for-miles#28 lands; Check token-space image turns elementwise, compare media in the retry picker, keep session media under the run #46 refuses a run without it at startup.Related upstream work. radixark/miles radixark#2806 (Tao Lin, nblintao, merged) is the in-process Harbor agent function that this layer extends with a binding for one more harness. No open upstream PR binds computer-1.
Origin commits: #8 (
a007d0c78d) and #9 (09564ac8e2) onLIN-1985/investigate-existing-recipes-for,examples/experimental/harbor/*andtests/fast/examples/experimental/harbor/*only.