Skip to content

Commit a359650

Browse files
committed
Merge branch 'codex/bucket2-fixes-260723' into dev
Five overnight-issue fixes (#287, #289, #292, #295, #300) with regression coverage, plus triage/roadmap/readiness devlogs. Conflict: adjacent import additions in src/server/responses.ts — kept both.
2 parents e3541d5 + 68e98d0 commit a359650

55 files changed

Lines changed: 8048 additions & 155 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ next Codex session. opencodex keeps these behaviors:
234234
- **Log in once, skip the API key.** OAuth support for xAI, Anthropic, and Kimi means you can authenticate with your existing account. Tokens auto-refresh. Or forward your `codex login`, paste an API key, or use `${ENV_VAR}` references — your call.
235235
- **Works everywhere Codex does.** Injects into Codex CLI, TUI, App, and SDK automatically. Routed models show up in Codex's model picker just like native ones.
236236
- **History-safe injection.** On local installs the proxy points Codex's own built-in `openai` provider at itself via a single `openai_base_url` line — new threads keep their native provider tag, so ongoing chat history is never remapped and an unclean shutdown can't hide it. (Threads re-tagged by older versions are migrated back once on the first start; remote/LAN binds use a dedicated provider entry instead, since they need an API-key header.)
237-
- **Delegate to the right model.** Feature up to five routed or native models in Codex's subagent picker from the dashboard or config — route complex tasks to a reasoning model, fast tasks to a cheap one. On the v2 multi-agent surface (GPT-5.6 Sol/Terra) the proxy injects compact delegation guidance: a preferred sub-agent model and effort (`injectionModel` / `injectionEffort`), the featured-model roster with the effort ladder each supports, and the `fork_turns` rules that let cross-model `spawn_agent` calls apply their overrides. Known limitation: when a native parent spawns a routed child, the task body can currently arrive backend-encrypted and be lost ([#92](https://github.com/lidge-jun/opencodex/issues/92)) — use the v1 surface for reliable cross-provider delegation. Want your own wording? Set `injectionPrompt` with `{{model}}` / `{{effort}}` / `{{roster}}` placeholders.
237+
- **Delegate to the right model.** Feature up to five routed or native models in Codex's subagent picker from the dashboard or config — route complex tasks to a reasoning model, fast tasks to a cheap one. On the v2 multi-agent surface (GPT-5.6 Sol/Terra) the proxy injects compact, schema-agnostic delegation guidance: an eligible preferred sub-agent model and effort (`injectionModel` / `injectionEffort`), the configured intersection of Codex's picker-visible, v2-compatible, priority-sorted first five with available effort ladders, and the `fork_turns` rules that let cross-model `spawn_agent` calls apply their overrides. Known limitation: when a native parent spawns a routed child, the task body can currently arrive backend-encrypted and be lost ([#92](https://github.com/lidge-jun/opencodex/issues/92)) — use the v1 surface for reliable cross-provider delegation. Want your own wording? Set `injectionPrompt` with `{{model}}` / `{{effort}}` / `{{roster}}` placeholders.
238238
- **Prepare for preview-gated OpenAI rollouts.** GPT-5.6 Sol/Terra/Luna entries preserve the upstream effort ladders. Direct/Multi use the 372k Codex contract; OpenAI API and OpenRouter use 1.05M metadata when upstream access is available.
239239
- **Give any model superpowers.** Non-OpenAI models get real web search and image understanding via a `gpt-5.4-mini` sidecar over your ChatGPT login.
240240
- **Generate images natively.** Codex's standalone `image_gen` tool uses `POST /v1/images/generations` for generation and `POST /v1/images/edits` for edits; it is separate from the hosted Responses `image_generation` tool.
Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
# 260723 Issue Triage — Overnight Issue Sweep (2026-07-22 12:41Z ~ 20:39Z)
2+
3+
## Objective
4+
5+
Classify the 10 issues opened overnight (#287-#300, plus the overnight-resolved
6+
#280) into three buckets, investigate the "act now" bucket with parallel Sol
7+
workers, and document everything in this unit. No production code changes in
8+
this work-phase — investigation and documentation only.
9+
10+
## Loop spec
11+
12+
- Loop archetype: spec-satisfaction (one docs/investigation work-phase, one PABCD cycle)
13+
- Trigger: user request 2026-07-23 — overnight issue triage, 3 buckets, parallel Sol dispatch
14+
- Goal: every overnight issue has an evidence-backed bucket + investigation doc where required
15+
- Non-goals: fixing code, replying to/closing issues on GitHub (external mutation — needs explicit user approval), PR creation, push
16+
- Verifier: every bucket-2 issue has a numbered investigation doc with `path:line` anchors verified against `origin/dev`; main session spot-checks each claim in C
17+
- Stop condition: all 11 issues classified, all 6 investigation docs written and verified
18+
- Memory artifact: this unit folder (`devlog/_plan/260723_issue_triage/`)
19+
- Expected terminal outcomes: DONE / BLOCKED (worker failure) / NEEDS_HUMAN (classification conflict)
20+
- Escalation: upward — main reclaims a lane after a worker fails its packet (DISPATCH-RETIRE-01)
21+
22+
## Issue inventory (11 issues)
23+
24+
| # | Title (short) | Reporter | Bucket (proposed) |
25+
|---|---|---|---|
26+
| 280 | Codex 통신 불가 (설정 오류) | rushidea | 1 — answer + close |
27+
| 287 | Linux Claude auto-connect 미적용 | jhste102lab | 2 — investigate (lane 5) |
28+
| 288 | spawn_agent 커스텀 모델 거부 | Kling0012 | 2 — investigate (lane 6) |
29+
| 289 | Ark Agent Plan `/v1` 중복 | lijianmac | 2 — investigate (lane 4) |
30+
| 290 | V2 custom parent empty spawn args | brunoflma | 2 — investigate (lane 6) |
31+
| 291 | Providers 페이지 edit 버튼 | str0203 | 1 — answer + close |
32+
| 292 | allowPrivateNetwork discovery 무시 | str0203 | 2 — investigate (lane 3) |
33+
| 294 | Claude account pool | str0203 | 3 — long-term |
34+
| 295 | guidance가 거부 모델 광고 | mihneaptu | 2 — investigate (lane 2) |
35+
| 297 | catalog clamp이 max/ultra 제거 | Wibias | 2 — investigate (lane 1) |
36+
| 300 | guidance kill switch 요청 | ildunari | 2 — investigate (lane 2, with #295) |
37+
38+
## Bucket rationale (grounded anchors)
39+
40+
### Bucket 1 — answer + close
41+
42+
- **#280**: reporter confirmed resolution after owner walkthrough;
43+
root cause was missing enabled `openai` provider, not a proxy regression.
44+
Action: post final confirmation answer + close. (Draft reply in 008 doc; NOT posted in this phase.)
45+
- **#288**: DEMOTED from bucket-1 candidate after A-phase audit. OpenCodex's
46+
injected catalog DOES influence the spawn_agent allowlist: Codex advertises
47+
the first 5 featured (lowest-priority) picker-visible catalog entries to
48+
spawn_agent (src/config.ts:556, src/codex/catalog.ts:1091,
49+
MAX_MODEL_OVERRIDES_IN_SPAWN_AGENT=5). Whether the reporter's custom models
50+
were excluded by OpenCodex featuring or by app-side filtering is unresolved →
51+
lane 6 must determine the enforcement boundary before any close.
52+
- **#291**: RECLASSIFIED bucket 3 → bucket 1 after A-phase audit. The edit
53+
capability already exists: `ProviderSettings` form edits
54+
adapter/baseUrl/defaultModel/authMode/note/allowPrivateNetwork
55+
(gui/src/components/provider-workspace/ProviderSettings.tsx:115), saved via
56+
`onUpdateProvider``PATCH /api/providers`
57+
(src/server/management-api.ts:631+). Action: answer pointing at the provider
58+
workspace Settings tab, ask reporter to confirm, close.
59+
60+
### Bucket 2 — investigate now
61+
62+
- **#297**: `clampCatalogModelsToCodexSupport` (src/codex/catalog.ts:954) runs as
63+
the last sync step (catalog.ts:2205) after `ensureGpt56ReasoningLevels` /
64+
`ensureUltraReasoningLevel` (catalog.ts:866/885). Regression from b7ce5aad.
65+
Highest-confidence opencodex-side bug; contributor-reported with root cause.
66+
- **#295 / #300**: `multiAgentGuidanceText` (src/server/responses.ts:201) claims
67+
schema-visible args are "hidden"; `subagentRosterText` (responses.ts:254)
68+
advertises catalog-resolved models the runtime allowlist may reject. #300 asks
69+
for a supported off switch in the same function. Same code area → one lane.
70+
- **#292**: `allowPrivateNetwork` is honored in the data plane (router/destination
71+
policy) but reporter shows discovery throws. Guard lives in
72+
src/lib/destination-policy.ts; discovery path needs tracing.
73+
- **#289**: key-auth branch builds `${base}/v1/responses`
74+
(src/adapters/openai-responses.ts:443-444), breaking versioned bases like
75+
`/api/plan/v3`.
76+
- **#287**: system-env injection is darwin-only by construction
77+
(src/server/system-env.ts:210 and 3 sibling guards). Question: implement Linux
78+
support vs GUI honesty (hide/disable the toggle on Linux).
79+
- **#290**: empty `spawn_agent` args from a custom-model parent — determine
80+
opencodex-side translation vs upstream (#92 family) vs model capability.
81+
82+
### Bucket 3 — long-term
83+
84+
- **#294**: Claude AUTOMATIC pool routing — corrected framing after A-phase
85+
audit: multi-account Claude support already exists (ProviderAuthPanel.tsx:149/192
86+
account list + add; management-api.ts:1567 active-account selection), but
87+
Anthropic requests use only the active account (src/oauth/index.ts:215). The
88+
real gap is quota-aware automatic routing, affinity, cooldown, failover.
89+
Architecture-scale → roadmap.
90+
91+
## Lane map (B phase — 6 Sol workers, parallel, model=gpt-5.6-sol, tier=priority, effort=high)
92+
93+
| Lane | Issues | Write scope (exactly one file) | Read scope |
94+
|---|---|---|---|
95+
| 1 | #297 | `002_investigation_297_catalog_clamp.md` | src/codex/catalog.ts, src/reasoning-effort.ts, b7ce5aad diff, tests |
96+
| 2 | #295 #300 | `003_investigation_295_300_guidance.md` | src/server/responses.ts, src/config.ts, management-api guidance surface |
97+
| 3 | #292 | `004_investigation_292_private_network.md` | src/lib/destination-policy.ts, discovery callers, src/router.ts, src/providers/registry.ts |
98+
| 4 | #289 | `005_investigation_289_responses_url.md` | src/adapters/openai-responses.ts, provider config types, tests |
99+
| 5 | #287 | `006_investigation_287_linux_autoconnect.md` | src/server/system-env.ts, GUI claude page, CLI claude launcher |
100+
| 6 | #290 #288 | `007_investigation_290_288_spawn_agent.md` | src/server/responses.ts spawn surface, src/config.ts, src/codex/catalog.ts (featuring/priority → spawn_agent allowlist), #92 devlog history, tests/multi-agent-compat.test.ts |
101+
102+
Each worker: read-only on `src/`, verifies the reporter's claims against
103+
`origin/dev` code, classifies opencodex-side vs upstream, and writes one
104+
investigation doc with VERBATIM `path:line` anchors + a recommended fix
105+
direction + effort estimate. Bucket reclassification proposals are returned as
106+
judgments; the main session decides.
107+
108+
Additionally the main session writes:
109+
110+
- `001_issue_inventory.md` — full per-issue summaries + evidence (000_plan.md holds the classification table)
111+
- `008_bucket1_draft_replies.md` — draft GitHub replies/close rationale for bucket 1 (NOT posted)
112+
113+
## Scope boundary
114+
115+
- IN: `devlog/_plan/260723_issue_triage/**` only.
116+
- OUT: any `src/`, `tests/`, `gui/` change; GitHub comments/closes/labels; push; PR.
117+
118+
## Accept criteria
119+
120+
1. All 11 issues carry a bucket with a stated reason; bucket-1 candidates verified or demoted.
121+
2. Docs 002-007 exist, each with >= 3 verbatim `path:line` anchors that the main session re-verified against the tree.
122+
3. Each investigation doc ends with: verdict (opencodex-bug / upstream / feature / needs-repro), recommended direction, effort estimate.
123+
4. No production code touched (`git diff --stat` shows only devlog).
124+
5. Unit committed on `codex/issue-triage-260723`; no push.
125+
126+
---
127+
128+
## Amendment 2026-07-23 (cycle 2) — fix roadmap for bucket 2
129+
130+
Bucket-1 actions executed: replies + closes posted for #280, #288, #291, #297
131+
(URLs recorded in 009 addendum). This cycle is the docs-first roadmap pass for
132+
the four remaining fixable work items (#290 stays needs-repro, no fix planned).
133+
134+
### Work-phase map (each = one future PABCD cycle, its own branch + PR)
135+
136+
| WP | Issue(s) | Decade doc | Scope summary | Branch (planned) |
137+
|---|---|---|---|---|
138+
| 2 | #289 | `010_fix_289_responses_path.md` | optional relative `responsesPath` on provider config; absent = current behavior | `codex/fix-289-responses-path` |
139+
| 3 | #292 | `020_fix_292_discovery_guard.md` | destination-policy parity on model discovery + content-type-aware diagnostics | `codex/fix-292-discovery-guard` |
140+
| 4 | #287 | `030_fix_287_linux_autoconnect.md` | disable Auto-connect toggle on non-Darwin with localized explanation + server capability field | `codex/fix-287-linux-autoconnect` |
141+
| 5 | #295 | `040_fix_295_300_guidance.md` | neutral guidance wording + runtime-consistent roster + exclusion diagnostics (bug fix only; split per A-audit) | `codex/fix-295-guidance-accuracy` |
142+
| 6 | #300 | `041_fix_300_guidance_kill_switch.md` | `multiAgentGuidanceEnabled` kill switch + absent-key preservation in PUT /api/injection-model (dependency: none on WP5, but same handler area) | `codex/fix-300-guidance-kill-switch` |
143+
144+
Dependency order: all four are independent; sequence follows the routing
145+
pipeline (adapter URL contract → discovery path → GUI/server platform surface →
146+
guidance/config/API surface), not effort. #297 Option B (version-gated clamp)
147+
is NOT scheduled — it is gated on reporter evidence of a parser/catalog
148+
mismatch binary.
149+
150+
### This cycle's loop spec (docs-only)
151+
152+
- Loop archetype: spec-satisfaction; deliverable is the four decade docs at
153+
diff-level precision (paths, NEW/MODIFY, before/after, tests, activation
154+
scenarios) + 009 addendum with the posted-reply record.
155+
- Verifier: each decade doc re-verified against the current tree (anchors
156+
re-read, no stale references); A-gate reviewer audits diff-level
157+
completeness; no production code touched.
158+
- Non-goals: implementing any fix, opening PRs, push.
159+
- Terminal outcomes: DONE (4 docs pass audit) / BLOCKED.
160+
161+
### B-phase dispatch (4 Sol workers, parallel, gpt-5.6-sol/priority/high)
162+
163+
Each worker reads its investigation doc (002/004/005/006/003) and writes ONE
164+
decade doc to diff-level precision. Write scopes disjoint (one file each).
165+
Main session integrates, writes the 009 addendum, commits.
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# 001 — Issue Inventory (overnight 2026-07-22/23)
2+
3+
Source: `gh issue list --state open` + `gh issue view` on 2026-07-23 KST,
4+
repo `lidge-jun/opencodex`. Overnight window: issues created 2026-07-22
5+
12:41Z–20:39Z (= 21:41 KST – 05:39 KST+1), plus #280 which received its
6+
resolving comment overnight (11:20Z).
7+
8+
## #280 —出现了codex无法通信的问题 (bug, question, needs-info) — rushidea
9+
10+
User had `cursor` as the only enabled provider; selecting bare `gpt-5.6-sol`
11+
failed closed with "No enabled OpenAI provider". Owner walked through
12+
`ocx provider add openai --sync` (preserving the Cursor config). Reporter
13+
confirmed 2026-07-22 11:20Z: new + existing threads work; asked whether it was
14+
their own misconfiguration. → Bucket 1: final answer + close.
15+
16+
## #287[Bug][Linux] Claude Code 자동 연결 미적용 — jhste102lab
17+
18+
GUI `/#claude` auto-connect saves `systemEnv: true` but no env injection
19+
happens on Linux: no `ANTHROPIC_BASE_URL` in new shells, no
20+
`~/.opencodex/claude-env.sh`. Reporter located the darwin-only guard in
21+
`src/server/system-env.ts`. Open question: Linux support vs GUI honesty.
22+
→ Bucket 2, lane 5.
23+
24+
## #288 — spawn_agent 拒绝自定义模型 (Ark/glm-5.2) — Kling0012
25+
26+
Codex Desktop on Windows; main session routes via OpenCodex to Volcengine ARK,
27+
but `spawn_agent(model="Ark/glm-5.2")` fails instantly with
28+
`Unknown model ... Available models: gpt-5.6-terra, gpt-5.6-sol` — before any
29+
request reaches the proxy. Omitting `model` works (inherits parent).
30+
→ Bucket 2, lane 6 (A-audit demoted it from bucket-1 candidate: OpenCodex's
31+
catalog featuring influences the spawn_agent allowlist — boundary unresolved).
32+
33+
## #289 — Volcengine Ark Agent Plan Responses URL에 /v1 중복 — lijianmac
34+
35+
`openai-responses` adapter key-auth branch turns baseUrl
36+
`https://ark.cn-beijing.volces.com/api/plan/v3` into
37+
`.../api/plan/v3/v1/responses` → 404. `openai-chat` works on the same base.
38+
Reporter proposes configurable responses path. → Bucket 2, lane 4.
39+
40+
## #290 — V2 custom-model parent emits empty spawn_agent arguments — brunoflma
41+
42+
Custom-model parent spawning custom-model child: tool router receives empty
43+
args (`message` missing), rejects every attempt, parent retries until timeout.
44+
v2.7.31. Needs opencodex-vs-upstream determination (#92 family?).
45+
→ Bucket 2, lane 6.
46+
47+
## #291[Feature] Providers 페이지 edit 버튼 — str0203
48+
49+
Edit existing provider config in the dashboard instead of delete+re-add.
50+
A-audit found the capability already exists (provider workspace Settings tab,
51+
PATCH /api/providers). → Bucket 1: answer + close after reporter confirmation.
52+
53+
## #292 — allowPrivateNetwork 무시 (model discovery) — str0203
54+
55+
`allowPrivateNetwork: true` lets data-plane requests through but model
56+
discovery (`GET /v1/models`) is still blocked for hosts resolving to reserved
57+
ranges (e.g. 198.18.0.0/15); dashboard shows "—" models, `ocx sync` logs
58+
SyntaxError. Manual curl succeeds. → Bucket 2, lane 3.
59+
60+
## #294[Feature] Claude account pool — str0203
61+
62+
Parity with ChatGPT pool. Corrected framing: multi-account Claude already
63+
exists (manual switching); the gap is AUTOMATIC quota-aware routing, affinity,
64+
cooldown/failover. Architecture-scale. → Bucket 3 (roadmap).
65+
66+
## #295 — Multi-agent guidance advertises rejected spawn models — mihneaptu
67+
68+
Default v2 guidance calls schema-visible args "hidden" and uses "never claim"
69+
wording; roster (`gpt-5.6-sol, gpt-5.5, gpt-5.6-terra, gpt-5.6-luna`) diverges
70+
from the runtime allowlist (`gpt-5.6-sol, gpt-5.6-terra`); models got
71+
misclassified as prompt injection. Workaround: `subagentModels` +
72+
`injectionPrompt` override. → Bucket 2, lane 2.
73+
74+
## #297 — catalog clamp strips max/ultra (regression b7ce5aad) — Wibias
75+
76+
`clampCatalogModelsToCodexSupport` derives the supported effort set from the
77+
binary's bundled native entries (which stop at xhigh), then strips max/ultra
78+
from EVERY catalog model as the last sync step, undoing
79+
ensureGpt56ReasoningLevels/ensureUltraReasoningLevel. Three fix options
80+
proposed by reporter. → Bucket 2, lane 1.
81+
82+
## #300 — Kill switch for multi-agent guidance injection — ildunari
83+
84+
Supported boolean (e.g. `multiAgentGuidanceEnabled: false`) that disables the
85+
injected developer message while keeping v2 surface + roster. Current
86+
containment: single-space `injectionPrompt` (undocumented). → Bucket 2,
87+
lane 2 (same code as #295).

0 commit comments

Comments
 (0)