Repository navigation
feat: teach models to use collapsible details where supported - #114706
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 27, 2026, 3:53 PM ET / 19:53 UTC. ClawSweeper reviewWhat this changesThis PR teaches agents to use Markdown Merge readiness⛔ Blocked until real behavior proof is added - 4 items remain Keep this PR open. The capability gate is narrowly scoped and no concrete patch defect surfaced, but this is a new model-behavior feature carrying a protected Priority: P3 Review scores
Verification
How this fits togetherRuntime channel capabilities flow into the agent system prompt before the model writes a reply. Telegram and the internal Control UI can advertise native disclosure support; the prompt should only encourage collapsible details on those surfaces so other channels retain their existing visible-content behavior. flowchart LR
A[Incoming channel and account] --> B[Runtime capability collection]
B --> C{Details supported?}
C -->|Yes| D[Agent system prompt guidance]
C -->|No| E[Existing prompt behavior]
D --> F[Model reply with optional details]
F --> G[Telegram or Control UI rendering]
E --> H[Other channel output]
Decision needed
Why: The patch is a new user-visible model-authoring behavior rather than a repair to an established contract; tests establish capability routing but do not settle whether this output style belongs in the default product guidance. Before merge
Agent review detailsSecurityNone. PR surfaceSource +30, Tests +42, Docs +11. Total +83 across 10 files. View PR surface stats
Review metricsNone. Mantis proof suggestionA short Telegram Desktop recording can directly demonstrate the changed rich-message behavior and whether the primary answer remains visible outside the disclosure. A maintainer can ask Mantis to capture proof by posting this exact PR comment: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the capability gate, add redacted after-fix proof of a generated Control UI or rich-message Telegram response whose optional details collapse natively while the primary answer stays visible, then obtain maintainer confirmation for the proactive prompting behavior. Do we have a high-confidence way to reproduce the issue? Not applicable as a bug reproduction: the PR adds a new, capability-gated output behavior. The missing validation is after-fix proof on a real supported reply surface, not a failing current-main reproduction. Is this the best way to solve the issue? Unclear until a maintainer confirms the proactive prompting direction. The implementation is appropriately capability-gated and preserves the prompt-cache boundary, but real rendering proof is still needed to validate the intended user-facing result. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 277e887c3a94. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
ClawSweeper rank-up moves:
The first skip accepts the remaining absence of live generated-output proof; it is not being treated as if such proof exists. |
|
Merged via squash.
|
…aw#114706) * feat: teach models to use collapsible details where supported * fix: accept nullable accountId in telegram rich-messages helper * docs: regenerate docs map for collapsible details heading * fix(ci): remove duplicate Codex prewarm test route
What Problem This Solves
Models never learn that disclosure syntax exists, so collapsible details only appear when a user explicitly asks for them. Adding unconditional guidance would create a different problem: it would promise a rendering behavior on reply surfaces that flatten disclosures instead of rendering them natively.
Why This Change Was Made
The guidance is capability-gated so the system prompt can never contradict the delivery surface. One predicate feeds both the runtime capability declaration and the prompt section: Telegram rich accounts and the internal webchat/Control UI channel advertise
markdownDetails, while other channels remain unchanged. The prompt section sits below the prompt-cache boundary, and nothing was added tohashStablePromptInput, preserving the stable prefix byte-for-byte across sessions.User Impact
On Control UI and Telegram rich accounts, the model can now proactively tuck optional depth behind a disclosure while keeping the primary answer visible. Other channels keep their existing flattened output and receive no new guidance.
This is a release-note-worthy feature.
Evidence
hashStablePromptInputis unchanged.test/scripts/test-projects.test.tspasses 220/220 and Codex autoreview reported no actionable findings.