AI Website Rebuild Postmortem: A Long Agentic Task Cut Off by the Session Limit

    An independent developer used a new model version and a command-line tool to rebuild a product website from a single instruction, with reasoning effort set to high. The run compared three homepage directions, selected an image-led layout, changed 20 files, and generated about 4,320 lines of code before a five-hour session limit stopped the task at a $52.55 bill. This postmortem covers preparation, execution, interruption, cost breakdown, a two-phase compare-then-implement approach, and cost-control advice.

    Why Rebuild the Website with AI

    Independent developers building overseas products often spend days on the official website. Color palettes, design drafts, and fixing mobile display issues one by one all take effort. This work depends on aesthetic judgment and repeated trial and error; doing it manually is slow and expensive.

    A new model version for complex reasoning and long-running tasks was recently released. The vendor says it generates up to 30% faster than the previous generation, has lower input and output unit prices, and adds a new safety evaluation mechanism. The author’s website-generator project site had long needed a refresh, so the author used it for a real test. The author ran a command-line tool in the terminal, set reasoning effort to high, issued a single task, and asked it to rebuild the site to the standard of international design-award-winning websites, with no manual intervention throughout.

    This article is a postmortem of that long task, focusing on the interruption during execution and on how to split tasks and control costs.

    Preparation Before Starting

    Environment checklist

    Before starting, confirm the following. The author’s approach was:

    • Install the command-line tool and record the version number. The author used 2.1.322.
    • Enter the project directory and start the tool; confirm it has read and write access to that directory.
    • Confirm the current model. The author used the new model version, with the default reasoning effort set to medium.
    • Confirm the billing method, including whether fast mode was enabled.
    • Make a complete git commit of the existing code to record the state before changes.

    How to set reasoning effort

    After startup, enter /effort high to raise reasoning effort from medium to high. The status bar shows the current model and effort level.

    The higher the reasoning effort, the more thoroughly the model thinks at each step and the more self-checks it performs, but the more tokens it consumes. It cannot replace a clear task description. A full-site rebuild requires strong reasoning and self-checking, so the author chose high.

    The model also offers an optional fast mode. The vendor says it can increase generation speed by 1.5 to 2.5 times, but the unit price doubles. The author did not enable it. This task involved reading many files, changing styles, and running tests; the speed gain had limited value, while the doubled cost was very real.

    Actual Execution

    Issuing the task in one sentence

    The author sent only one sentence, roughly: this codebase is yours; rebuild the official website autonomously to the standard of international design-award-winning websites, and do not ask questions midway.

    After receiving the task, the model first scans the directory structure, determines the tech stack, reads build and deployment configuration files, then opens existing page templates and evaluates the visual style. It must decide where the entry files are, which components are shared across multiple pages, and which style variables need unified changes.

    Comparing three homepage directions

    The model spawned multiple sub-agents to work in parallel. The author recorded three directions:

    • A large banner plus feature display, conveying all information within one screen;
    • Minimalist whitespace plus large-type typography, emphasizing brand character;
    • An image-led editorial layout, mainly images with text as a supplement.

    The model ultimately chose the image-led option. The author believes the target users are developers and early adopters, who usually look at images before reading text; this layout can convey more information during a short stay.

    After selecting the option, the model changed 20 files and wrote about 4,320 lines of code. This count includes scripts the model wrote for auxiliary verification. The changes mainly included homepage component rearrangement, responsive layout adaptation, unified replacement of global style variables, and adjustments to interaction details such as motion, hover, and scroll.

    Session interruption

    The task was interrupted in the final stage. The terminal reported that the operation had stopped, and the bill ended at $52.55.

    Two numbers need to be viewed separately. The 85 minutes comes from cost statistics and refers to the model’s execution duration. Five hours is the upper limit for a continuous session, timed from session start. Whether the model is thinking, reading or writing files, or sitting idle in a waiting state, this time is counted. The two measure different things. The original record did not fully restore their order, so this article does not infer it. What is certain is that the interruption was triggered by the session-duration limit.

    Such a limit has its rationale. During long runs, context keeps expanding, intermediate states accumulate, and the model may forget which files it has changed or repeat the same operation. A timed interruption forces developers to deliver in stages rather than letting the model run everything in one go.

    Cost Breakdown

    The author recorded the following data:

    Item Value Notes
    Total bill $52.55 Based on the actual bill
    Files changed 20 Includes all modified files
    Generated code About 4,320 lines Includes auxiliary scripts
    Homepage directions 3 Produced during the comparison stage
    Fast mode Not enabled Billed at standard rates

    The original record did not give input and output token counts or record the specific price per million tokens, so it is impossible to precisely recalculate the cost of each part. Based on the author’s analysis, cost mainly came from three parts:

    • Multiple sub-agents each read key files from the codebase, so context was read repeatedly;
    • After each stage, the model wrote scripts to verify rendering results and style coverage; these self-checks consumed reasoning resources;
    • The output of 4,320 lines of code accounted for a relatively large share of billing.

    The author also made a rough comparison with outsourcing person-day costs. Assuming a front-end rebuild takes 2 to 3 days of work at $100 to $150 per hour, labor cost would be about $1,600 to $3,600. This comparison counts only development time and does not include manual acceptance, rework, or design review costs, so it cannot be treated directly as savings.

    Two Steps: Compare First, Then Implement

    The author summarized a way to avoid interruption: split the entire rebuild into two phases.

    The first phase is comparison. Use a lower reasoning effort and let the model quickly propose 2 to 3 homepage design directions. Each direction needs only a structural sketch and visual direction, not full code. The goal is to determine the visual direction as quickly as possible, with relatively controllable token consumption.

    The second phase is targeted implementation. After confirming the direction, open a new session, describe the selected option to the model in natural language, and let it develop deeply along that direction.

    Splitting into two sessions has several benefits:

    • The new session has full context space, so the model does not need to repeatedly read files because it “forgot”;
    • The session timer starts from the new session, making it less likely to hit the limit;
    • The output of the comparison phase can serve directly as input for the implementation phase, making the design goal clearer to the model.

    The author’s actual approach was to run both phases continuously in the same session, so the comparison phase began consuming session time. If split into two sessions, each requiring 2 to 3 hours, the limit would not have been triggered. This judgment has not been verified in practice; readers can try it according to their own task scale.

    Three Cost-Control Suggestions

    Set boundaries first. Tell the model which directories can be changed and which files must be locked. If it tries to modify node_modules or build configuration, stop it immediately. Changes in these locations can easily introduce errors.