<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Code Review on TorchTree</title>
        <link>https://torchtree.com/en/tags/code-review/</link>
        <description>Recent content in Code Review on TorchTree</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en</language>
        <copyright>TorchTree Co., Ltd.</copyright>
        <lastBuildDate>Sun, 29 Nov 2026 14:30:33 +0800</lastBuildDate><atom:link href="https://torchtree.com/en/tags/code-review/index.xml" rel="self" type="application/rss+xml" /><item>
        <title>How to Keep Your Judgment When Using AI Agents</title>
        <link>https://torchtree.com/en/post/agent-critical-thinking/</link>
        <pubDate>Sun, 29 Nov 2026 14:30:33 +0800</pubDate>
        
        <guid>https://torchtree.com/en/post/agent-critical-thinking/</guid>
        <description>&lt;p&gt;An AI agent can research a question, change code, run tests, and return a completion report. A complete-looking report may leave out assumptions that were never checked or users affected by the change. The person accepting the work still needs to judge whether it solves the right problem and whether the evidence supports delivery.&lt;/p&gt;
&lt;p&gt;In “&lt;a class=&#34;link&#34; href=&#34;https://x.com/addyosmani/status/2117512471930167377&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Critical thinking when agents do the work&lt;/a&gt;,” engineer Addy Osmani suggests building that judgment into everyday work: define the goal and limits up front, then examine the evidence and consequential decisions. The depth of review depends on the cost of error. Research synthesis and code changes offer examples of how to apply the approach.&lt;/p&gt;
&lt;h2 id=&#34;delegation-and-judgment&#34;&gt;Delegation and judgment
&lt;/h2&gt;&lt;p&gt;Osmani describes three ways of handling an agent&amp;rsquo;s output. &lt;strong&gt;Cognitive offloading&lt;/strong&gt; delegates execution while retaining responsibility for checking the result. &lt;strong&gt;Deferral&lt;/strong&gt; treats the tool&amp;rsquo;s conclusion as a premise for the next step, rather than as a hypothesis to test. &lt;strong&gt;Cognitive surrender&lt;/strong&gt; accepts the output without seeing a need to check it. This spectrum is Osmani&amp;rsquo;s account of working with agents; Steven Shaw and Gideon Nave use the term cognitive surrender in their research.&lt;/p&gt;
&lt;pre class=&#34;mermaid&#34;&gt;flowchart LR
  A[&amp;#34;Judgment when using tools&amp;#34;] --- B[&amp;#34;Cognitive offloading&amp;lt;br/&amp;gt;Delegate, verify, own result&amp;#34;]
  A --- C[&amp;#34;Deferral&amp;lt;br/&amp;gt;Output becomes a premise&amp;#34;]
  A --- D[&amp;#34;Cognitive surrender&amp;lt;br/&amp;gt;Accept without checking&amp;#34;]
  classDef root fill:#e8f1ff,stroke:#6683a1,color:#172b45
  classDef review fill:#e6f4e9,stroke:#6d9276,color:#193a25
  classDef deferred fill:#fff2db,stroke:#a28246,color:#4a3212
  classDef surrender fill:#fae9e9,stroke:#ad7b7b,color:#512020
  class A root
  class B review
  class C deferred
  class D surrender
  linkStyle default stroke:#9aabba,stroke-width:1px&lt;/pre&gt;
&lt;p&gt;Consider an agent that summarizes customer interviews and reports that “most users want an export feature.” A product team can delegate the summary while checking the interviews before planning: how many people asked, and did they raise it independently or in response to a leading question? If the claim goes straight into a specification and another agent designs the feature, an unchecked judgment becomes a premise for subsequent work. If the team no longer sees a need to check the interviews, that is what Osmani calls cognitive surrender.&lt;/p&gt;
&lt;p&gt;The appropriate depth of review depends on consequences. A recommendation among similarly rated hotels may warrant little scrutiny. A production data migration requires more: the affected data, the evidence that the migration works, and the conditions for rollback. Reversibility and impact help determine how much to delegate and how much to verify.&lt;/p&gt;
&lt;h2 id=&#34;define-the-goal-and-constraints&#34;&gt;Define the goal and constraints
&lt;/h2&gt;&lt;p&gt;An agent has to fill gaps in a vague request. “Fix checkout” leaves open what behavior may change and what completion means. A more useful request could specify the failed coupon submission, require existing payment defaults to remain unchanged, and call for checks with a valid coupon, an invalid coupon, and no coupon. If the investigation reveals conflicting requirements or a wider impact, the task can then be adjusted.&lt;/p&gt;
&lt;p&gt;Osmani calls unstated goals, constraints, and rationale &lt;strong&gt;intent debt&lt;/strong&gt;. Software engineering researcher Margaret-Anne Storey also uses the term to describe the absence of explicit goals, constraints, and rationale. Both accounts describe a maintenance problem: when the artifact remains but the reasons for important choices are missing, later changes are harder to assess.&lt;/p&gt;
&lt;p&gt;Before delegating, write down your expectation and uncertainty. If a coupon failure appears to involve time-zone handling, record that hypothesis and ask for the failing request and service logs that could support or contradict it. Change the hypothesis when the evidence calls for it. In an unfamiliar area, ask the agent to identify conditions that need investigation, then check the relevant documentation and system behavior; the list itself may be incomplete.&lt;/p&gt;
&lt;p&gt;When several approaches are possible, ask the agent for a counterargument: under what conditions would the current approach fail, and what alternatives are available? Counterarguments need fact-checking too. Agreement among several models is not a substitute for independent evidence.&lt;/p&gt;
&lt;h2 id=&#34;separate-results-from-evidence&#34;&gt;Separate results from evidence
&lt;/h2&gt;&lt;p&gt;A passing test means that the executed check found no failure within its scope. An implementation and its test can share the same incorrect assumption and pass together. For example, a passing coupon unit test establishes behavior for its inputs and assertions; it does not establish that the live checkout page can submit an order or that the no-coupon path still works.&lt;/p&gt;
&lt;p&gt;Agree on observable completion criteria before work starts. At the end, inspect what the agent ran, what it returned, and which important cases remain unverified. If further review is needed, the loop below shows how to add checks or adjust the approach:&lt;/p&gt;
&lt;pre class=&#34;mermaid&#34;&gt;flowchart TD
  A[Define goal and limits] --&amp;gt; B[Agree on verification]
  B --&amp;gt; C[Agent works and checks]
  C --&amp;gt; D[Review results and evidence]
  D --&amp;gt; E{Important risks covered?}
  E --&amp;gt;|No| F[Add checks or adjust approach]
  F --&amp;gt; C
  E --&amp;gt;|Yes| G[Decide whether to deliver]
  classDef step fill:#f4f7fa,stroke:#9aabba,color:#243647
  classDef decision fill:#e5eef8,stroke:#718aa3,color:#172b45
  classDef done fill:#e9f2ed,stroke:#819b89,color:#193a25
  class A,B,C,D,F step
  class E decision
  class G done&lt;/pre&gt;
&lt;p&gt;If an important risk cannot be checked and no acceptable alternative evidence is available, hold delivery.&lt;/p&gt;
&lt;p&gt;Evidence depends on the task. A code change may require test output and interaction with the running page; research synthesis calls for original material, calculations, and checks of claims that drive the conclusion. A screenshot shows what appeared at a particular moment, not whether every business path works. Running checks and reading their results take time and belong in the task plan.&lt;/p&gt;
&lt;h2 id=&#34;review-the-agents-decisions&#34;&gt;Review the agent&amp;rsquo;s decisions
&lt;/h2&gt;&lt;p&gt;A completion report may summarize the change without identifying every decision made during implementation. Alongside the diff, ask for changed defaults, unhandled inputs, resolutions of conflicting requirements, and checks that were not completed. Compare that account with the actual changes and the relevant calling paths.&lt;/p&gt;
&lt;p&gt;For an unfamiliar section, ask the agent to explain the code, sources, or dependencies, then verify the explanation against the underlying material. Maintainers need not hold a complete model of a large system at all times, but they do need to recognize gaps and acquire enough relevant understanding before making changes. Storey describes the erosion of a team&amp;rsquo;s shared understanding as cognitive debt: when nobody can explain important behavior, changes and debugging can become harder.&lt;/p&gt;
&lt;p&gt;Parallel agents also consume review capacity. Osmani calls the gap between agent output and work a person can responsibly review an “orchestration tax.” If completed work accumulates, reduce the number of high-risk tasks in flight and improve checks that can be automated reliably. Automated evaluation still has a scope: our &lt;a class=&#34;link&#34; href=&#34;https://torchtree.com/en/post/anthropic-harness-design/&#34; &gt;article on Anthropic&amp;rsquo;s long-running coding harness&lt;/a&gt; describes separate generation and evaluation roles, whose results depend on their criteria and coverage.&lt;/p&gt;
&lt;h2 id=&#34;practice-the-skills-needed-for-review&#34;&gt;Practice the skills needed for review
&lt;/h2&gt;&lt;p&gt;Anthropic surveyed 132 of its engineers and researchers in 2025 and interviewed 53 of them. Some expressed concern that using Claude reduced opportunities to solve problems themselves and practice the skills needed to review its code. The report calls this concern the “paradox of supervision.” It is an internal study that includes self-reported experiences, not evidence that everyone using AI will lose skills.&lt;/p&gt;
&lt;p&gt;Choose practice relevant to your responsibilities: a service maintainer might independently investigate an incident, while a writer checks a consequential claim before asking an agent to identify omissions. A beginner might explain a proposed solution first and then seek feedback from an experienced colleague or an agent. The frequency and scope should reflect the work and the cost of error.&lt;/p&gt;
&lt;p&gt;Two questions provide a starting point: before delegating, what would count as completion? After receiving the result, which important cases remain unchecked? The answers depend on the task and help determine whether to investigate further or deliver.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Source note: This article draws on Addy Osmani&amp;rsquo;s November 3, 2026 piece, with additional context from Storey&amp;rsquo;s paper abstract and Anthropic&amp;rsquo;s internal research. The examples illustrate the methods and are not reported tests. The original post was compared with an archived English mirror. Checked November 29, 2026.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;p&gt;&lt;strong&gt;Sources&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://x.com/addyosmani/status/2117512471930167377&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Critical thinking when agents do the work&lt;/a&gt; (Addy Osmani, 2026-11-03)&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://papers.ssrn.com/sol3/papers.cfm?abstract_id=6097646&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Thinking—Fast, Slow, and Artificial: How AI is Reshaping Human Reasoning and the Rise of Cognitive Surrender&lt;/a&gt; (Steven D. Shaw and Gideon Nave, 2026)&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://arxiv.org/abs/2603.22106&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;From Technical Debt to Cognitive and Intent Debt&lt;/a&gt; (Margaret-Anne Storey, 2026-03-23)&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.anthropic.com/research/how-ai-is-transforming-work-at-anthropic&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;How AI is transforming work at Anthropic&lt;/a&gt; (Anthropic, 2025-12-02)&lt;/li&gt;
&lt;/ul&gt;
</description>
        </item>
        
    </channel>
</rss>
