Skip to content

[Bug] Prompt probe does not report the selected model's published base prompt #4590

Closed

Description

@lidge-jun

Client or integration

OpenCodex dashboard

Area

Catalog / models

Summary

Issue 4458 reported two defects. The runtime half is fixed on dev by #4585 (merged as dfa0e2f985): the prompt probe resolves the installed Codex executable through the shared runtime resolver, including the Windows Codex App layout under %LOCALAPPDATA%\OpenAI\Codex\bin\<version>, and classifies its failures.

The second half was deliberately left out of that PR because it belongs to a different surface, and it is still missing. The probe does not report the selected model's published base prompt. prompt_debug.rs returns prompt.input and discards base_instructions, so the base prompt never appears in the probe output even when the selected model catalog carries a base_instructions entry.

What the probe should additionally return:

  • the selected root model and the file the base prompt was read from;
  • the complete published base prompt for that model, read from the catalog or from a configured model_instructions_file override;
  • a representation flag distinguishing text that is already expanded from a template that still contains expansion placeholders;
  • source-specific unavailability reasons, so "no model selected", "model not in catalog", "catalog unreadable", "not published", and "override missing or unreadable" are told apart rather than collapsing into one absent value.

Prior art: #4461 by @S0RYUASUKA implemented this alongside the runtime work and went through several review rounds on it — bounded reads, non-regular-file rejection, treating an empty or whitespace-only override as unavailable rather than as effective prompt text, and keeping malformed catalog rows unavailable instead of throwing. That branch is the reference for anyone picking this up.

Out of scope here, and named so it is not assumed: profile and root instructions precedence, and any GUI rendering of the template representation.

Reproduction

  1. Select a root model whose catalog entry carries base_instructions.
  2. Call the prompt-text probe through the Codex prompt management endpoint.
  3. The response returns the rendered layer sections but carries no base-prompt text, no source path, and no representation metadata.

Version

dev at dfa0e2f985e32df8263c87ad43d17ce0123a42be.

Operating system

Platform-independent; the runtime-discovery half that was Windows-specific is already fixed.

Provider and model

Not provider-specific.

Logs or error output

No error is produced. The base prompt is simply absent from the probe response.

Screenshots and supporting files

None. This is backend-only and proposes no GUI change.

Redacted configuration

No account tokens, user names, or machine-specific absolute paths are included.

Checks

  • I searched existing issues and documentation.
  • I removed secrets, tokens, account details, request credentials, and personal data.

Activity

  1. added
    bugSomething isn't working
    catalogModel catalog, slugs, visibility, routed entries
    on Sep 14, 2026
  2. lidge-jun commented on Sep 14, 2026

    @lidge-jun
    OwnerAuthor

    리뷰 · 우선순위 60 / 80

    이 이슈는 #4458의 두 번째 절반입니다. Round 2 outcome(devlog/_fin/260914_round23_delivery_roadmap/050_round2_outcome.md)에도 그대로 적혀 있습니다. 런타임 발견 쪽은 #4585(dfa0e2f985)가 이미 dev(지금 HEAD 79af226ec, 패키지 2.55.0)에 들어갔습니다. src/codex/runtime.ts가 Windows Codex App 경로(%LOCALAPPDATA%\\OpenAI\\Codex\\bin)까지 잡고, src/codex/prompt-text-probe.ts가 그 런타임으로 codex debug prompt-input을 돌립니다. 그런데 파일 맨 위 주석이 정직하게 말합니다. prompt_debug.rs가 prompt.input만 주고 base_instructions는 버려서, 프로브 응답에 베이스 프롬프트가 안 나옵니다. 레이어 섹션 텍스트는 보여 주는데, 카탈로그에 base_instructions가 있어도 그 본문·출처·표현 형태는 없습니다. 그게 이 버그입니다.

    고칠 자리는 런타임 해석이 아닙니다. #4585가 그 축을 이미 닫았습니다. 필요한 건 프로브가 PromptTextProbe에 베이스 프롬프트 필드를 더하는 일입니다. 이슈가 적는 대로 (1) 선택된 루트 모델과 읽은 파일, (2) 카탈로그 base_instructions 또는 설정 model_instructions_file 오버라이드에서 읽은 전체 본문, (3) 이미 펼쳐진 텍스트인지 템플릿 자리표시자가 남았는지 구분하는 representation 플래그, (4) no model selected / model not in catalog / catalog unreadable / not published / override missing or unreadable처럼 원인을 나누는 불가 사유입니다. 지금 LayerText.reason이 ok|empty-source|not-rendered|not-exposed|unavailable로 갈라지듯, 베이스 쪽도 한 칸의 null로 뭉개면 안 됩니다.

    카탈로그·설정 쪽 재료는 이미 dev에 있습니다. src/codex/catalog/parsing.ts / metadata.ts가 base_instructions를 읽고, 빈 상위 행에 model_messages.instructions_template로 채우기도 합니다. src/codex/prompt-layers.ts의 BaseSelection(default|variant|external)과 readBaseVariants / model_instructions_file 파서가 오버라이드 경로를 이미 알고 있습니다. 프로브가 Codex 프로세스 stdout만 믿으면 베이스는 영원히 안 나옵니다. 카탈로그·설정에서 직접 읽어 프로브 응답에 얹는 쪽이 맞습니다. GUI 렌더링·profile/root instructions 우선순위는 이슈가 out of scope로 명시했으니 넣지 마세요.

    경로/심볼 - src/codex/prompt-text-probe.ts 헤더 주석과 PromptTextProbe 타입에 base-prompt 필드가 없습니다. #4585 이후에도 이 공백은 의도적으로 남아 있습니다.

    경로/심볼 - src/codex/catalog/parsing.ts / metadata.ts의 base_instructions와 src/codex/prompt-layers.ts의 model_instructions_file / BaseSelection이 읽을 소스입니다. Codex prompt_debug.rs를 고치려 하지 마세요. 그 바이너리는 우리가 소유하지 않습니다.

    경로/심볼 - 닫힌 #4461(@S0RYUASUKA)이 참고 구현입니다. bounded read, non-regular-file 거절, 공백만 있는 오버라이드를 유효 본문으로 취급하지 않기, 깨진 카탈로그 행은 throw 대신 unavailable. 그 PR은 머지되지 않고 닫혔으니, 새 PR은 #4585가 깐 런타임 위에 베이스 절반만 다시 올리면 됩니다. types.ts/config.ts 스플릿에 통째로 무효화될 종류의 요청이 아닙니다.

    메인테이너의 판단이 필요한 지점

    너의 추천
    구현 PR 하나를 열고 범위는 prompt-text-probe.ts 응답 확장 + 카탈로그/model_instructions_file 읽기 + 단위/통합 테스트로 한정하세요. 런타임 해석·Windows PATH·probeVersion deferral은 건드리지 말 것. #4461의 안전 가드(bounded read / empty-override unavailable / malformed catalog unavailable)를 그대로 가져오세요. 우선순위는 Round2 잔여 중 중상(#4587 웹서치 리플레이와 비슷한 줄). Preview deploy는 계획에 없습니다.

    이 댓글은 grok-bot이 작성했습니다

  3. added a commit that references this issue on Sep 17, 2026
    aa09fac
  4. lidge-jun commented on Sep 18, 2026

    @lidge-jun
    OwnerAuthor

    Fixed on dev by #4964, squashed as aa09facfa4ce87311f4ce1e513918676384b97f0. The carry keeps a Co-authored-by trailer for the original author.

    The prompt probe now reports the selected model's published base prompt rather than a substitute.

    Shipping in the next release off dev.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcatalogModel catalog, slugs, visibility, routed entries

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions