GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Preserve Codex resume history by default by 0disoft · Pull Request #13 · lidge-jun/opencodex

Conversation

@0disoft

@0disoft 0disoft commented Jun 22, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Summary

Make Codex resume-history remapping an explicit compatibility mode instead of an automatic side effect.

Why

Codex App appears to scope project/thread visibility by the active provider. That means existing OpenAI-backed project chats can disappear from the sidebar while model_provider = "opencodex", even though the local thread rows still exist.

Users reasonably expect existing chats to remain visible. The practical workaround is to remap old openai resume-history rows to opencodex while the proxy is active. That behavior is useful, but it mutates Codex's local thread index and should be an explicit compatibility choice rather than something that happens just because the proxy started.

This is related to #11. This PR does not claim to fix every App-side filtering path; it makes the history remap explicit, documented, and still reversible through restore.

Changes

  • Add syncResumeHistory as an explicit compatibility-mode config flag.
  • Leave existing Codex resume history untouched by default during injection.
  • Print a startup note explaining that existing OpenAI project chats may be hidden unless syncResumeHistory=true is enabled.
  • Keep restore behavior intact so previously remapped opencodex rows can still be mapped back to openai.
  • Document the tradeoff in the README.

Validation

  • bun install
  • bun x tsc --noEmit
  • git diff --check
  • Manual Windows Codex App check: with syncResumeHistory=true, existing zerodi-wd1 project chats became visible again while opencodex was active, and opencodex models appeared in the model picker.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@0disoft
preserve Codex resume history by default
6aa261f
@0disoft 0disoft mentioned this pull request Jun 22, 2026
Bug: 注入 opencodex 后 Codex App 左侧 Project 线程列表消失 #11
Closed
@0disoft
clarify resume history compatibility mode
7c7e7c4
@lidge-jun

lidge-jun commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Maintainer review update: I merged this PR locally on dev for reproduction testing, but I am treating it as only the safety half of #11.

What #13 does correctly:

  • stops default automatic mutation of Codex resume history;
  • keeps the provider remap behind explicit syncResumeHistory: true;
  • warns users that existing OpenAI project chats can be hidden while opencodex is active if they do not opt in.

What it does not solve by itself:

  • maintainer repro shows opencodex-created project rows are mostly model_provider = opencodex but source = exec;
  • Codex App appears to require more than provider match for sidebar visibility, likely a resumable/source filter too;
  • therefore provider remapping alone can restore old OpenAI cli/vscode rows, but not opencodex-created exec rows.

I am continuing the fix in devlog/220_codex-app-history-visibility/00_plan.md: investigate Codex App/codex-rs filtering, then implement only a reversible opencodex-side compatibility path.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lidge-jun

lidge-jun commented Jun 22, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Owner

Follow-up pushed to dev in 3244d28 (fix: eject opencodex history on native restore). Attribution: this builds on @0disoft's PR #13 (Preserve Codex resume history by default), which correctly moved history mutation behind explicit syncResumeHistory opt-in.

While testing PR #13 / issue #11 behavior locally, I found that the previous conservative restore behavior was still not enough: if ocx stop removes [model_providers.opencodex] from config.toml while any history row still has model_provider = "opencodex", Codex App cannot resume that thread and reports Model provider opencodex not found.

So the dev branch now treats native restore as a stronger invariant:

  • do not leave user-resumable history pointing at a provider id that no longer exists in config.toml;
  • restore backed-up OpenAI rows to OpenAI;
  • eject remaining opencodex user rows to OpenAI during ocx stop / ocx restore;
  • promote exec source to cli on native restore so opencodex-created project chats can be visible in the native App sidebar;
  • strip root model = "provider/model" routed model values when removing opencodex routing.

This preserves PR #13’s core safety intent (no start-time history mutation unless syncResumeHistory is enabled), but fixes the stop/eject side so native Codex is not left with orphaned opencodex provider references.

Verified locally: bun run typecheck passed; bun test tests passed with 142 pass / 0 fail. Also repaired the local dev machine state: 218 user history rows recovered to openai, zero remaining opencodex user rows after ocx stop.

0disoft reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lidge-jun lidge-jun mentioned this pull request Jun 22, 2026
Release v2.1.6 #20
Merged
@lidge-jun
lidge-jun merged commit 50c6152 into lidge-jun:main Jun 22, 2026
@lidge-jun

lidge-jun commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Released in v2.1.6 via #20. The resume-history compatibility path is now on main with the later safety fixes: manifest-backed restore, native restore cleanup, and explicit legacy recovery handling. npm latest is @bitkyc08/[email protected].

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@genglintong genglintong mentioned this pull request Jul 23, 2026
Wayfinder Map: Menubar Widget 优化与发布 genglintong/opencodex#9
Open
5 tasks
This was referenced Jul 29, 2026
security: close audit findings 1/2/4/7/9/11 and partially 3/16 #692
Closed
security: close audit findings 1/2/4/7/9/11 and partially 3/16 #697
Merged
Wibias added a commit that referenced this pull request Aug 13, 2026
@Wibias
tmp: rebase PR 1633 onto dev (#12) (#13) (#1633)
8b1c620
* fix(pr-quality): break CodeRabbit review feedback loop in gate comment

The readiness gate wrote a literal '@coderabbitai review' command into its status comment, and it rewrote an unchanged comment body on every wake.

- Remove the inline CodeRabbit command from the ready notice.

- Skip updateComment when the rebuilt body is unchanged.

- Add regression tests for both behaviors.

* test(pr-quality): cover unchanged CodeRabbit status wake

* test(pr-quality): keep status-wake regression focused

* test(pr-quality): cover legacy migration on no-op wake

* test(pr-quality): reproduce stale gate comment body

* fix(pr-quality): track gate comment body after writes

* test(pr-quality): restore trust-boundary context

* test(pr-quality): pin repeated failure comment target

* test: fix gate body helper
@coderabbitai coderabbitai Bot mentioned this pull request Sep 12, 2026
fix(codex): refresh the catalog when paginated history refuses injection #4411
Merged
3 tasks done
agentHits pushed a commit to agentHits/opencodex that referenced this pull request Sep 17, 2026
@lidge-jun
merge: test PR lidge-jun#13 resume history compatibility on dev
1401e66
agentHits pushed a commit to agentHits/opencodex that referenced this pull request Sep 17, 2026
@Wibias
tmp: rebase PR 1633 onto dev (lidge-jun#12) (lidge-jun#13) (lidge-jun…
c729542
…#1633)

* fix(pr-quality): break CodeRabbit review feedback loop in gate comment

The readiness gate wrote a literal '@coderabbitai review' command into its status comment, and it rewrote an unchanged comment body on every wake.

- Remove the inline CodeRabbit command from the ready notice.

- Skip updateComment when the rebuilt body is unchanged.

- Add regression tests for both behaviors.

* test(pr-quality): cover unchanged CodeRabbit status wake

* test(pr-quality): keep status-wake regression focused

* test(pr-quality): cover legacy migration on no-op wake

* test(pr-quality): reproduce stale gate comment body

* fix(pr-quality): track gate comment body after writes

* test(pr-quality): restore trust-boundary context

* test(pr-quality): pin repeated failure comment target

* test: fix gate body helper
@wtfsayo wtfsayo mentioned this pull request Sep 27, 2026
feat(quota): report Devin account quota from GetUserStatus #6090
Closed
6 of 7 tasks
lidge-jun added a commit that referenced this pull request Sep 28, 2026
@lidge-jun @wtfsayo @claude
feat(quota): report Devin account quota from GetUserStatus (carry #6090…
97e4cdb
…) (#6173)

* feat(quota): report Devin account quota from GetUserStatus

Devin accounts had no quota row, so headroom-based account ranking had
nothing to order them by. Probe Cognition's unary
SeatManagementService/GetUserStatus with the default cloud-direct
Metadata, against the credential's allowlisted api-server host with
redirects refused and no response body echoed.

Only dated daily/weekly windows the plan does not hide are published:
credit-billed plans leave those percents at a zero default that would
read as exhausted. Prompt plus flex credits form one monthly pool
measured against the server balance; a negative balance is unlimited.
4xx other than 408/429 is terminal; a decoded status with nothing
measurable is authoritative-empty.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
(cherry picked from commit b493e0d)

* fix(quota): tighten Devin quota mapping and failure handling

- Publish the credit pool only for credit-billed plans (or an unknown
  strategy with no dated window); a quota-billed plan with a zero credit
  balance no longer reads monthly-exhausted.
- Drop dated windows whose reset is not after now.
- Read the body through the bounded byte reader and decode inside the
  try, so a truncated or oversized body keeps last-good instead of
  throwing.
- Treat 409 and 499 as retryable alongside 408 and 429.
- Cover flow credits (#5/#9/#13), hide_weekly (#37), and 403/404/429.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
(cherry picked from commit 7d12eb1)

* fix(quota): reject truncated Devin quota protobufs and document the probe

- Require the decoded fields to account for every byte. iterFields stops
  quietly at a truncated length-delimited field, so half a response decoded
  to an empty status and was published as authoritative-empty, deleting the
  last-good row.
- Use the Web Crypto randomUUID instead of node:crypto.
- List Devin in the per-account quota section of the CLI accounts reference.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
(cherry picked from commit a71f149)

* fix(quota): stop flow credits gating Devin accounts; key the cache by tenant host

- Flow credits are decoded but no longer published. They meter agent tool
  actions, not chat turns, and ranking reads the fullest custom window as
  the account's limit, so an empty flow balance retired accounts that could
  still serve.
- A credit-billed plan with nothing used and nothing left reads 100%
  instead of unmeasured, so ranking no longer prefers it as untested.
- The account quota identity includes the credential's own api base URL
  when it has one, so a tenant host change invalidates the cached reading.
  Credentials without one keep their existing key.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
(cherry picked from commit 9e23686)

* fix(quota): reject a Devin status with no plan or a malformed plan-end timestamp

- A present plan-end timestamp that fails to decode now fails the whole
  status instead of reading as absent, so a malformed response keeps the
  last-good row rather than publishing an authoritative-empty one.
- A status with neither the top-level PlanInfo nor the nested PlanStatus
  plan is rejected instead of decoded into a zero-valued plan, which could
  read as a credit-billed account with every credit spent.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
(cherry picked from commit 52d9b62)

* fix(devin): reject malformed quota statuses and preserve last-good

Validate known protobuf wire types and 64-bit varint bounds before quota mapping. Require observed prompt balances for a monthly window, treat only credential rejection as terminal, and scope tenant host cache identity to Devin. Update the provider contract and regression coverage.

Co-authored-by: Sayo <[email protected]>

* fix(quota): count a lone Devin balance field as credit evidence

GetUserStatus is proto3, which omits zero-valued fields, so an exhausted pool
arrives with used_prompt and no available_prompt. Requiring both fields hid
that account's 100% monthly window and ranked it as untested headroom. Any of
the four pooled balance fields (#4, #6, #7, #8) is now evidence; only a status
with none of them publishes no credit window.

Co-authored-by: Sayo <[email protected]>

* fix(quota): keep last-good Devin quota on a GetUserStatus 403

A 403 from GetUserStatus can forbid that one RPC for a key that still serves
chat, so treating it as a rejected credential cleared a usable account's
quota. Only 401 is terminal now. The structure and CLI reference describe the
balance-evidence rule as shipped: any one of the pooled balance fields counts.

Co-authored-by: Sayo <[email protected]>

* fix(quota): honor configured Devin tenant for legacy credentials

Co-authored-by: Sayo <[email protected]>

* fix(quota): keep expired Devin windows out of credit fallback

Co-authored-by: Sayo <[email protected]>

* fix(quota): enforce one Devin probe deadline

Co-authored-by: Sayo <[email protected]>

* fix(quota): reject negative Devin used credits

Co-authored-by: Sayo <[email protected]>

---------

Co-authored-by: Sayo <[email protected]>
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
@HQ1995 HQ1995 mentioned this pull request Oct 3, 2026
fix(devin): keep one trajectory per named conversation so prompt caching hits #6488
Closed
7 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@0disoft @lidge-jun
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.