Repository navigation
Long chats that change model, compact and come back, and the skills opened to a chat for a turn - #17
Merged
Merged
Conversation
ngodzik
force-pushed
the
drawn-conversation
branch
2 times, most recently
from
November 13, 2026 22:18
a3fcaa9 to
dd39515
Compare
The answers a model wrote keep the reasoning its provider returned, signed, and iq sends it back as it came. Another provider cannot check that signature and refuses the whole request: a chat moved from one model to another failed on its first call. The reasoning is taken off the conversation's answers before the first turn on the new model, their text whole. Should a provider still refuse a signature it cannot check, the call goes again once without those of the earlier turns, and they are sent no more; those of the turn under way stay, as a model may need them while it calls its tools.
…as chosen
A chat the person started came back on the model it ran on, whatever
the settings name now: after changing the lead in the settings, every
chat that came back still ran on the old one, and only new chats took
the new lead.
A chat whose model nobody chose, started on the settings' model, now
comes back on the settings' lead, said as iq starts ("fix answers on
<lead>, the settings' lead, from its next turn (it was on <old>)"), the
move kept with its choices and its answers' reasoning taken off. One
the person gave a model (`/model`, `--model`, `/new` or its first
message) stays on it, as do the agents a lead started.
A chat that was compacted came back, when iq started again, as a list of headers and of what was set aside (stops, errors, questions), with no answer between them: its thread was rebuilt from its messages, which the compaction had replaced by its summary. And every past turn was headed by the model the chat runs on now, even those another model answered. A compaction now keeps the messages it replaces with the chat, whole and in order, leaving out what the compaction before wrote (its summary, and its last answer said again), and the thread is rebuilt from the whole: what was replaced, then what the conversation holds since. What is set aside is placed among those messages, so that it stands where it came. Each turn sets aside the model it answers on when it is not the one before, and a chat that comes back heads each of its turns with it.
… with look_back A lead on a model whose price per token rises past a size was told when its conversation passed that point, and might call `compact`. The note only said where the price rises and asked for nothing, so a model often went on; and once compacted, what the summary left out was gone for the agent, so a model that knew it would lose details compacted late, or not at all. A setting, `compact_at`, says how many tokens a conversation should stay under; unset, where its model's price rises, when the provider says; 0 never. Past it, the agent is told at once, not at the next step, to finish the request it works on, then call `compact` before it answers, and again as each of its turns begins past it. A new tool, `look_back`, gives back the messages its compactions replaced, kept with the chat: numbered, those holding all the words of a query, or those on from a number, each cut past 4,000 characters and 24,000 in all, saying where to read on. The summary a compaction leaves ends with a line saying so.
…omes back Coming back to iq's window, the click that gives the terminal the focus landed in the conversation and marked it, so that the screen showed the keys of reading rather than the prompt; and going to another chat kept the reading of the last one. The terminal is now asked to say when it gets the focus while a page or the conversation iq draws shows, and to say it no more as iq gives it back, a panic too. A click within half a second of the terminal getting the focus only gives it. Going to another chat, or a new one, leaves the reading of the last.
…shown and theirs to allow A skill often needs a change in the middle of a chat, which holds the context that explains it. It could not be made there: the person's skills live in `~/.iq/skills`, one of the folders of secrets, so that an agent asked to change a skill could not even read it. Ctrl-B (`skills` in `[keys]`) or `/skills` now opens the person's skills to the agents of the chat written to until the turn they serve ends: the one under way, else the next. They shut once none of the chat's agents works, as a later turn of the chat begins, or when the person says so again. They open to one chat at a time, never to the agents of another. While open, the gate reads a Markdown file of the settings' skill folders, and asks each change of one of the person alone, never of the autopilot, whose policy is one of them. Nothing else opens: a file whose name says it holds secrets, a link leading out of the folders, the rest of `~/.iq`. A project's `.claude/skills` are not among them: its agents change those as any file of the project. A file written or edited is now asked with what it becomes, as a unified diff, whenever the agent may read it, so that a change is never allowed blind; the question box draws it under the keys that answer. The agents are told with their next call that the skills are open and where, and that they shut again. The person is told at once when they open and shut, the chat keeps it, and the status line says `⚠ SKILLS OPEN` in the colour of danger for as long as they are open, with the key that shuts them.
How a written file changed is never shown for a file of secrets, but the file was looked for under the workspace as the agent named it: one named from the home, `~/.ssh/config` or `~/.iq/skills/review/SKILL.md`, was looked for in a folder `~` of the workspace, found no secret, and had its lines shown once written. The file is now judged where the gate judged it written, `~/` read as the home and a link followed, and as the gate's own home says (`Gate::holds_secrets`), not the environment's.
What the person is shown beside an agent's conversation is kept with where it came among its messages, but where the conversation stood was told only before each call: what came once a turn ended (a notice said while the chat rested, the skills opened for its next turn) was placed before the turn's last answer, and a chat that came back showed it there. Where the conversation stands is now told again as each turn ends, its answer counted.
ngodzik
added a commit
that referenced
this pull request
Nov 14, 2026
For a chat compacted before compactions kept what they replaced, what was set aside before the compaction stood past the messages kept, and the thread placed it, with all that was set aside after it, below the last answer: old steps and errors piled up under it. What stands past the messages kept and came before something set aside among them now comes first; what truly came last stays at the end; and what stands among the messages is placed by where it stands.
ngodzik
added a commit
that referenced
this pull request
Nov 14, 2026
For a chat compacted before compactions kept what they replaced, what was set aside before the compaction stood past the messages kept, and the thread placed it, with all that was set aside after it, below the last answer: old steps and errors piled up under it. What stands past the messages kept and came before something set aside among them now comes first; what truly came last stays at the end; and what stands among the messages is placed by where it stands.
ngodzik
added a commit
that referenced
this pull request
Nov 14, 2026
* A chat compacted before #17 comes back with its last answer at its end For a chat compacted before compactions kept what they replaced, what was set aside before the compaction stood past the messages kept, and the thread placed it, with all that was set aside after it, below the last answer: old steps and errors piled up under it. What stands past the messages kept and came before something set aside among them now comes first; what truly came last stays at the end; and what stands among the messages is placed by where it stands. * A row of the conversation iq draws is erased again only once it changed The end of every row of the conversation iq draws was erased after each draw, unchanged rows included, at least once a second for the status line's clock. Kitty, seeing the selected rows written again, dropped a selection the terminal itself made; other terminals may do the same. The end of a row is now erased only when the row changed (its text, its width or its mark's colour), what was erased being forgotten when the screen is wiped or refitted, or the row given to the live part. * One conversation, the one iq draws, and iq selecting in it itself Selecting in the conversation iq draws needed Shift, the mouse being iq's, and stopped at the screen's edges; the scrollback selected well but lost the clicks on folds, links and diagrams. iq now always draws the conversation; `conversation` is read no more, said so as iq starts, so that older settings still load, and the scrollback writer is left for a cleanup of its own. A press let go where it was is a click, as before. A drag selects, shown reversed, with no Shift; held at the conversation's top or bottom edge, it scrolls a row every 60 ms, the mouse still; the selection is kept by block and row so that it holds as the conversation scrolls. As the mouse comes up, what it holds goes to the terminal's clipboard through OSC 52, without the images, the rows' padding nor the conversation's own indent. Shift and a drag stay the terminal's own selection, where a terminal does not let OSC 52 write its clipboard.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Long chats that change model, compact and come back, and the person's skills opened to a chat for a turn.
What
/model,--model,/new, its first message) stays on it.Saved::compacted_away), so that a compacted chat comes back as it was shown rather than as a skeleton; each turn's model set aside (Shown::Model), its head naming it.compact_at: past it (unset, where the model's price rises), an agent is told at once, and again as each turn begins past it, to finish its request and compact;look_backfinds again what its compactions replaced, by words or from a number, cut short.skillsin[keys]) or/skillsopens the person's skills to the agents of the chat written to until the turn they serve ends: their Markdown read, each change asked of the person alone, never of the autopilot, with the change shown as a diff before it is allowed (Event::Asked::preview, for any write the agent may read); nothing else of~/.iqopens.⚠ SKILLS OPENstays in the status line while they are open.Checked
Every commit passes
scripts/check.sh. Live with a stand-in provider: the skills opened, a change asked with its diff and allowed, the skills shut at the turn's end, a chat coming back, the focusing click. Not checked live: a real model pastcompact_at, the lead changed between two sessions (tests cover both).Stacked on #16: merge it first.