Repository navigation
Conversation
task-list --brief capped each spec but still returned every completed task's full result, often a whole worker report already delivered via worker_done. Apply the same whitespace-collapsing, surrogate-safe 160-character cap to result and flag shortened rows with result_truncated. The non-brief listing is unchanged. The CLI client-side fallback now keys on result_truncated, so a newer CLI talking to a spec-only brief runtime still bounds results, and fields a runtime already abbreviated are left untouched. Fixes stablyai#20701
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used📚 Code guidelines (1)No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (8)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughBrief task summaries now cap both specs and string results at 160 characters. The shared helper returns truncation flags for both fields and preserves supplied flags. The CLI applies its abbreviation fallback when a task lacks Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to Brief task listings bound results while full listings retain them, and the shipped guidance reflects the change. No actionable merge blocker remains after normal checks. Security Architecture ReviewSecurity architecture risk: ⚪ Minimal · up to The change reduces report text returned in brief listings without changing task ownership, stored results, or caller authority. Full listings remain available, and compatibility handling preserves existing truncation information. No material security risk was found in the reviewed change. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 6 files. (1 skipped: 1 unsupported.)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Bound
resultunder--brief—abbreviateOrchestrationTasksnow abbreviatesresultthrough the sameabbreviateTextpath asspec, adding a stableresult_truncatedboolean to every brief row while leaving non-brief rows untouched. - Idempotent pass-through — a field already marked by a runtime (
spec_truncated/result_truncatedpresent) is kept verbatim, so the client fallback no longer re-collapses an already-capped spec. - CLI fallback re-keyed —
task-handlers.tsnow triggers client-side abbreviation whenresult_truncatedis missing instead ofspec_truncated, so a newer CLI bounds results against a spec-only runtime while preserving that runtime's spec. - Docs + regenerated bundle — CLI spec note, coordinator-loop reference, and
bundled-skill-guides.tsnow say "specs and results".
Compatibility across all CLI/runtime version mixes checks out: old CLI suppresses its fallback (spec flag present) and ignores the new boolean; new CLI against a pre-brief runtime still caps both. No renderer or mobile consumer reads these fields. Each new test fails on pre-change main, so the coverage is real.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
|
Thanks for digging into this and for the careful mixed-version handling in the fallback. Since this PR was opened, #36622 changed |

ELI5
A coordinator can ask for the short version of its task list (
task-list --brief). Each task's description was already shortened in that view, but each finished task's full report still came back. So the "short" list could still run to tens of kilobytes. Now the report is shortened the same way as the description, and a flag says when it was cut. The full list still returns everything.What Changed
orca orchestration task-list --brief --jsoncapped each task'sspecat 160 characters but returned every completed task'sresultin full. Those results are often whole worker reports thatworker_donealready delivered. The issue measured 51 KB ofresulttext in one 39-task brief listing.--brief,resultgets the same treatment asspec. Whitespace is collapsed and the text is capped at 160 characters with a trailing…. The cut never splits a surrogate pair. Each row carries a newresult_truncatedboolean. Anullresult staysnullwithresult_truncated: false. Without--brief, rows are unchanged and full results come back as before.abbreviateOrchestrationTaskshelper (src/shared/orchestration-task-summary.ts) tobrieflistings. It now abbreviatesresultthrough the sameabbreviateTextpath it uses forspec. A field that a runtime has already marked (spec_truncatedorresult_truncatedpresent) passes through unchanged, so applying the helper twice is safe.task-listnow runs whenresult_truncatedis missing, instead of whenspec_truncatedis missing. A newer CLI talking to a runtime that abbreviates only specs therefore still bounds results. It keeps that runtime's spec andspec_truncatedas they are.task-listhelp note and the coordinator-loop reference in the orchestration skill guide now say "spec and result".src/cli/bundled-skill-guides.tsis regenerated from the guide withpnpm run generate:bundled-skill-guides.Why
The issue asks to bound or omit
resultunder--brief, with explicit truncation metadata. Full results must stay available in the non-brief response, and older clients and runtimes must keep working.result_truncatedtells it when to drop--briefand read the full text.briefparameter. It keeps--briefcheap over SSH and relay links instead of sending text the client throws away.--omit-resultsflag would add CLI surface for something--briefalready means. A larger cap for results would make the brief view inconsistent and would still grow with the size of the run.Linked Issue
Fixes #20701
Visual Proof
N/A: no visual change. This affects the CLI's
--briefJSON and text output and the runtime RPC response. Text mode never printsresult, and no renderer code changes.Testing
Tested on Linux x64 with Node 24. Every new test fails on current
mainand passes with this change (8 failed and 36 passed before; 44 of 44 passed after, in the three files below):src/shared/orchestration-task-summary.test.ts: a 10 KB result is capped to 160 characters and flagged. Null and short results stay untruncated. No lone surrogate is left at the cut. Fields a runtime already abbreviated are left untouched. The two existing exact-shape assertions now also includeresult_truncated: false.src/cli/handlers/orchestration-task-list-brief.test.ts: a runtime that abbreviates only specs gets its results capped on the client, and its spec is kept. Fully abbreviated server rows still pass through as the same object.src/main/runtime/rpc/methods/orchestration/runs/tasks-dispatch.test.ts: through the real RPC method and database, a completed task's 10 KB result is bounded underbrief. A task that has not started keepsresult: null. The non-brief listing returns the full result with noresult_truncatedkey.Local checks on this branch:
pnpm lint: passes (all 17 steps, including the type-aware oxlint step andverify:bundled-skill-guides).pnpm typecheck: the CLI and web projects pass at full size. The node project needs more than the 8 GB memory limit of the test machine. It was checked through the changed files and their full import graph (about 5,500 source files) and passes.pnpm test: 135 test files pass, 1,246 tests with 0 failed. They are the three files above plus their neighbours: the CLI orchestration handlers, CLI specs and skills, the shared orchestration helpers, all orchestration RPC methods and the skill-guide scripts. The full suite was not run locally.pnpm build: not run locally.CI will run the full suites.
AI Disclosure
Claude Opus 5.5 (claude-opus-5-5), Anthropic. An AI coding agent wrote the change, the tests and this description. The account owner approved posting it.
Review
AI coding-agent review summary:
Cross-platform: pure string handling in shared TypeScript. No paths, shells or platform APIs are involved, so it behaves the same on macOS, Linux and Windows.
SSH/remote/local: truncation happens in the runtime that owns the data, so remote and relay clients receive the smaller payload. With mixed versions:
briefis an opt-in summary request, and the full listing does not change. No other caller sendsbrief; worker settlement uses the full listing.Agent and integration compatibility: provider-neutral. An agent that needs full results runs
task-listwithout--brief, as the help text and skill guide now say.Performance: one regex and one slice per row, only when
--briefis requested. Brief responses get smaller.UI: not applicable; no renderer changes.
Security: no new inputs, outputs or privileges. The cut never splits a surrogate pair, so strict JSON consumers never receive malformed UTF-16.
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Not applicable: the only skill-guide change is one paragraph of Orca's own orchestration reference, and its regenerated bundle.
Notes
resultsizes in the issue come from a native Windows run of 1.4.201. This change was tested on Linux; the logic has no platform-specific code.result_truncatedis always present on brief rows, so the keys of the brief JSON stay stable (see Stabilize JSON key names across worker-list / worker-start / dispatch / task-create #20567).Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)