You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fc0eb68
Browse filesBrowse the repository at this point in the historyBrowse files
feat: append session instructions without replacing configured rules
Carry agentclientprotocol#585 (head 1a32623) onto alas: a
client-neutral _meta.systemPrompt.append on session/new, load, resume and
fork, advertised as InitializeResponse._meta.systemPrompt. The append is
combined with the effective configured developer_instructions instead of
replacing them, and does not require the AIR client declaration.
On top of agentclientprotocol#585, a load or resume that repeats the append this adapter
process already opened the thread with is accepted without a new
override. Alas re-sends the same captured instructions when it reconnects
to a live adapter, and agentclientprotocol#585 alone rejected every append on a loaded thread.
Copy file name to clipboardExpand all lines: docs/air-extensions.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,7 @@ Only these differences are allowed:
59
59
ACP defines no merge for `_meta` keys, so the `_meta` of each report keeps every key that the adapter sent before.
60
60
- Bug fixes: a unique MCP startup tool call id, the result of a dynamic tool in `content`,
61
61
no output after a tool call ended, and a terminal status for a replayed image generation.
62
-
- Feature changes for every client: the `/mcp` command has a new description and an input hint.
62
+
- Feature changes for every client: the `/mcp` command has a new description and an input hint; initialization advertises the opt-in [system prompt append extension](system-prompt-extension.md).
63
63
- The client gets no AIR-only key.
64
64
That is no `_meta.jetbrains.air` key and none of the earlier keys in [Removed keys](#removed-keys).
65
65
- The output of a command arrives once, in the chunks or in `content`, as [Zed conventions](#zed-conventions) describe.
{"_meta":{"systemPrompt":{"append":"Review database migrations for this session."}}}
19
+
```
20
+
21
+
The adapter reads effective user/project `developer_instructions` for the
22
+
requested working directory, honoring a `CODEX_CONFIG` override, and appends the
23
+
client text with a blank line. The underlying configuration is not modified.
24
+
Each session gets its own value; repeated loads reconstruct it from configuration
25
+
rather than appending to the already-appended restored instructions.
26
+
27
+
Absent or whitespace-only text leaves the existing native lifecycle unchanged.
28
+
With explicit text, new and forked threads receive the combined value; load and
29
+
resume apply it to an **unloaded** thread. Codex ignores instruction overrides on
30
+
already-loaded threads, including idle threads. Those requests are rejected
31
+
rather than silently claiming success: close/unload the thread first, or open it
32
+
in a fresh adapter process. A thread that this adapter process opened with the
33
+
same append text is the exception: a client that reconnects to the live process
34
+
and repeats the load or resume with unchanged text is accepted without a new
35
+
override, because Codex already holds those instructions. Omitting metadata
36
+
leaves native restoration and inheritance behavior to Codex. This is not an
37
+
in-place instruction editor.
38
+
39
+
Only the `{ "append": "..." }` form is supported. Replacement strings, unknown
40
+
fields, non-string values, and values over 256 KiB in UTF-8 are rejected before
41
+
session creation or skill changes. Config lookup failures are propagated; the
42
+
adapter never substitutes an empty configuration and loses user instructions.
43
+
44
+
AIR `customInstructions` remains supported on its upstream new-session path. Combining a nonblank `systemPrompt.append` with AIR `customInstructions` is rejected before thread creation rather than silently choosing an override.
45
+
46
+
The `clear: true` capability advertises explicit empty append support: `{append:""}` reloads only effective configured developer instructions, clearing a prior session addition. Omitted metadata remains unchanged. This requires an unloaded thread just like a nonempty append.
uncertainty: "Codex turn diffs may omit same-content renames and changes made outside apply_patch, including shell commands, version-control commands, generators, and child processes.",
0 commit comments