[pull] main from xintaofei:main - #171
Merged
Merged
Conversation
Recent codex builds wrap every tool call in a JavaScript program executed as a single `exec` call. Replaying such a session showed one card per program -- named after the raw tool, bodied with the script source and a dump of chunk envelopes -- where the commands, patches, reads and searches it ran each used to have a card of their own. Only history was affected: the live path reads codex's own per-item stream and always showed them separately. The program is now read back into the calls it makes, and each call gets the card it had before code mode, with its output claimed from the matching chunk. Splitting only happens when the program provably prints one group of chunks per call in call order, including when codex collapses a long output stream into a single truncated blob. A program that does not prove that keeps a script card of its own -- a readable one, showing the source and how many tools it invoked -- rather than risk filing one command's output under another's name. A program that has not finished answers with a cell id, and its real return value arrives turns later as a `wait`. That value is folded back onto the cards the program already owns instead of landing as a separate card, so a long-running script no longer leaves a "Script running" placeholder followed by an unattached result. `wait` and `write_stdin` carry no command of their own, only the id of a background shell an earlier command left running, so they rendered as bare `wait` / `bash` cards over a parameter dump. Each is now titled by the command whose session it addresses, and one that only collects more output -- nearly all of them -- is folded into that command's card. Ones that send keystrokes or terminate keep a card, labelled with what they sent. When the session was never announced in a form the parser trusts, the card names the session id instead, and the command that started it now shows the same id beside its title so the two can be matched up. Tool results without a card of their own no longer arrive as one flat blob of JSON: they render as a collapsible tree, expanded as far as it stays readable, with a switch back to the raw text. This applies to every agent. A delegation started from inside a code-mode script also lost its button to open the child conversation, because the tool call id the child was recorded under is rewritten by code mode. It is now found by the task id both sides share.
CI lints on the current stable, which rejects three shapes the code-mode work introduced: a manual remainder test for divisibility, the four-field tuple the results-loop matcher carried between its three header forms, and a `format!` with nothing to interpolate in a test. The remainder test becomes `is_multiple_of` -- still guarded by the zero-divisor check ahead of it -- the tuple becomes a named `LoopHeader`, and the test string is a plain literal. No behavior changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )