[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-732954-105":59,"doc-detail-732954-en":130,"doc-similar-732954":168},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","modern-ai-systems-agents-and-system-optimizations-agent-from-a-users-perspective-i-how-claude-code-works","Modern AI Systems: Agents and System Optimizations - Agent From a User’s Perspective I - How Claude Code Works","","Modern AI Systems: Agents and System Optimizations explains how Claude Code operates from a user’s perspective, using an agentic loop that converts a single prompt into many model calls and tool executions. It covers how context is assembled before typing, including system instructions, project environment, persistent memory, and available tools/skills. The workflow details how the model proposes actions, the harness executes them with permission checks, and tool results return into the model context for repeated, conditioned steps.",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":40,"@type":76,"position":81},"https://docshare.wps.com/document/research-report/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/modern-ai-systems-agents-and-system-optimizations-agent-from-a-users-perspective-i-how-claude-code-works/732954/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/modern-ai-systems-agents-and-system-optimizations-agent-from-a-users-perspective-i-how-claude-code-works/732954.png","ImageObject",300,407,{"name":92,"@type":93},"Malam Tenang","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-27","2026-11-22",true,{"@type":102,"interactionType":103,"userInteractionCount":19},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"How does Claude Code turn a user prompt into work?","Question",{"text":112,"@type":113},"A single user prompt triggers an agentic loop with multiple model calls and tool executions, where each step depends on the previous tool result.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"What context is available before the first keystroke?",{"text":117,"@type":113},"Before typing, Claude Code already has system instructions, project environment details, persistent memory, and tool/skill names and descriptions in its context.",{"name":119,"@type":110,"acceptedAnswer":120},"What role does the harness play in Claude Code?",{"text":121,"@type":113},"The model proposes an action, and the harness resolves the requested tool, checks permissions, executes it on the user’s machine, and feeds the tool result back into the model context.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},732954,1795383063,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":39,"category_name":40,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":19,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":139,"language":140,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":67,"update_tm":129,"read_time":144,"preview_page_count":29,"preview_urls":145},962093532863,"https://ap-avatar.wpscdn.com/davatar_276721f389ce27ea32af1340a28f341c","Modern AI Systems: Agents and System Optimizations  \nAgent From a User’s Perspective I: How Claude Code Works  \nJuncheng Yang  \nSchedule update  \nLLM background moves later  \n• Treat the LLM as a magic reasoning box for now  \n• You don't need the internals to learn agent  \nMore agent, less GPU  \n• Most of you are more interested in agents  \n• Two extra lectures on agent design  \n• Fewer GPU lectures—less overlap with other courses  \nWhat changed on the schedule  \n• No mandatory paper presentation  \n• Score goes to participation and project  \n• Assignment 1 sharing is now a bonus  \n• A few bonus paper discussions—TBA  \n Harvard Madsys · [course.agentic-system.org](course.agentic-system.org) 2  \nA few more logistics  \nNew TF: Advaith Ravishankar  \nParticipation score: ask / answer question in class Up to 1 point each class, find TF after class Extra reading: optional  \nHands up = score  \nOPTIONAL—extra reading, not required  \nADVANCED—skim, or read more on your own  \n Harvard Madsys · [course.agentic-system.org](course.agentic-system.org) 3  \nPlan for today  \n• How Claude Code works  \n• Claude Code: from stateless LLM to an agent  \n• Memory  \n• Tools, skills, hooks, plugins  \n Harvard Madsys · [course.agentic-system.org](course.agentic-system.org) 4  \nHands up = score  \nWhat happens when you type a prompt into  \nClaude Code?  \n Harvard Madsys · [course.agentic-system.org](course.agentic-system.org) 5  \nThe Agentic Loop  \nOne user prompt = many model calls and many tool executions, not a single request .  \n1 Gather context  \nprompt, files, tool results  \n2 Generate action  \nrun a tool: bash, read, edit  \n3 Run tool  \ntests, output, re-read state  \nrepeat—every step conditioned on what the last one returned  \n harness  model  your machine  \n Harvard Madsys · [course.agentic-system.org](course.agentic-system.org) 6  \nContext Before You Type  \nBefore your first keystroke, the context size is already 10+k tokens  \nSYSTEM Claude Code instructions  \nPROJECT environment  \nMEMORY [persistent project / user notes / CLAUDE. md](persistent project / user notes / CLAUDE. md)  \nTOOLS Read, Edit, Bash, Glob, Grep, Web, Agent  \nSKILLS / MCP names and descriptions  \nUSER “Fix the failing auth test”  \nSkill and MCP entries start as names only—the full text loads when Claude actually reaches for them .  \n Harvard Madsys · [course.agentic-system.org](course.agentic-system.org) 7  \nModel Proposes and then Harness Executes  \nThe model proposes for an action and the harness executes it  \nClaude model  \nemits a request: Bash(“pytest”)  \nClaude Code harness  \nresolves it, checks permissions, executes  \nYour machine  \npytest actually runs → stdout / stderr  \ntool_result  \ngoes back into the model’s context  \n Harvard Madsys · [course.agentic-system.org](course.agentic-system.org) 9  \nOne User Prompt Triggers Many LLM Inferences  \nOne user turn expands into an alternating chain of inference and tool execution .  \nprompt inference tool inference tool inference answer  \nWhat that looked like in practice  \npytest  \nread [session.py](session.py)  \ngrep create_session  \nedit [session.py](session.py)  \npytest  \nall green  \nEvery request is conditioned on the previous inference and the previous tool result .  \n Harvard Madsys · [course.agentic-system.org](course.agentic-system.org) 10","cbCaihrW1Irulfi7","https://ap.wps.com/l/cbCaihrW1Irulfi7","pdf",628526,53,"English","# Agent From a User’s Perspective I - How Claude Code Works\n## Schedule update\n## Plan for today\n## What happens when you type a prompt into Claude Code?\n## The Agentic Loop\n## Context Before You Type\n## Model Proposes and then Harness Executes\n## One User Prompt Triggers Many LLM Inferences","[{\"question\":\"How does Claude Code turn a user prompt into work?\",\"answer\":\"A single user prompt triggers an agentic loop with multiple model calls and tool executions, where each step depends on the previous tool result.\"},{\"question\":\"What context is available before the first keystroke?\",\"answer\":\"Before typing, Claude Code already has system instructions, project environment details, persistent memory, and tool/skill names and descriptions in its context.\"},{\"question\":\"What role does the harness play in Claude Code?\",\"answer\":\"The model proposes an action, and the harness resolves the requested tool, checks permissions, executes it on the user’s machine, and feeds the tool result back into the model context.\"}]","Modern AI Systems: Agents and System Optimizations - Agent From a User’s Perspective I - How Claude Code Works | PDF",134,[146,150,153,157,160,164],{"page_no":8,"url":147,"width":148,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-22/e29aa2903e3e1574bb39da95acfb5529.webp",983,552,{"page_no":14,"url":151,"width":152,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-22/0d20489461eb9ec715104bd92d7425fc.webp",982,{"page_no":81,"url":154,"width":155,"height":156},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-22/6c53aa1f1fc4a72d3cff36d1741e6503.webp",981,551,{"page_no":19,"url":158,"width":159,"height":156},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-22/ca53276f2025fd67640b1bd46df3ecbb.webp",980,{"page_no":24,"url":161,"width":162,"height":163},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-22/54c15db7f1fb3638722e9fcfd0e4c29f.webp",979,550,{"page_no":29,"url":165,"width":166,"height":167},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-22/c0510b58fdd440f5bf7c8b4653e40339.webp",978,549,{"list":169,"token":66},[170,177,183,188,194,200,207,213,220,225],{"doc_id":171,"doc_title":172,"file_type":137,"home_preview_img_url":173,"slug":174,"view_count":175,"category_name":40,"create_tm":176},82235,"Scoped Verification for Reliable Long-Horizon Agentic Context Evolution under Distribution Shift","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229808724140/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110139&Signature=AaRJDjA%2Bevta6TXSuv0jPHnUMrc%3D","scoped-verification-for-reliable-long-horizon-agentic-context-evolution-under-distribution-shift",31,1784179024,{"doc_id":178,"doc_title":179,"file_type":137,"home_preview_img_url":180,"slug":181,"view_count":14,"category_name":40,"create_tm":182},699339,"Dive into Claude Code - The Design Space of Today’s and Future AI Agent Systems","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230009991477/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110139&Signature=Y%2F0WSdA7sEho7Hi0vLodFJh%2FR1A%3D","dive-into-claude-code-the-design-space-of-todays-and-future-ai-agent-systems-699339",1794464930,{"doc_id":184,"doc_title":179,"file_type":137,"home_preview_img_url":185,"slug":186,"view_count":29,"category_name":40,"create_tm":187},696838,"https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230009178488/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110139&Signature=BJHePz9FnT8BeL%2FX9TGg4VsTlHI%3D","dive-into-claude-code-the-design-space-of-todays-and-future-ai-agent-systems",1794435029,{"doc_id":189,"doc_title":190,"file_type":137,"home_preview_img_url":191,"slug":192,"view_count":34,"category_name":40,"create_tm":193},687632,"Claude Opus 4.6 System Card - System","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230001263023/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110139&Signature=ul%2FycdSbdvDsT%2FQ4B7Ta1yqUK5o%3D","claude-opus-46-system-card-system",1794084365,{"doc_id":195,"doc_title":196,"file_type":137,"home_preview_img_url":197,"slug":198,"view_count":52,"category_name":40,"create_tm":199},698659,"System Card: Claude Sonnet 4.5 - Changelog - October 10, 2025","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230010391369/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110139&Signature=97R5%2BfeSBSL91FrdoFtobifni%2FU%3D","system-card-claude-sonnet-45-changelog-october-10-2025",1794454323,{"doc_id":201,"doc_title":202,"file_type":137,"home_preview_img_url":203,"slug":204,"view_count":205,"category_name":40,"create_tm":206},85318,"Agentic Routing: The Harness-Native Data Flywheel","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229809300985/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110139&Signature=Vr%2FNP%2FHEsxX3nf4PZGfoN8vYi3A%3D","agentic-routing-the-harness-native-data-flywheel",38,1784202456,{"doc_id":208,"doc_title":209,"file_type":137,"home_preview_img_url":210,"slug":211,"view_count":81,"category_name":40,"create_tm":212},733024,"Agentic Workflows for RTL code Generation - Graduation Session October 2026","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230031782550/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110139&Signature=xmur0c2wgSGKXMeuuNwDpoTnQR0%3D","agentic-workflows-for-rtl-code-generation-graduation-session-october-2026",1795383350,{"doc_id":214,"doc_title":215,"file_type":137,"home_preview_img_url":216,"slug":217,"view_count":218,"category_name":40,"create_tm":219},392004,"Claude Opus 5.5 System Card - September 22, 2026","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229917718259/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110139&Signature=3%2FigY7omLKnWZUis8OzJJG4TQg4%3D","claude-opus-55-system-card-september-22-2026",43,1790361452,{"doc_id":221,"doc_title":179,"file_type":137,"home_preview_img_url":222,"slug":223,"view_count":24,"category_name":40,"create_tm":224},701273,"https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230012064962/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110139&Signature=okcQ8IGo6csZ%2FQMKPps0yMYnA34%3D","dive-into-claude-code-the-design-space-of-todays-and-future-ai-agent-systems-701273",1794525292,{"doc_id":226,"doc_title":227,"file_type":137,"home_preview_img_url":228,"slug":229,"view_count":24,"category_name":40,"create_tm":230},697654,"System Card - Claude Fable 5.2 & Claude Mythos 5.2","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230009834453/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110139&Signature=8BUSXTFG%2By95w2vo4PEcHT1PzXA%3D","system-card-claude-fable-52-claude-mythos-52",1794440799]