When a CometAPI Astra task may exceed one response, divide it at file boundaries, not at arbitrary text chunks. That is the safest continuation unit because the source set says Astra is intended for difficult end-to-end work that reasons, uses tools, interacts with software, revises intermediate work, and carries a task to a finished result (sources/src-adf31111749c7b6d1c6acbfe1d79296d.json). The same source also says Astra can keep notes across context windows, which makes file-level continuity more useful than paragraph-level slicing during a long coding run (sources/src-adf31111749c7b6d1c6acbfe1d79296d.json).
A practical split policy for a CometAPI integration is simple:
- Finish one file completely.
- Mark that file complete in a manifest.
- Move to the next file.
- If a file is too large for one response, interrupt only inside that file and resume from the stored checkpoint.
That policy keeps the caller’s artifact list stable across requests. It also matches OpenAI’s official model guidance for GPT-6 Astra: the model page lists a 1.05M-token context window, 128K maximum output, and reasoning effort levels from low through max (sources/src-cd52887026c57c5dab417815900b6ce1.json). The guidance page recommends selecting the lowest reasoning effort that meets the eval target, because token efficiency often matters more than always running at maximum reasoning (sources/src-5b9f7f352beb2cc7d4d21b3e45b15aa1.json).
Useful file manifest shape:
file_path: exact path of the file being produced.completion_state:pending,in_progress,complete, orblocked.last_checkpoint: last verified section, function, or test block.next_action: the next edit or validation step.
These fields make continuation explicit. They let a caller ask, “What remains?” without re-reading the whole prompt or guessing where a partial response stopped. They also support a clean recovery boundary: completed files stay complete unless their content changes, while interrupted work resumes from the last checkpoint inside the same file.
Illustrative completion states:
pendingmeans the file has not started.in_progressmeans the file is underway and has a checkpoint.completemeans the file is finished and validated.blockedmeans the file cannot finish until a dependency changes.
Untested gateway support: the CometAPI article says the Responses API is the natural starting point for tool-heavy workflows and lists function calling, structured outputs, web search, file search, code interpreter, hosted shell, apply patch, computer use, MCP, and tool search (sources/src-adf31111749c7b6d1c6acbfe1d79296d.json). That does not prove any specific live gateway behavior in this workspace, but it does support a file-oriented continuation design because tool-heavy work can span multiple steps.
Illustrative interrupted-file recovery example:
- A run completes
src/client.tsandsrc/manifest.ts. - The run stops while editing
src/retry.ts. - On resume, load the manifest.
- Verify the first two files are still
complete. - Continue only with
src/retry.tsfrom the stored checkpoint.
Do not reopen the completed files unless their own content changed and the manifest marks them for rework. That keeps the continuation boundary aligned with the artifact boundary, which is more reliable than cutting a response in the middle of a thought or across unrelated text.
For this topic, the decision is therefore not “How do we split text?” but “How do we preserve work state?” The answer is: use a file manifest, record completion states, and treat each file as the unit of continuation. That is the cleanest way to preserve the caller’s artifact manifest across CometAPI Astra requests and to validate each finished file before moving on.