1ccacad63281094de8a3372d5a507d38f9969e5c
4
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
1d704f8190 |
codex: OpenAI's threads follow a provider of the user's at the top, where Codex resumes them
harris on Discord (the Codex app, after switching from CC Switch): "This chat uses openai, but your current provider is custom. Switch to openai to continue." CC Switch left its "custom" as config.toml's model_provider, which magpie keeps since #4347, and Codex 0.166 resumes a thread only on the provider it is on now. Every thread started on OpenAI before was refused, and switching to OpenAI would refuse custom's threads instead, so the user was stuck. Nothing moved them: bringOver moves only onto magpie, bringBeside only from such a provider onto OpenAI. lendOwn (each Sync) moves OpenAI's threads onto that provider, as bringBeside does the other way: in place at OpenAI's length, by the row for a paginated thread, the last 30 days rewritten with a copy kept otherwise. The ids go in stash codex.lent; giveLent returns exactly those to OpenAI once Codex is on it again (CC Switch's official card), keeps the record while Codex is on that provider or on magpie, and drops it on any other. Nothing moves while a profile names openai, after the user disconnected Codex, or from a distro's Codex. TestCodexThreadsComeBackOffMagpie/by_hand expected an OpenAI thread to stay on OpenAI with custom set by hand at the top, the stuck state itself; it now expects it on custom. docs/subsystems/agent-wiring.md says so. Run (mote, go 1.26.8): go test -count=1 ./internal/agent/ ok (250s); GOOS=windows, GOOS=linux and native go vet ./internal/agent/ ok; gofmt -l clean. Broken by hand: Sync without lendOwn, TestCodexOwnProviderTakesOpenAIThreads red (thread left on "openai", rollout not on custom); without the disconnected and profile guards, TestCodexOwnProviderLeavesOpenAIThreads red for both cases. Not tried: a real Codex app resuming a moved thread on a real relay; harris's config.toml wasn't seen, so the "custom" here is CC Switch's relay table as it writes it. A thread moved from the ChatGPT backend to a relay carries its encrypted reasoning, which a relay on another account may not accept; the thread then fails on the relay as a switch to it by hand would. |
||
|
|
0ee424e3ee |
codex: a thread Codex 0.166 won't resume for its provider moves with Codex (毅, AcMilan on Discord)
Codex 0.166 (openai/codex#57840) refuses to resume a thread whose saved
provider isn't the configured one: "This chat uses openai, but your
current provider is magpie. Switch to openai to continue." (毅), and
"This chat uses cc-switch-official, but your current provider is
openai" (AcMilan). The rollout's session_meta provider wins over the
state DB row, and no -c override gets past it (openai/codex#58865).
Cause on magpie's side: bringOver relabelled only plain rollouts in
place. A thread Codex had packed to .jsonl.zst (a week after its last
turn) stayed on openai, so with magpie as provider it can't resume.
cc-switch-official is the id CC Switch 3.17-3.20 gave the official
account; CC Switch 4 moves those threads back to openai itself (#7948
there), but a user who left CC Switch keeps them stranded.
- sessions.MovePackedCodexThreads: packed threads on `from` updated in
the last 30 days, newest first, up to 128 MB per sync, each moved by
the existing packed rewrite with its copy kept in the trash. Rows
are checked against the file (plain absent, .zst present, meta on
`from`, same home). A state DB without updated_at moves nothing.
- bringOver calls it after RelabelCodexThreads; bringBack already
moves packed threads back.
- bringOfficial: while magpie wires Codex and Codex is on openai or
magpie, cc-switch-official threads move there, unless the user's
top-level model_provider or a profile names cc-switch-official.
- Other providers and packed threads older than 30 days are left; the
Sessions page's Move or Resume takes them.
Run (mote, at the pushed base
|
||
|
|
a93190ae19 |
agent: the Codex threads test names what its HOME still holds after removal (#3422)
TestCodexThreadsComeBackOffMagpie/disconnect went red once on macOS CI
(
|
||
|
|
85534cd078 |
codex: threads started on magpie come back to the provider Codex is on
kaizaoji on X (10-22, zwaydot's Codex thread): after using magpie with Codex and then disconnecting or editing the config, projects say their context doesn't exist, and earlier threads can't be read. Cause: Codex lists threads per provider. app-server thread/list filters on the current model_provider when the caller names none (thread_processor.rs), and the TUI resume picker does the same; no setting turns that off. magpie sets model_provider = "magpie" with an API-key sign-in, with no sign-in, with a ChatGPT account out of allowance (codex.out), in the "magpie API" login mode and for a gateway on another machine. Every thread started then is tagged "magpie" in its rollout's session_meta and in state_5.sqlite. After Disconnect (or a hand edit back to openai) Codex lists only "openai" threads, so those threads are gone from resume and from the app. Not done: routing through the built-in openai provider with openai_base_url instead of switching model_provider. The built-in requires OpenAI auth, so with no sign-in the TUI shows its login screen; with an API key Codex skips /models (#322, why |