Render agent runs as a main-view transcript with an auxiliary terminal - #12
Merged
Merged
Conversation
Agent prompts no longer run inside the embedded PTY. Each run launches the CLI headless (claude -p --output-format stream-json; codex exec --json with the current ThreadEvent schema plus the legacy msg dialect) and streams JSONL into transcript items — assistant messages, tool/code-change rows, and error notices — rendered in the main conversation view and persisted per thread. Run completion is simply process exit, replacing the PTY foreground-group heuristics, and deleting a thread or closing the workspace cancels its run so no subprocess outlives its UI. The terminal becomes a VS-Code-style auxiliary panel: submitting never opens it, its divider drag-resizes it (dragging below the close threshold or press-and-holding closes it), and the send button turns into a stop control while a run streams. The conversation auto-scrolls with streaming output, shows an animated thinking/working indicator, and new threads default to ~/Desktop instead of running without a working directory. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015peMZyaHEmxDzyzNyhYeR5
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.
Summary
claude -p --output-format stream-json/codex exec --jsonspawned per run (login shell for PATH), parsed line-by-line into transcript items — assistant messages, tool/code-change rows, error notices — rendered in the main conversation view and persisted per thread (PersistedWorkspaceSession.transcript, backward/forward compatible).item.*/turn.*, verified against a real codex-cli 0.141 run) with the legacymsgdialect kept as fallback;--skip-git-repo-checkadded so runs work in non-git folders.❯ TERMINALdivider drag-resizes it, dragging below the close threshold (or press-and-hold) closes it.~/Desktop.Test plan
swift build -Xswiftc -warnings-as-errorscleanswift test -Xswiftc -warnings-as-errors: 203/203 (was 193 baseline; new suites: AgentEventStreamTests, AgentWorkspaceModelTests, HeadlessAgentRunnerTests incl. real-subprocess integration, AgentWorkspaceLayoutTests)claude -p --output-format stream-jsonrun; codex schema validated against a livecodex exec --jsonrunswift run MikuCodeApp🤖 Generated with Claude Code
https://claude.ai/code/session_015peMZyaHEmxDzyzNyhYeR5