Repository navigation
Deck 2.0 - #105
Merged
Merged
Deck 2.0#105
Conversation
An agent that planned its own work on the board (task.create with itself as owner) and finished it in the same turn was given a second turn: the scheduler's brief for each task was still waiting, so Deck asked it to do the work again, and each such turn could plan more. Once a task is done or cancelled, its hand-overs that their recipient has not been given go inert, a brief logged after the task already finished starts nothing, and a stale one that still shows in a briefing says the task is already done. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
At auto, every task.create became a scheduled job: an agent that used the board as a to-do list got a subagent per item (of the default kind, which may not be the agent the user was talking to), and each one reporting back started another turn of the lead. One agent should work like its own CLI; the board stays a list until the user raises the level. Existing configs and stored threads keep the level they name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
Every card takes one primitive (ui/kit/card.tsx): its .card rule breaks unbroken text anywhere it must and keeps code and tables in a scroll of their own, so no path, URL or command runs out of it. The task board, work tab, approvals, questions, plans, agents tree, changed files, highlights and inbox use it. An agent's message to another (the engine's relay, '→ $name') and a task's report to whoever handed it over now show as a hand-off card under the sender: the recipients in their hues, the task and how it ended, and the words folded when long. Fixed along the way: - A long thread title wrapped over the subtitle and the lanes: the title's text-balance overrode truncate's nowrap. - An open task card's error and result ran out of the card. - Markdown tables showed as raw pipes; the shared parser (desktop and phone) now reads GFM tables, which scroll in their own box. test/e2e/overflow.spec.ts fills a room with the longest names, paths, URLs, commands, tables and hand-offs an engine sends and measures every visible element at 1360, 1024 and 860 px: nothing may leave its card or the window, be clipped without an ellipsis, or scroll sideways outside code, tables and tab strips. The orchestration e2e test expects Off as the default level. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
The hop cap counted only thread.send and @mention relays, and MaxWork only spawns and dispatches. A task's report to its creator, a scheduler brief, review notes and retries each started a turn and counted against neither, so a crew could go on long after the hop cap. Every turn that starts without the user now counts against the level's max_turns (12, 16, 48, 96 from off to full; orchestration_levels may change it). At the limit the thread pauses, and while it is paused no such turn starts; the user's next message or Continue resets the count and wakes whoever has messages waiting. After Magentic-One's max_turns and AutoGen's MaxMessageTermination: one ledger per user message, whatever the source of the turn. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
Acknowledgements. Two agents looped on "@codex thanks!" / "@claude you're welcome!" until the hop cap. A message that only acknowledges (a dozen words at most, no question, nothing but thanks, closings and receipts; "done", "yes", "LGTM" and results still wake the asker) is logged for the recipients' next briefing but starts no turn and spends no hop. The briefing asks agents to skip them. After MetaGPT, where chatter about an artifact wakes no one, and MAST's FM-1.5 (unaware of termination). Solo briefing. A member alone with the user at a level where agents only do what they are told was briefed on the task board, capsules, leases, highlights, worktrees and a crew it did not have, which nudged it into orchestrating. It now hears that it works for the user and where Deck's ops are, and when another agent joins, the join line says how to reach it. Members are no longer briefed on their own board changes or on Deck's pending/ready moves. The full briefing is trimmed to fit its command-line budget at every level. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
The Changes panel, a task's files and a worktree's files cut a long path at its end, so the file name, the part that tells files apart, was the first thing lost. PathTail (ui/kit/path.tsx) gives way in the folder first. The overflow test checks the name stays whole, and the spawn test looks for the brief as a hand-off card. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
task.done on a task its agent never moved to running went straight to done: the review stage only takes running work, so a task created with review: "codex" and reported done in the same turn skipped its review. task.done now starts such a task first, and the review runs as asked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
…ead screen A new thread is one agent, as in its own CLI, and a room of one agent has no lanes strip. A crew is a choice: "Start a multi-agent workflow" on the new-thread screen lists six presets (workflows.ts), and the one picked shows as a card over the composer with how it ends: - Plan, build, review: plan mode; once the plan is approved, the lead builds it as a task reviewed by another kind (assist). - Build and review: the same, without the plan (assist). - Second opinion: two kinds answer on their own (off). - Best of several: the race builder with the goal (off). - Split by area: parts on the board, helpers on worktrees (auto). - Full crew: the lead runs the board, helpers' work reviewed (full). Each sets only its own thread's level (CreateSession's level), names the engine's ops in its first message so the shape of the run is enforced, and ends on a review, a kept race entry or the turn budget. The old start cards are gone. Workflows need a local Deck, which takes a level at creation. test/e2e/workflow-shots.spec.ts takes screenshots of the new screens with SHOTS set. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
The person picks the thread's agent from a dropdown and every message goes to it; no @ for agents. The lead spawns subagents, which report back and cannot be talked to, and opens sub-threads, which nest under the thread and can be talked to as their own agent. Decisions: switching the kind keeps the history; a sub-thread reports only for turns its parent asked for; named agents stay as dropdown entries; all clients change together. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
Step 1 of docs/design/lead-agent-and-subthreads.md. - Every message of the person goes to the thread's lead (lead.go), not to whoever spoke last; "@codex" in it is plain text and adds nobody. The first message starts a lead of the default agent. The lead is stored with the thread; a thread from before leads settles on the member that last answered the person. - SetLead switches the lead: the same kind changes model and effort in place; another kind (or a named agent's profile) reuses an idle member of it or adds one, briefed on the thread so far, with a notice. - "@name" lines in an agent's reply are no longer relayed: agents reach each other with thread.send, agent.spawn and, next, thread.open, which carry terms and count against the budgets. The briefings say so. - The person cannot message a subagent: it works for the agent that started it. - Deck's own addressed posts (a capsule hand-over) keep postAddressed, as do the engine's tests of rooms with several members. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
…he lead
Step 2 of docs/design/lead-agent-and-subthreads.md.
Engine (session/subthread.go):
- thread.open {brief, title, kind, model, effort} makes a sub-thread in the
same folder, led by an agent of kind (the opener's by default), with the
brief as its first message. thread.post sends a follow-up to one the
agent opened; thread.children lists them.
- When the sub-thread's lead ends a turn that answered the parent's brief
or follow-up, its reply goes to the parent agent (via "subthread").
What the person says in the sub-thread stays there.
- Opening one and each follow-up count a turn against the parent thread's
turn budget, and each report starts a counted turn, so a lead cannot
loop through sub-threads. Only a lead opens them (not a subagent), at
off only in a turn where the person asked, at most max_subthreads per
agent (2/4/8/16 from off to full).
- OpenSubThread is the person's own sub-thread (the side chat).
- Threads store their parent, the opener and its pending asks.
Workspace and API:
- A sub-thread gets a session of its own; Room carries its parent session
and the lead (agent, kind, model, effort, profile), and so do the RPC's
Session (parent_id, lead) and the phone's wire session.
- A report's relay line names the sub-thread's session, so clients link
to it.
- SetAgentModel, the clients' agent menu, now makes that agent the
session's lead (and still saves the kind's default model).
- CreateSession takes parent_id to open the person's sub-thread.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
Step 3 of docs/design/lead-agent-and-subthreads.md, desktop part. - The composer's agent menu (LeadPicker) replaces the chip per agent and the "Write to" row: one chip names the agent the thread talks to, its model and effort, and opens the agent picker (kinds, then named agents). Picking sets the thread's lead (SetModel); on the new-thread screen the pick is the agent the thread starts with. - No picker offers agents or people. "#" and "@" open the file picker, as in Claude Code; "@name" and "$name" go as text. - Sub-threads sit under their parent in the thread list, indented with a ↳; a sub-thread's header says "Sub-thread of …" and links back. - A sub-thread's answer is a hand-off card in the parent with "Open <title>". - Workflows send the goal to the thread's agent with their terms, no @; "Second opinion" has it open a sub-thread of the other kind. - Rooms carry the lead and parent from deck.v1 Session (roomMeta). The fakes serve a lead and a sub-thread fixture (subThreadAtWork); the e2e specs of the old chips and @ pickers now cover the agent menu and the file pickers, and workflow-shots takes the new screens. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
Step 3 of docs/design/lead-agent-and-subthreads.md, phone part. - Session carries parent_id and lead (optional, absent from an older Deck); the session list puts each sub-thread under its parent with a ↳ (subthreads.ts, now shared with the desktop). - The agents sheet marks the agent the person talks to; "Model" on another agent makes it the lead (models.set). - The composer's pickers are the shared ones: "#" and "@" open files, no picker offers agents. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
Step 3 of docs/design/lead-agent-and-subthreads.md, terminal part. - "@" and "#" open the files popup, as in Claude Code; "$" opens nothing. No popup offers agents: every message goes to the session's lead, which the models dialog (ctrl+l, SetAgentModel) picks. - The Sessions dialog puts each sub-thread under its parent with a ↳, at its depth (nestSessions, from the workspace's rooms). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
The README describes the thread's agent and its menu in place of @ addressing, sub-threads in the desktop, terminal and op table, and agents reaching each other through ops. The design doc is marked built. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
A CLI takes an alias ("opus") or nothing for its default and says which
model that is when a session starts. Deck now remembers what each pick of
each kind ran as (session/slugs.go), stores it with the member, and names
the model by that slug everywhere: the agent chip (SessionLead.slug), the
Agents tab, and the model menus' labels, also for a member that has not
started yet.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
The Agents tab put an agent's leases on one line, cut at the end, so a
long glob lost the part that says which files. Each glob is now a chip
that wraps onto more lines: the folder gives way first (PathTail), a
glob's pattern keeps the folder it is in ("remote/**"), the lease's note
("exclusive") is a marker on the chip, and the whole glob and note are
its title. The overflow test gives an agent long leases and checks every
chip keeps its tail and stays in the agents card (#101).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
Step 3 of docs/design/lead-agent-and-subthreads.md, the terminal's agent chip. - The editor's bottom row shows the session's lead, like the desktop's composer chip: "✻ claude · claude-opus-5-5 · high ctrl+l agent". A named agent shows its name; the model is the slug the CLI runs (Lead.Slug), else the alias. A narrow editor drops the hint first, then cuts the label. Before the session has a lead it shows the default agent, or the pick waiting for the first message. The lead is read off the UI loop (Rooms.Room) on a 2s backstop and on session switches; a pick is written through and holds reads off until SetAgentModel returns. - ctrl+l opens the Agent picker: the kinds and named agents first, the current one marked, then that agent's models and efforts, reusing the model dialog's steps (esc/⌫ step back). The pick goes through SetAgentModel, a named agent by its name. With no session yet, the first message starts the session with the pick before it is sent. - Help and the palette say "agent"; /profiles points at ctrl+l. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
A lead's brief and follow-ups to a sub-thread (thread.open, thread.post) were posted under the parent agent's name, but reached the clients as a plain user message: the desktop and phone drew them as the person's bubble, and the workspace stored no row for them at all. - session: the brief's entry carries Via "subthread" (postFrom takes a via), and EventMsg.From names the agent for such user messages. - workspace: onBrief stores it as a user row whose Model is the agent, not editable; the adapter hands it on as wire Message.Agent. No proto change: Message.agent already exists. - phone: briefOf (subthreads.ts, shared with the desktop) reads the agent, the parent thread's title and the brief without Deck's "[deck] ..." line; MessageView shows it as the agent's card, "From claude · <thread>". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
… reply Two timeline fixes from docs/design/lead-agent-and-subthreads.md. A sub-thread's brief (a user message that names its agent, briefOf) is a card on the sheet, "From claude-1 · <parent thread>", the parent's title a link back to it; Deck's "[deck] ..." line to the agent folds away. Nobody edits it, and the answer to it gets no Retry: there is nothing of the person's to send again. Subagents agent.spawn started fold under their parent's reply like the CLI-native ones: buildTurns takes who an agent's parent is (the agents tree, subsOf now lists spawned subagents too), and SubTurn shows a spawned one in its own hue with its kind, what it was asked while it runs and what it found once it ended (subTasks, firstLine), how it stands (subStanding), and opens to its words and reports. The lanes strip counts peers only: a room of one lead and its subagents has none; rooms of several members and shared rooms keep it. e2e: subagents.spec covers both; workflow-shots takes the brief and the cards; the fake's sub-threads get a tree of their own, and the picker test no longer leans on the strip in a one-agent room. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
…mode Issue #103, items 3-6, in the engine: - Structured hand-offs (handcontract.go). thread.send takes objective, deliverable, boundaries and check besides done_when; an objective with no task named becomes a new task the recipient owns. Only a hand-off starts the recipient's turn: a plain message to a peer is logged inert, for its next briefing, and spends no hop. Messages along the line of command (to one's subagents, to the member one works for) and answers (to the peer whose message started the sender's turn, or who waits on a file) still wake. The briefing teaches the contract form. - Done needs evidence (evidence.go). A task can name a check (task.create, agent.spawn, the hand-off's contract). Deck records each member's edits and command runs; a checked task becomes done only when the newest run of its check by its workers since their last edit exited 0. The verdict is taken at the end of the reporting turn, when all of its events have been read (an op can overtake the buffered result of the command run just before it). Without evidence the task goes to review, Deck sends it back to its owner, and after MaxReviewChanges rounds it is blocked. - Turn ends (turnend.go). Every turn_done carries agent.TurnEnd: done, handoff, blocked or continue, from the ops the turn ran, the claims it made, the task its reply settles, and whether the lead ends asking the user. A question to a peer is redirected to the user (a notice), and the turn ends blocked. The log keeps it (store entryHead). - Factory mode: at orchestration full only the lead routes; other members may thread.send the lead and their own parent or subagents only. Tests of relay mechanics (hops, pauses, queues, pools, repeats) now set up a line of command between their two agents (worksFor); the demo duo hands its review over under a contract. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
The turn end (done, handoff, blocked, continue) rides from the turn_done event onto the turn's finish part (message.Finish.TurnEnd), then to wire.Message.turn_end, proto Message.turn_end (field 11, regenerated with buf) and the phone's and desktop's message types, so the clients can show state rather than prose. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
README: only a contract hand-off starts another agent's turn, questions go to the user, how a turn ended, done needs a passing check, and at orchestration full only the lead routes; the thread.send row of the ops table gives the contract form. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
Report-backs (#103 item 1). A task's report, and a sub-thread's, is logged and shown at once, but the member it goes to is woken only when the last of what it handed out (running or in-review tasks, sub-threads working on its asks) has ended, and not while it is in a turn of its own. A failure or a block wakes it at once, naming what still runs. A held report is an inert relay that the release makes live; with several, the wake starts with one line listing them (batch.go). askSub now posts and records the ask on the sub-thread's relay worker, so a lead that answers at once can no longer end its turn before the ask is recorded and lose its report. Stalls (#103 item 2). Each turn the agents start is judged when it ends: a file or task change clears the ledger, a command keeps it from counting as idle. At the level's MaxStalls (3) near-identical messages, two members alternating 2N turns, or N idle turns in a row pause the thread with the reason; at full (Replan) the lead is first asked once to re-plan. Turns the person starts never count, and their message or Continue clears it (stall.go). max_stalls and replan are level fields; 0 in an override is the level's own. TestHopLimitPausesAndContinueReleases raises max_stalls: its six turns of talk would now stall at three. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
Two sub-threads that report at once, each on its own relay worker, could each see the other still working and both hold their report, so the parent agent was never woken. The decision to hold or release (with the asks it takes off and the sub-threads it counts) now runs under one lock, taken before any thread's and never held while delivering. The stall tests no longer depend on how far turns already under way get before a pause lands, or on whether the lead reads a re-plan request before a second stall. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
Since plain messages between peers no longer start turns (handcontract.go), the stall tests' two agents work for each other, as the relay tests do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
The window and the dock already name the app; the sidebar's mark and name read as a second logo next to the chat. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
A pure model for a tmux-like room: splits of rows and columns whose leaves are stacks of tabbed panes (the conversation, terminals, the side panel's views). Dock a pane on a stack's edge or middle or on the room's edge, split a pane with a new terminal, close, zoom, hide, resize, the presets (Default, Terminal below, Terminal right, Focus, Review), and a check of a saved layout that mends what it can and refuses the rest, so a broken or older one gives Default. The store keeps one layout for every project and a project's own, in localStorage. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
The room is now a Workspace of panes laid out by the layout tree. Drag a tab (or the conversation's top bar) onto another pane's edge to split it or onto its middle to join its tabs, with a drop zone that says where it goes; drag or key the gaps to resize; split a pane with a new terminal (Ctrl/Cmd+Shift+\ right, Ctrl/Cmd+Shift+- down), zoom it (Ctrl/Cmd+Shift+M) and move between panes (Ctrl/Cmd+Shift+[ and ]). Each terminal is a pane with a shell of its own; the old drawer's tabs, ports and Stop live on its tabs. The side panel's views are panes too; its toggle, Diff, the terminal button and the palette show and hide them as before. Content renders once into a host that moves between stacks, so a moved pane keeps its state. The Layout menu in the room's header has the presets, shows or hides each pane, keeps a layout for this project only, and resets. Where the panes cannot fit at their least width, the ones beside the conversation float over it below its toolbar, as the side panel did in a narrow window. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
The composer addressed agents with $name chips and its placeholder said "@ an agent". It now shows the one agent every message goes to, with the model it runs, and opens the agents sheet to change it. dist/ is rebuilt; it was stale since the earlier phone changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
The terminal app had a theme of its own (graphite and mint) while the
desktop app wears Apple's colours, so the two read as different products.
Deck's palette (internal/ui/tone) is now the desktop's default look,
Liquid Glass on Apple's system colours (desktop-shell styles.css), for
dark and light: the near-black or white canvas, hairlines, the text,
muted and faint levels, the system blue as the one accent, the states,
Xcode's code colours, and the agents' tints (claude #ff9f5a, codex
#a1a1a6, ...) the desktop gives each kind. The deck and deck-light themes
are built from it, and the colours drawn outside a theme (git checks and
lanes, usage charts, the wordmark, the default diff view, the CLI's
listings) read from it too; the old palette's names stay for theme files.
With no theme configured Deck follows the terminal, as the desktop
follows the system: it asks the terminal's background once before the TUI
starts and takes deck-light on a light one. active_theme still wins.
The parts that differed in shape now look as the desktop draws them:
hand-offs ("→ $codex") and task reports are rounded hairline cards with
"to" and the recipients in their tints and the task's state on the
right; a subagent call (Task, Agent, agent.spawn) is a "↳" card with its
state and the start of its report; dialogs have a hairline frame and a
hairline after the title, and a quiet fill for the chosen row; the
composer's agent line has the name in the text colour and the model
muted; status messages and toasts sit on a surface with only the badge
or icon in the state's colour. Golden files follow the new colours.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
Every image (and video) attached to a message carries a label the person
gave it. Adapters send each attachment right after a reference line
("[Image 1: login page error]", "[Video 1: the crash]"), so the agent can
tell them apart and the person can write "compare Image 1 and Image 2".
The label is stored with the thread's entry and the message, and shown in
the timeline.
Video: adapters that can deliver one implement agent.VideoInput, and
ModelInfo.Video says which models take it. Of today's CLIs only OpenCode
does (an ACP resource_link to the file, which it passes on to models whose
inputs list video): Deck claims it for Gemini chat models. A member whose
model takes no video is told where the file is instead. A session lead
says whether its model takes video (SessionLead.video), so clients offer
video only then.
Videos are checked by their bytes (MP4, WebM, QuickTime), at most 50 MB,
and kept under Deck's data dir (.deck/media/<session>), removed with the
session. The desktop sends one as bytes or as a local path; the phone
uploads it in 4 MB chunks (media.upload, at most 25 MB, held in memory
until chat.send names it). "Send as frames" turns a video into up to 8
evenly spaced stills (at most 1280 px) with ffmpeg, labelled "Video 1 ·
0:03", where the engine has it (capability VideoFrames, feature
video_frames).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
The system orange (#ff9500) is too pale to read as text on the light canvas, and a terminal draws warnings and the approval toast as text, so deck-light takes the desktop's --warning-foreground (#c93400) for them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
Every image the person attaches gets a label on its chip: "Screenshot 1"
for a paste, the file's name for a file, else "Image 1". A click (a tap)
renames it: Enter keeps the new label, Esc the old one. The label goes
with the image, and the timeline shows it under the image once sent.
A video (MP4, WebM, QuickTime) attaches the same ways, one per message.
When the room's lead takes video it goes as it is: by its path to a Deck
on this machine (the bridge's filePath), else as its bytes; from the
phone or to a paired Deck it is uploaded first in 3 MB chunks
(media.upload). When the lead cannot watch video, the chip says so
("claude-opus-5-5 can't watch video") and the message is held until the
video is removed or set to "Send as frames", which is disabled with the
reason when the Deck has no ffmpeg.
Limits: 50 MB to a local Deck, 25 MB from the phone or to a paired Deck.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
An image the terminal attaches lands labelled as on the desktop: a clipboard paste is "Screenshot 1", a file its name without the extension. The chip shows the label, and so does a sent message's. A pasted path to an MP4, WebM or QuickTime file attaches a video: checked by its bytes (at most 50 MB) and read by the engine where it is. When the lead's model cannot watch video it goes as frames where ffmpeg is installed, else it is refused with the reason. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
README gains an Images and video section: labels and the reference line the agent sees, which agents take video and how it reaches them, Send as frames, and the limits. The remote contract documents media.upload, the new chat.send fields, the video features and the desktop's Video and VideoFrames capabilities. The phone's held video offers Send as frames under its note, where a narrow screen has room for it, and both clients ask a video preview for a frame. media-shots.spec.ts takes the attachment screenshots (SHOTS). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
themeFor exported the TUI's palette as a theme file writes it, so a colour
of Deck's own palette went out by its name ("canvas", "signal"). The phone
takes only "#rrggbb" and dropped those, which left Deck's default dark
theme mostly unset on the phone. Names now resolve to their hex, and a test
pins the canvas and accent of deck and deck-light, by which the phone knows
Deck's own look.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
The phone had a look of its own: grey fallbacks under the TUI's palette, a solid accent bubble, boxed tool rows and a composer of loose controls. It now wears the desktop's default look (Liquid Glass on Apple's colours), dark and light, adapted to a phone. style.css carries the desktop's tokens under the desktop's names with its values (canvas, surfaces, hairlines, text, muted and faint, the system blue, the states, diffs, the agents' hues), light under prefers-color-scheme. Deck's own theme (deck, deck-light) is recognised by its canvas and accent (theme.ts deckLook); the controller then sets no palette, tints or scheme, so the phone draws the desktop's colours, light or dark as the phone is set, as the desktop follows the system. A theme of the person's still arrives as --p-* with data-scheme and is mapped onto the same names, so custom themes keep working. theme-color goes back to the canvas the page was built with for Deck's own look. Screens: a translucent toolbar with a chevron back; sessions as the desktop's sidebar rows, the time on the title's line, sub-threads under ↳; the person's turn as the accent-tinted bubble on the right, replies as plain text under the kind's mark and name; hand-offs and task reports as the desktop's hand-off card (the parser moves from desktop-shell to pkg/remote/web/src/handoff.ts, which the desktop re-exports); sub-thread briefs as a card; tool calls as quiet rows, a subagent call as a ↳ line; the composer as one rounded card with attachment chips that scroll, the agent chip in its bottom bar, attach, stop and a round send button; sheets slide up with a grabber; toasts and menus are glass. Touch targets stay 44px, safe areas are kept, motion stops under prefers-reduced-motion, and nothing scrolls sideways at 320 to 430px. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQbdbWm1hT5BaA3KLjKMay
|
To use Codex here, create an environment for this repo. |
|
Important Review skippedToo many files! This PR contains 696 files, which is 596 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. Usage-priced reviews support at most 300 files.
|
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.
What this changes
Deck 2.0. A thread is one agent you talk to, the way Codex or Claude Code works. That agent calls subagents and opens sub-threads itself, and Deck keeps agent teams from looping. The desktop, phone and terminal app now look like one product. Closes #101 and #103.
After merging, release with
git tag v2.0.0 && git push origin v2.0.0, or run Actions → Release withv2.0.0.One agent per thread
@name/$nameno longer address agents; they are plain text.#adds a file and/runs a command.agent.spawn) report to the agent that started them and can't be messaged. On desktop they fold into cards under the lead's reply, and the lanes strip is gone.thread.open,thread.post,thread.children) are threads of their own, listed under their parent in every client. You can talk to their agent, and they report back only on turns their parent asked for. Their brief shows as a card from the agent that opened it.claude-opus-5-5, instead of an alias like "opus" or "Default".Agent teams that don't loop (#103)
max_turns). At the limit Deck pauses until you write.max_stalls). Atfull, the first stall asks the lead to re-plan instead.objective/deliverable/done_when/boundaries/check. Anything else is passed along as information.checkmoves to done only after a passing run of that check since the last change. Otherwise it goes to review, with bounded rounds.full): workers report to the lead, which decides who works next.Images and video
[Image 1: login page error].resource_link. For other models it is greyed out with the reason, or you can Send as frames: up to 8 labelled stills made with ffmpeg where Deck runs. The limit is 50 MB on desktop and terminal and 25 MB on the phone, sent in chunks withmedia.upload. Videos are stored in.deck/media/.Desktop
@namehints are gone.Phone
$namechips are gone.dist/anddist-hosted/are rebuilt with bun 1.4.2, the version CI uses.Terminal app
active_themestill wins). Hand-offs and subagent calls show as rounded cards.✻ claude · claude-opus-5-5 · high ctrl+l agent).ctrl+lpicks the agent, then its model and effort.API and storage
deck.v1:Session.parent_idandSession.lead(SessionLead, withslugandvideo).CreateSessionRequest.parent_id.Message.turn_end.store.ThreadgainsLead,Parent,ParentAgentandAsks.store.MembergainsRunning(the model slug). Contracts gaincheck.Checklist
go build ./...,go vet ./...andgo test ./...pass.internal/deck/peerTestControlPairWithRunningDecksometimes times out under load; it passes when run alone, and nothing here changes it.gofmt -l .prints nothing (checked with the go1.27 toolchain's gofmt)docs/design/lead-agent-and-subthreads.md(accepted and built);docs/design/agents-and-mentions.mdmarked superseded;docs/remote-contract.mdinternal/guardpasses unchangedDesktop:
npm run lint, vitest 845 passed, Playwright 122 passed (electron/packaged/bench specs excluded). Phone: typecheck, biome,bun test645 passed, andverify-distpasses fordist/anddist-hosted/.Notes for the reviewer
@codexin a message no longer routes anywhere, and plain peer-to-peerthread.sendno longer wakes the recipient unless it carries a hand-off contract. About 13 relay tests now set up a parent link (worksFor) so their sends still wake.TestHopLimitPausesAndContinueReleasesraisesmax_stalls, because its six idle exchanges now stall at three by design.task.doneis decided when the turn ends, not at the moment the op runs. Adapters buffer events, so the op could otherwise overtake the result of the command run just before it. Evidence is kept in memory, so after a restart the check must pass again.CmdOrCtrl+-) and the Mac traffic-light padding are unchecked.turn_endyet.t.scheduledinManager.Resume. It was there before this branch and shows up a few times per hundred-raceruns.Generated by Claude Code