diff --git a/internal/gui/assets/purposes.js b/internal/gui/assets/purposes.js
index 9c1bf9238..80114aef0 100644
--- a/internal/gui/assets/purposes.js
+++ b/internal/gui/assets/purposes.js
@@ -56,6 +56,10 @@ const REQUEST_KINDS = {
"purpose": "kind:routing",
"name": "Routing classifier"
},
+ "thread_description": {
+ "purpose": "kind:thread_description",
+ "name": "Description"
+ },
"thread_spawn": {
"purpose": "kind:collab_spawn",
"name": "Subagent"
diff --git a/internal/gui/codex_titles_test.go b/internal/gui/codex_titles_test.go
index 509abc415..518f18fc8 100644
--- a/internal/gui/codex_titles_test.go
+++ b/internal/gui/codex_titles_test.go
@@ -65,3 +65,40 @@ func TestCodexTitlesSetting(t *testing.T) {
t.Errorf("Codex's own: %d %q", code, settings.Load().CodexTitles)
}
}
+
+func TestCodexDescriptionsSetting(t *testing.T) {
+ h := t.TempDir()
+ t.Setenv("HOME", h)
+ t.Setenv("USERPROFILE", h)
+ t.Setenv("XDG_CONFIG_HOME", filepath.Join(h, ".config"))
+ t.Setenv("XDG_CACHE_HOME", filepath.Join(h, ".cache"))
+ t.Setenv("APPDATA", filepath.Join(h, "AppData", "Roaming"))
+ t.Setenv("LOCALAPPDATA", filepath.Join(h, "AppData", "Local"))
+ for _, v := range agentenv.Vars {
+ t.Setenv(v, "")
+ }
+ if err := provider.Save(provider.Provider{ID: "fake", Name: "Fake", Key: "k", Models: []string{"m1"}, Chat: "http://127.0.0.1:9/v1"}); err != nil {
+ t.Fatal(err)
+ }
+ call := func(path, body string) (int, map[string]any) {
+ t.Helper()
+ rec := httptest.NewRecorder()
+ Handler(nil, nil).ServeHTTP(rec, httptest.NewRequest("POST", path, strings.NewReader(body)))
+ var out map[string]any
+ json.Unmarshal(rec.Body.Bytes(), &out)
+ return rec.Code, out
+ }
+ code, out := call("/api/settings/codex-descriptions", `{"model":"fake/m1"}`)
+ if code != 200 || out["codexDescriptions"] != "fake/m1" || settings.Load().CodexDescriptions != "fake/m1" {
+ t.Fatalf("model: %d %v", code, out["codexDescriptions"])
+ }
+ if code, _ := call("/api/settings", `{"theme":"dark"}`); code != 200 || settings.Load().CodexDescriptions != "fake/m1" {
+ t.Errorf("another save lost the setting: %q", settings.Load().CodexDescriptions)
+ }
+ if code, _ := call("/api/settings/codex-descriptions", `{"model":"nope/x"}`); code < 400 || settings.Load().CodexDescriptions != "fake/m1" {
+ t.Errorf("unknown model: %d %q", code, settings.Load().CodexDescriptions)
+ }
+ if code, _ := call("/api/settings/codex-descriptions", `{"model":""}`); code != 200 || settings.Load().CodexDescriptions != "" {
+ t.Errorf("Codex's own: %d %q", code, settings.Load().CodexDescriptions)
+ }
+}
diff --git a/internal/gui/settings_keep_test.go b/internal/gui/settings_keep_test.go
index c7b097500..26c07daa5 100644
--- a/internal/gui/settings_keep_test.go
+++ b/internal/gui/settings_keep_test.go
@@ -148,6 +148,7 @@ func TestSettingsSaveKeepsWhatItDoesNotSend(t *testing.T) {
PlainOwnNames: true,
CodexAgentsV1: true,
CodexTitles: "off",
+ CodexDescriptions: "fake/m1",
CodexAutoReview: "fake/m1",
CodexSubagentModel: "codex/gpt-6-astra",
ChinaMirror: true,
diff --git a/internal/settings/settings.go b/internal/settings/settings.go
index 71188ead5..43c393f2f 100644
--- a/internal/settings/settings.go
+++ b/internal/settings/settings.go
@@ -342,6 +342,12 @@ type Settings struct {
// as Codex sends them, "off" answered by magpie with no title and sent
// nowhere, or a model's id (provider/model, group/
) that writes it.
CodexTitles string `json:"codexTitles,omitempty"`
+ // CodexDescriptions is where the request Codex makes for a thread's
+ // description (thread_description: its own hidden turn, on Codex's own
+ // model through its ChatGPT sign-in) goes: "" as Codex sends it, or a
+ // model's id (provider/model, group/) that writes it. It is not
+ // CodexTitles: a description asks for {"description"} alone.
+ CodexDescriptions string `json:"codexDescriptions,omitempty"`
// CodexAutoReview is the model Codex's auto-review (approvals_reviewer
// = "auto_review": the guardian that decides an approval in the user's
// place) runs on (#938): a model's id (provider/model, group/) put
@@ -1087,6 +1093,10 @@ func save(s Settings, recording bool) error {
if s.CodexTitles != "" && s.CodexTitles != "off" && !strings.Contains(s.CodexTitles, "/") {
return fmt.Errorf("the model for Codex's titles must be a model's id such as openai/gpt-5-mini, or off, not %q", s.CodexTitles)
}
+ s.CodexDescriptions = strings.TrimSpace(s.CodexDescriptions)
+ if s.CodexDescriptions != "" && !strings.Contains(s.CodexDescriptions, "/") {
+ return fmt.Errorf("the model for Codex's descriptions must be a model's id such as openai/gpt-5-mini, not %q", s.CodexDescriptions)
+ }
s.CodexAutoReview = strings.TrimSpace(s.CodexAutoReview)
if s.CodexAutoReview != "" && !strings.Contains(s.CodexAutoReview, "/") {
return fmt.Errorf("the model for Codex's auto-review must be a model's id such as openai/gpt-5-mini, not %q", s.CodexAutoReview)
diff --git a/internal/usage/purpose.go b/internal/usage/purpose.go
index 66c0ff606..859384837 100644
--- a/internal/usage/purpose.go
+++ b/internal/usage/purpose.go
@@ -22,6 +22,7 @@ var purposeKinds = func() map[string]PurposeKind {
add("Compaction", "compact")
add("Memory", "memory_consolidation", "memgen", "memory")
add("Title", "thread_title", "thread_title_reconsideration", "title_generation", "title")
+ add("Description", "thread_description")
add("Subagent", "collab_spawn", "thread_spawn", "agent_job")
add("Luna Reserve", "luna_reserve")
add("Suggestions", "ambient_suggestions", "ambient_suggestion_safety")
diff --git a/internal/usage/purpose_test.go b/internal/usage/purpose_test.go
index 536217376..7c6e3b0dd 100644
--- a/internal/usage/purpose_test.go
+++ b/internal/usage/purpose_test.go
@@ -39,6 +39,13 @@ func TestPurposeFilter(t *testing.T) {
}
}
+func TestDescriptionPurposeLabel(t *testing.T) {
+ p := PurposeKinds()["thread_description"]
+ if p.Purpose != "kind:thread_description" || p.Name != "Description" {
+ t.Fatalf("description purpose: %+v", p)
+ }
+}
+
func TestPurposeRequestPages(t *testing.T) {
pageHome(t)
now := holdClock(t, time.Date(2026, 9, 30, 12, 0, 0, 0, time.Local))