Repository navigation
Conversation
Expose provider-neutral systemPrompt append metadata across native thread lifecycle paths. Preserve effective developer instructions and reject ignored overrides on loaded threads. Cover native multi-turn, compact, fork and restored sessions. Co-authored-by: naiba/CloudCode <hi+cloudcode@nai.ba>
Preserve recovery tracking, session config metadata and fork subscriptions. Reject ambiguous AIR and append instruction overrides before side effects. Leave sufficient native serialization stack headroom on Node ARM64. Co-authored-by: naiba/CloudCode <hi+cloudcode@nai.ba>
|
Merged upstream main through v2.2.2 ( Integration preserves the new app-server recovery tracking, skipped-MCP configuration metadata, and fork subscriptions. AIR Also reproduced the existing 4,000-level JsonSnapshot test failing on Node 24 ARM64 with a stack overflow. Earlier native-serialization fallback (depth 64 instead of 256) fixes the original assertion without reducing test depth or skipping coverage. Local validation on the merged tree:
No live paid-model acceptance is claimed. |
Advertise clear capability and rebuild configured developer rules for explicit empty append on unloaded sessions; preserve omitted metadata behavior and test native restart/reset. Co-authored-by: naiba/CloudCode <hi+cloudcode@nai.ba>
|
Follow-up: explicit empty append now restores configured developer rules, and initialize advertises |
|
Hi @nikita-ashihmin could you review this? thx |
…rompt Upstream v2.3.0 (agentclientprotocol#653) implements the standard ACP append-mode systemPrompt on session/new, load, resume and fork: the text is appended to AIR customInstructions or the configured developer_instructions, kept while the session is open and across app-server recovery, and a changed prompt reloads an idle persisted thread. That covers the behaviour this patch carried from the closed upstream PR agentclientprotocol#585, but on a different wire contract. Keep the downstream contract that Alas uses on ACP v1: initialize advertises _meta.systemPrompt {version, append, clear, maxBytes}, and _meta.systemPrompt.append on the four session requests is validated as before and applied as the standard append-mode systemPrompt. The downstream CodexAcpClient/SessionFork implementation is replaced by upstream's. ACP v2 gets neither the advertisement nor the alias. Behaviour that now follows upstream: a changed append on an idle loaded thread reloads it instead of being rejected, and an append combined with AIR customInstructions is appended after them instead of being rejected. Adapted from fc0eb68. The v1 advertisement also changes the upstream snapshot src/__tests__/CodexACPAgent/data/initialize-v1-routed-response.json, which is not a ledger file of this patch: this commit binds only after that path is added to the patch tests (level 3).
Summary
ACP clients that give each session a stable role should not have to repeat that role in every user turn. Add the provider-neutral
_meta.systemPrompt.appendlifecycle extension and advertise it during initialization.developerInstructions; leave Codex's base instructions, tools, history, and compaction alone.developer_instructionsandCODEX_CONFIGprecedence instead of silently replacing configured rules. Rebuild from configuration on load rather than appending to already-appended restored text.Related: #215, #379, #454, #546. This uses the same append-only metadata/capability shape proposed in #454 and addresses the configured-instruction preservation and real-native lifecycle concerns discussed in #215. #546 is AIR-specific and new-session-only; this path is provider-neutral. Replacement/base-prompt overrides remain out of scope. Happy to fold this work into an existing PR if preferred.
Tests
/workspaceis not a symlink in file-change-report expectations.Local validation:
bun run typecheckbun run buildbunx vitest run --no-file-parallelism --retry=0— 1,238 passed, 33 existing skips (opt-in E2E/baseline tests); no new skipped testsbun run bundle:all— all six target binaries built