mirror of
https://github.com/openai/codex.git
synced 2026-10-20 17:38:45 +00:00
## Why User goal edits and clears need to reach the model as user instructions, including when a thread is unloaded or history is being compacted. Automatic goal lifecycle updates must not supply user authorization. ## What changed - Add optional `origin` values of `user` and `automatic` to `thread/goal/set` and `thread/goal/clear`, and mark TUI goal requests as user actions. Omitted origins do not supply user authorization. - Persist explicit user objective, status, and clear instructions before changing goal state. Recording failures leave goal state unchanged. - Coordinate goal edits with thread resume, reload stored history under writer ownership, and preserve edits accepted after the compaction input snapshot. - Update generated protocol schemas and TypeScript and Python bindings. ## Testing Add coverage for user edits and clears on loaded and unloaded threads, concurrent path-based resume, exclusion of automatic goals from user instructions, preservation of edits during compaction, and recording failures that leave goal state unchanged. GitOrigin-RevId: d779d7c678a0c32a6ef76975dbe5b1400d1df245
68 lines
1.3 KiB
JSON
Generated
68 lines
1.3 KiB
JSON
Generated
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"definitions": {
|
|
"ThreadGoalMutationOrigin": {
|
|
"description": "Distinguishes explicit user actions from automatic goal lifecycle mutations.",
|
|
"enum": [
|
|
"user",
|
|
"automatic"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"ThreadGoalStatus": {
|
|
"enum": [
|
|
"active",
|
|
"paused",
|
|
"blocked",
|
|
"usageLimited",
|
|
"budgetLimited",
|
|
"complete"
|
|
],
|
|
"type": "string"
|
|
}
|
|
},
|
|
"properties": {
|
|
"objective": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"origin": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/ThreadGoalMutationOrigin"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "Missing provenance does not supply user authorization."
|
|
},
|
|
"status": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/ThreadGoalStatus"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"threadId": {
|
|
"type": "string"
|
|
},
|
|
"tokenBudget": {
|
|
"format": "int64",
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"threadId"
|
|
],
|
|
"title": "ThreadGoalSetParams",
|
|
"type": "object"
|
|
} |