A restart test should answer a stricter question than “did the next request succeed?”: can the application resume the same task from data it owns, without depending on an opaque response identifier that may belong to one provider or route?
OpenAI’s conversation-state guide says text-generation requests are independently stateless, but an application can reconstruct a conversation by sending prior user and assistant messages. For reasoning-model requests, it goes further: preserve every item in the response output array, including encrypted reasoning items and assistant phase values, then replay the complete output. OpenAI also documents stateful alternatives—Conversations objects and previous_response_id—but those are provider-managed continuation mechanisms.
That distinction should drive the CometAPI integration decision. CometAPI’s official Astra guide identifies gpt-6-astra and shows it with a Responses API client. It does not establish that a selected CometAPI route forwards previous_response_id, exposes Conversations, preserves stored objects, or applies OpenAI’s retention semantics. Therefore, make explicit replay the required restart path; consider stateful continuation only an optimization after testing the exact model, route, and interface.
Portable-state manifest
This is an illustrative fixture, not the result of a live gateway test:
{
"schema": "portable-task-state/v1",
"task_id": "restart-fixture-001",
"route": {"gateway": "cometapi", "model": "gpt-6-astra", "interface": "responses"},
"instructions": "Produce a migration plan and cite each supplied artifact.",
"input_items": [
{"type": "message", "role": "user", "content": "Review artifact A, then wait for B."}
],
"response_output_items": ["<complete structured output from turn 1>"],
"artifacts": [
{"id": "A", "media_type": "text/plain", "sha256": "<digest>", "storage_ref": "objects/A"},
{"id": "B", "media_type": "text/plain", "sha256": "<digest>", "storage_ref": "objects/B"}
],
"tool_results": [{"call_id": "<id>", "name": "<tool>", "result_ref": "objects/result-1"}],
"next_input": {"type": "message", "role": "user", "content": "B is ready; finish the plan."},
"checkpoint": {"completed_steps": ["artifact-A-reviewed"], "pending_steps": ["artifact-B-review", "final-plan"]}
}
Keep actual response items as structured JSON, not the placeholder string shown above. Store large files by immutable reference plus digest, and keep the bytes in application-controlled storage. Do not put API keys, headers, or other credentials in the manifest. A provider response ID may be logged separately for diagnosis, but it is deliberately absent from the resume dependency set.
Restart procedure and success criteria
- Run turn one, persist the manifest and referenced objects, then terminate the process before sending
next_input. - Start a clean process with no in-memory SDK objects or response IDs. Verify artifact digests and load the saved instructions, input items, complete response output items, tool results, checkpoint, and next input.
- Submit that reconstructed input through the chosen CometAPI route. This request shape is illustrative; confirm accepted item types against the route before relying on it.
- Fail closed if an artifact is missing, a digest changes, an output item cannot be represented, or the model contradicts a completed checkpoint.
The portable path passes when the restarted run references both artifacts, does not repeat the completed step, finishes both pending steps, and produces the required migration-plan structure. It fails if success requires previous_response_id, hidden process memory, or an unrecorded tool result.
Separately, run an optional stateful probe using the same fixture and acceptance checks. If the exact CometAPI route demonstrably supports a provider-managed continuation mechanism, compare semantic output, latency, token accounting, retention, and failure behavior. Until that evidence exists, portable replay remains the compatibility baseline—not a generic memory pattern, but a concrete restart boundary for this CometAPI model route.