# Gift Graph Bug Tracker
> Gift Graph - Known issues, build-night surprises, and their resolution status. Platform findings that belong to Replit rather than Gift Graph are marked and also live as Product notes · FDE feedback in the [[Project - Gift Graph/Build & Iterate/Build Log|Build Log]].
> Last Updated: 2026-11-21
## Format
Each bug follows this structure:
- **ID:** Unique identifier (BUG-XXX)
- **Status:** `Open` | `In Progress` | `Resolved` | `Won't Fix` | `Platform`
- **Severity:** `Critical` | `High` | `Medium` | `Low`
- **Description**, **Root Cause**, **Resolution**
## Open Issues
One bug is open on 2026-11-21.
### BUG-034: The Word Check Refuses Ordinary Words
**Status:** Open, waits on my call
**Severity:** Medium
**Reported:** 2026-11-03, from the hint run
**Description:** The server refuses a Hint that shares any word of four letters or more with its Secret, past a short list of filler words. It refused 12 of 16 baseline hints for words such as night, year, and small, which works against the guidance's own ask to carry the occasion.
**Root Cause:** The check treats every shared word as a giveaway, and most shared words are ordinary.
**Resolution:** Measured on 2026-11-07. A2 lets the 2,500 most common English words pass and never a name, which refuses 29 of the run's hints where today's check refuses 49. The change waits on my call ([[Project - Gift Graph/Build & Iterate/Technical Decisions#TDR-072 The Hint Guidance Stays, and the Word Check Is the Next Lever|TDR-072]]).
## Platform Findings (Replit)
### BUG-039: Git in the Shell Lost Its GitHub Login in Silence
**Status:** Platform
**Severity:** Medium
**Reported:** 2026-10-21
**Description:** Git in the Replit Shell has failed against GitHub with "Invalid username or token" since 2026-10-05, while the Git pane kept working. Nothing in the workspace said so, and 27 commits sat in the workspace unpushed.
**Resolution:** A sync takes three steps until the Shell is fixed. The pane fetches, Agent merges with no network, and the pane pushes. The credential is mine to fix, starting from `git remote -v`.
### BUG-019: Git Pane Pull Stalled Mid-Rebase
**Status:** Platform
**Severity:** Medium
**Reported:** 2026-10-05
**Description:** On a workspace with commits GitHub lacks, Pull rebased by default, stopped on a conflict in `docs/build-log.md`, and left the pane reading "Unsupported state: you are in the middle of a rebase," with no way forward from the pane itself. It happened twice.
**What would help:** A choice of merge or rebase before pulling, Abort and Resolve in the pane when an operation stalls, and a preview of which files will conflict. My workaround is a merge by commit through Agent, with standing rules for Git in `replit.md`.
![[gift-graph-replit-34-git-rebase-stalled.png|480]]
*The Git pane after Pull · no way forward from the pane*
### BUG-016: Publish's Schema Review Cannot Be Skipped
**Status:** Platform (worked around 2026-10-03)
**Severity:** High
**Reported:** 2026-10-03
**Related:** [[Project - Gift Graph/Build & Iterate/Technical Decisions#TDR-024|Technical Decisions > TDR-024]]
**Description:** The first publish through the self-migrating loop failed at Replit's schema review, which could not add the level foreign key over production's old rows and offered no way to skip the step. Nothing in production changed.
**What would help:** A way to hand the schema to the app's own migrations. My workaround is a constraint over existing rows in two publishes, or a reset while the data is test data, which is how 006 went out.
### BUG-002: Plan Gate Bent by Ambiguous Text
**Status:** Platform
**Severity:** Medium
**Reported:** 2026-09-30
**Description:** With Revise selected on the plan approval card, text opening "Approved with three additions" was read as approval, and Agent built without showing a revised plan. All three additions landed, nothing was lost.
**What would help:** Restate how the card was read before building whenever the selected option and the text disagree. Plan mode later did exactly this for the deployment fix, which is the contrast worth showing a security team.
### BUG-008: Deck Needs a Project Restructure, Flagged Late
**Status:** Platform
**Severity:** Low
**Reported:** 2026-10-01
**Description:** The slide deck was offered from the publish screen, the outline was scoped and approved, and only then did Agent report that the viewer needs a multi-artifact layout and ask to move the live server.
**What would help:** Flag the structure change when the feature is offered, and offer to build the deck as a separate project that leaves the live app untouched.
## Resolved
### BUG-038: The Page for Agents Was Dark, and Left Through the Sign-In
**Status:** Resolved (2026-11-21, in the round built as v0.7.5)
**Severity:** Low
**Reported:** 2026-11-21, from the design review
**Description:** `/mcp` opened as a page kept the dark palette from before 2026-10-19. On a development instance a request for it was sent to the sign-in service first, which an agent reading the page could not follow.
**Root Cause:** The page carries its own styles, which the move to the Light palette missed. The sign-in middleware was mounted on every route.
**Resolution:** The page wears the Light palette, and the sign-in middleware is mounted on `/api/owner` alone ([[Project - Gift Graph/Build & Iterate/Technical Decisions#TDR-074 A Server With No Session Answers in JSON and Refuses a Stream|TDR-074]]).
### BUG-037: A Signed-In Page Loaded in Three Looks
**Status:** Resolved (2026-11-21, in the round built as v0.7.5)
**Severity:** Low
**Reported:** 2026-11-21, from the design review
**Description:** A signed-in page was blank while the sign-in loaded, then drew one set of blocks for the session and a different set for its state.
**Resolution:** One shape holds through the page's code, the sign-in, the session, and the state ([[Project - Gift Graph/Build & Iterate/Technical Decisions#TDR-076 Pages Load When They Are Opened, Under One Shape|TDR-076]]).
### BUG-036: A Stream Stayed Open With Nothing on It
**Status:** Resolved (2026-11-21, in the round built as v0.7.5)
**Severity:** Medium
**Reported:** 2026-11-21, from the review of the agent path
**Description:** A `GET` on `/mcp` with a token opened an event stream that stayed open for as long as the client held it, on a server that never sends on its own.
**Root Cause:** The transport opens the stream for any server, and one with no session has nothing to put on it.
**Resolution:** A `GET` or a `DELETE` gets 405, and each answer is one JSON object ([[Project - Gift Graph/Build & Iterate/Technical Decisions#TDR-074 A Server With No Session Answers in JSON and Refuses a Stream|TDR-074]]).
### BUG-035: A Failed Call Dropped the Hearer's News
**Status:** Resolved (2026-11-21, in the round built as v0.7.5)
**Severity:** Medium
**Reported:** 2026-11-21, from the review of the agent path
**Description:** The news a hearer is told once, such as "Aleks shared an idea with you", was marked as said while the tool call was still running. When the call failed, the result carried no notice and the news was gone.
**Root Cause:** The read and the mark shared one transaction that ran beside the work.
**Resolution:** The mark moves only once the work has succeeded, and only if no other read moved it first. A test fails a call, then finds the news on the next result, once ([[Project - Gift Graph/Build & Iterate/Technical Decisions#TDR-073 The Notice Is One Read, and a Change Takes Fewer Trips|TDR-073]]).
### BUG-033: The Whisper Sheet Hid Under a Phone's Keyboard
**Status:** Resolved (2026-10-23, in the round built as v0.7.5)
**Severity:** High
**Reported:** 2026-10-23, by Dustin, with a screenshot from Chrome on Android
**Description:** On a phone, Whisper opened its sheet fixed to the foot of the page, and the keyboard covered its lower half.
**Root Cause:** A phone browser shrinks only the visual viewport when the keyboard rises, and the sheet was fixed to the layout viewport.
**Resolution:** The sheet reads the visual viewport while it is open and sits on the keyboard. A real keyboard on Android and on an iPhone is still to be tried ([[Project - Gift Graph/Build & Iterate/Technical Decisions#TDR-070 Dustin's Notes From a Phone|TDR-070]]).
### BUG-032: A Test Failed Once in a Thousand Runs
**Status:** Resolved (2026-10-19, in the round built as v0.7.3)
**Severity:** Low
**Reported:** 2026-10-19
**Description:** A test that looked for "14" inside sixty random bytes failed whenever the bytes happened to carry it, about once in a thousand runs.
**Resolution:** The test looks for the field names.
### BUG-031: The Header Jumped Between Pages
**Status:** Resolved (2026-10-19, published in v0.7.4 on 2026-10-19)
**Severity:** Low
**Reported:** 2026-10-19
**Description:** The top bar moved between Ideas, Connections, Profile, and Demo, with its pills at different sizes from page to page.
**Resolution:** One header serves every page, with fixed pill sizes and one container, measured to the same coordinates on all four pages at 1280 and 375.
### BUG-030: Closing an Idea Clipped, and the Tile Jumped
**Status:** Resolved (2026-10-19, built in v0.7.3, published inside v0.7.4 on 2026-10-19)
**Severity:** Low
**Reported:** 2026-10-19, on the live home
**Description:** Closing an open Idea clipped its contents, and the closing tile jumped back to its cell. The foot of a tile sat uneven, and the level selectors clipped at their corners.
**Resolution:** The fold animates over a quarter second without clipping, and a closing tile fades its body and slides back to its cell in one motion, held frame by frame at both widths. The foot sits on one line in its own band. One choice control serves the connection row, the person popover, and the invite sheet, with equal segments and no clipping.
### BUG-029: One-Off Shares Left Gaps, Loops, and Stuck States
**Status:** Resolved (2026-10-19, built in v0.7.3, published inside v0.7.4 on 2026-10-19)
**Severity:** High
**Reported:** 2026-10-19
**Related:** [[Project - Gift Graph/Build & Iterate/Technical Decisions#TDR-063 A One-Off Lives Only While It Means Something|TDR-063]]
**Description:** A share stored at what a person would hear anyway held back a later change of their depth. Removing a person left the shares to them and their open asks in place, which let a reconnect bring an old Secret back. An ask kept waiting after its asker already heard the Secret.
**Root Cause:** A share was kept whether or not it differed from the rule, and removing a person left the shares and asks that named them.
**Resolution:** A share equal to what the person would hear without it is deleted on write. Removing a person, from either side, deletes the shares to them and declines their open asks, and a reconnect starts clean. An ask stops waiting once its asker already hears the Secret, or once its Idea is unshared or tagged to a person. A test holds each case.
### BUG-028: The Whisper Form Hides the Hint at Secret
**Status:** Resolved (2026-10-18, published in v0.7.2 on 2026-10-18): the pages round's form is hint, secret, labels, and for with no level, and the hint field never hides
**Severity:** Medium
**Reported:** 2026-10-16, found while reading the form
**Description:** Choose Secret on the whisper form and the hint and label block disappears. Save, and the form answers "A hint needs a line" at its foot, pointing at a field it just hid. A Secret-level whisper from the web cannot be saved unless the hint was written while the card was on Hint.
**Root Cause:** The form shows the block only when the level card is Hint. The server needs a hint for anything short of Silent, since a Secret-level secret is heard as its hint by every connection at Hint, which is most of them.
**Resolution:** The form of hint, secret, labels, and for, with no level, went out in v0.7.2 ([[Project - Gift Graph/Build & Iterate/Technical Decisions#TDR-060 The Home Is One Page, and Only the Connection Carries a Level|TDR-060]]). The hint field never hides. Until then the workaround was to write the hint and pick the label at Hint, then switch the card to Secret and save.
### BUG-027: An Email Sign-Up Shows Its Email's Local Part as Its Name
**Status:** Fixed (2026-10-15, released 2026-10-16 in v0.7.1)
**Severity:** Medium
**Reported:** 2026-10-15, on the founder account
**Description:** The founder account, signed up by email, showed "lekzandar+founder" as the name on its account page, and every card a new person would see would carry it. The sign-in's profile dialog has no name fields, and the Clerk dashboard where they turn on is behind Replit's Pro tier.
**Root Cause:** An email sign-up holds no name on the sign-in, and the server filled the account's name from the email's local part as its last fallback. Google sign-ins never met it, since Google hands over a name.
**Resolution:** The Name row on the account page is a field. The sign-in fills the name the first time, and the person writes it from then on. Nothing is backfilled; each email sign-up fixes its own. Owning the sign-in instance is filed as a future item.
### BUG-026: Every Whisper on Production Failed Its Save
**Status:** Fixed (2026-10-14, migration 015, released 2026-10-16 in v0.7.1)
**Severity:** High
**Reported:** 2026-10-14, by Justin and me in Claude
**Description:** A whisper through an agent previewed, and the confirm failed three times with a generic error. Since v0.6.2, every whisper on production failed the same way: migration 002 gave `drops.sharing_mode` the default 'legacy', 009 narrowed its check to 'all_approved' and left the default, and the insert never named the column. Every test and the judge build their database fresh from `schema.sql`, which never had the gap.
**Resolution:** The insert names the column, migration 015 moves the default, and a schema parity test compares a fresh database with a migrated one on every column default and constraint; its first run found two more gaps, which 015 closes too (TDR-051). The server now logs an internal error by name and message.
### BUG-025: Teal Meant Both Secret and Chosen
**Status:** Fixed (2026-10-09, v0.6.4, released 2026-10-10 inside v0.7)
**Severity:** Low
**Reported:** 2026-10-09, from a production screenshot
**Description:** A secret card's "Heard as a Hint" pill filled teal, and the chosen Hint on the level selector filled teal, while the Hint pill on the same screen wore its ember outline. Teal is the Secret colour, and the same colour said two things.
**Resolution:** A level has one look everywhere, and a chosen control takes its level's colour: the teal fill for Secret, the ember tint for Hint, the raised surface for Silent (TDR-046).
### BUG-024: Codex Shows a Second Row at Each Sign-In
**Status:** Fixed (2026-10-09, v0.6.4, released 2026-10-10 inside v0.7)
**Severity:** Low
**Reported:** 2026-10-05
**Description:** Codex registers itself as a new OAuth client at every sign-in, and Your agents shows a second Codex row until I disconnect the first.
**Resolution:** Decided 2026-10-08 with the v0.6.4 mocks, one row per person, where a returning Codex reuses its row and the newest sign-in wins. Built with the account page.
### BUG-023: A New Domain Signs a Person In to an Empty Account
**Status:** Resolved (2026-10-08, v0.6.3)
**Severity:** High
**Reported:** 2026-10-08
**Related:** [[Project - Gift Graph/Build & Iterate/Technical Decisions#TDR-039|Technical Decisions > TDR-039]], [[Project - Gift Graph/Build & Iterate/Build Log|Build Log]]
**Description:** My first sign-in on giftgraph.aleksandar.app showed an empty dashboard, with no secrets, no connections, and no agents. A sign-in on the old host two minutes later showed my three secrets, Justin, and Claude.
**Root Cause:** In production the server builds the Clerk key from the request's host, `clerk.<host>`, which gives each domain its own issuer in the session. Accounts are keyed on the issuer and the Clerk user together, and the new issuer made a second account for the same person.
**Resolution:** Accounts key on the Clerk user alone, and migration 012 folds each second account into the first, with a unique index on the Clerk user after it. The rehearsal folded my one second account, and v0.6.3 went live the same day.
**Platform note:** Replit's Clerk integration derives the key from the host, and the Domains flow says nothing about sign-in. An app that keys users on the issuer splits its people the day it adds a domain.
![[gift-graph-bug-new-domain-empty-account.png|560]]
*Signed in on giftgraph.aleksandar.app · the empty second account*
### BUG-022: The Demo's Level Switch Did Nothing
**Status:** Resolved (2026-10-07, v0.6.2)
**Severity:** Medium
**Description:** Changing a level on the demo page left the story unchanged.
**Root Cause:** The demo wrote `level` onto a row whose field is `tier`, left behind by the rename.
**Resolution:** The audit found it, and a one-line fix went out in v0.6.2.
### BUG-021: Test Runs Hung for Eight and Sixteen Minutes
**Status:** Resolved (2026-10-07)
**Severity:** Medium
**Root Cause:** `schema.sql` still seeded the two identities against the new users check, the setup threw, and the open pools kept the process alive. Two runs shared one database, and a wait loop polled a file from a killed run.
**Resolution:** The seed is gone, runs go one at a time behind a preflight that checks the database answers and nothing is in flight, and every long run gets a check every two minutes.
### BUG-020: An Email Request Showed Whether an Address Had an Account
**Status:** Resolved (2026-10-07, before release)
**Severity:** Critical
**Related:** [[Project - Gift Graph/Build & Iterate/Technical Decisions#TDR-036|Technical Decisions > TDR-036]]
**Description:** The first build of requests by email opened a pending connection row when the address matched, and the requester could see the row and learn who had an account.
**Resolution:** The request lives on the owner's side alone until they answer, a decline claims it with no row made, and the answer is the same either way. Caught in review before any publish.
### BUG-018: Muse Took the Person It Hears for Its Account
**Status:** Resolved (2026-10-07, v0.6.1 inside v0.6.2)
**Severity:** High
**Description:** Justin's Muse read the connect note "You act for justin.calles. You hear Aleksandar A (gg_…) at Hint", told him his token belonged to me, and stopped before saving anything.
**Root Cause:** One line named two people, and the second read as the account.
**Resolution:** The account alone on the first line, with its ID, and the people it hears on a line of their own, labelled as other people.
![[gift-graph-muse-whose-account.webp|360]]
*Muse on Justin's phone, 2026-10-05*
### BUG-017: The Local Database URL Went Empty
**Status:** Resolved (2026-10-04)
**Severity:** Low
**Description:** `neon link` overwrote the local database URL without asking, and the first "test run against Neon" never reached Neon. An unquoted ampersand in the connection strings emptied both variables when the shell loaded them.
**Resolution:** Both strings single-quoted, `neon link` never rerun, and `database.md` says so.
### BUG-015: The Agent Held Three Identities in One Session
**Status:** Resolved (2026-10-03, then 2026-10-07)
**Severity:** Medium
**Description:** Claude Code carried three Gift Graph connections at once and had to guess which one spoke for me.
**Resolution:** The identity line at connect (2026-10-03), the account alone on its first line (2026-10-05), and the seeded identities retired with migration 009 (2026-10-07).
### BUG-014: The Form Picked the Nearest Label
**Status:** Resolved (2026-10-04)
**Severity:** High
**Description:** A bronze statue went out as art prints and tomatoes as premium food, since the vocabulary had nothing closer and the form chose for me.
**Resolution:** Labels became optional, a finder over the list joined the form, vocabulary version 2 went live, and the person's agent picks from the full list ([[Project - Gift Graph/Build & Iterate/Technical Decisions#TDR-026|Technical Decisions > TDR-026]]).
### BUG-013: Example Pill Overlapped the Table Header
**Status:** Resolved (2026-10-02, development preview)
**Severity:** Low
**Related:** [[Project - Gift Graph/Build & Iterate/Technical Decisions#TDR-020|Technical Decisions > TDR-020]]
**Description:** On the landing page the "Example · Mira would love a notebook" pill sat on the header row, clipping "Sharing level" and "What others can see." The pill was also oversized, and a stray comma trailed "notebook."
**Resolution:** Agent proposed a mock before touching code; I approved the mock. The header row gained about 26px of top padding, the pill shrank to about 26px tall with 13px text, and the comma went. Verified at 1280, 1440, and 390 wide.
### BUG-012: "The Service Could Not Load Your State"
**Status:** Resolved (2026-10-07; the path retired, and it did not reproduce)
**Severity:** Medium
**Reported:** 2026-10-02
**Related:** [[Project - Gift Graph/Build & Iterate/Technical Decisions#TDR-017|Technical Decisions > TDR-017]]
**Description:** The owner dashboard in the development preview showed "The service could not load your state" on one sign-in, after the per-account IDs landed.
**Root Cause:** Unknown. The candidates are the migration state in the development database and the session exchange after the account change.
**Resolution:** Not seen again. The token-to-session exchange gave way to Clerk sign-in, and the legacy sign-in left with migration 009 on 2026-10-07.
### BUG-011: Landing Page Reads v0.2 While Production Is Gated
**Status:** Resolved (2026-10-03)
**Severity:** Medium
**Reported:** 2026-10-02
**Related:** [[Project - Gift Graph/Build & Iterate/Technical Decisions#TDR-015|Technical Decisions > TDR-015]]
**Description:** gift-graph.replit.app serves the first v0.2 landing page, with the owner dashboard button and the v0.2 copy, while the README says v0.2 does not publish or change production and points to a separate owner-reviewed process. The development preview has since moved further, to the whispers copy, accounts, and the demo.
**Root Cause:** The landing page is its own web artifact and can publish apart from the API migration.
**Resolution:** Production went to v0.4 at schema 006 on 2026-10-03 and has followed every release since. The app migrates itself at start ([[Project - Gift Graph/Build & Iterate/Technical Decisions#TDR-024|Technical Decisions > TDR-024]]), and v0.6.2 runs at schema 011.
### BUG-010: README and Repo Description Out of Date
**Status:** Resolved (2026-10-01, cleanup text provided)
**Severity:** Low
**Description:** The README still said "v0.1 in progress" and carried a colon sentence; the repo description read "Imported from zip."
**Resolution:** Description rewritten at creation. README replaced with the live status, how the tiers work, the seven tools, and the connection steps; the status line says "at deploy" until the tests pass in the new layout.
### BUG-009: Tests Not Re-run After the Multi-Artifact Restructure
**Status:** Resolved (2026-10-03)
**Severity:** High
**Reported:** 2026-10-01
**Related:** [[Project - Gift Graph/Build & Iterate/Technical Decisions#TDR-010|Technical Decisions > TDR-010]]
**Description:** Task #5 moved the server into `artifacts/`, `lib/`, and `scripts/` to make room for the deck viewer. The 12 integration tests passed before the move. The README now names the command, `pnpm --filter @workspace/api-server test`, against an isolated schema.
**Root Cause:** The restructure ran on a separate copy and was applied after the GitHub push; the live deployment still serves the pre-restructure build.
**Resolution:** Agent's GitHub rebuild ran 97 tests in the new layout on 2026-10-03. The local round on 2026-10-07 ran 85 API tests, 26 web tests, and 21 routing tests.
### BUG-007: Build Log Truncated Mid-Sentence
**Status:** Resolved (2026-10-01)
**Severity:** Low
**Description:** `docs/build-log.md` ended at line 51 inside the Build entry after a paste, and later feedback blocks landed in the wrong entry.
**Resolution:** The complete log was pasted once, with every feedback block in the session it came from. Replit auto-committed it as "Update build log documentation."
### BUG-006: Revoke and Reconnect Semantics Unconfirmed
**Status:** Resolved (2026-10-01, v0.2)
**Severity:** Medium
**Related:** [[Project - Gift Graph/Build & Iterate/Technical Decisions#TDR-013|Technical Decisions > TDR-013]]
**Description:** Agent's Unsure note said renewed approval restores access to drops made before a revocation, and the spec did not say whether a reconnect should start fresh.
**Resolution:** Withdrawal is permanent and survives reapproval; revocation blocks future pulls; reapproval cannot bypass the widening checks. Nothing retracts what an agent already received.
### BUG-005: Bearer Tokens Exposed in a Screenshot
**Status:** Resolved (2026-09-30)
**Severity:** Critical
**Description:** A Shell screenshot taken mid-build showed both freshly generated tokens, one highlighted.
**Resolution:** Both values rotated in Tools › Secrets after the build finished; the server reads them at runtime, which changed no code. Rule from here: `clear` the Shell before any screenshot, and generate tokens with `Read-Host` on the client side so they stay out of history.
### BUG-004: Claude Code 401 on the First Tool Call
**Status:** Resolved (2026-10-01)
**Severity:** Low
**Description:** The first demo prompt returned `401 authentication_error, OAuth access token is invalid`, retrying.
**Root Cause:** Claude Code's own sign-in had expired. The error shape is Anthropic's API format; the call never reached Gift Graph, and `claude mcp list` had already shown both servers connected.
**Resolution:** `/login`, then the prompt ran.
### BUG-003: Natural Prompts Miss
**Status:** Resolved (2026-10-03)
**Severity:** Medium
**Reported:** 2026-10-01
**Related:** [[Project - Gift Graph/Build & Iterate/Technical Decisions#TDR-005|Technical Decisions > TDR-005]], [[Project - Gift Graph/Build & Iterate/Feature Backlog|Feature Backlog]]
**Description:** A pull for "gift ideas about fonts" returned nothing while a drop with the category text "type and lettering" existed.
**Root Cause:** v0.1 matches literal words in the prompt against disclosed text only, and no word overlapped. The privacy model is working as designed; the cost is that natural prompts miss.
**Resolution:** Hearing returns everything the asker may hear, ranked, with matches first, and the asking agent reasons about fit ([[Project - Gift Graph/Build & Iterate/Technical Decisions#TDR-022|Technical Decisions > TDR-022]]). Embeddings wait until they beat the word list on a blind set.
### BUG-001: Publish Failed, "Could not find run command"
**Status:** Resolved (2026-10-01)
**Severity:** High
**Related:** [[Project - Gift Graph/Build & Iterate/Technical Decisions#TDR-007|Technical Decisions > TDR-007]]
**Description:** The first Publish failed although the app ran in the workspace.
**Root Cause:** The preview started the server through the dev workflow; a published deployment reads its own build and run commands from `.replit`, and that section was missing.
**Resolution:** Agent, in Plan mode, added build `npm run build` and run `npm start`, chose Autoscale after confirming the transport is stateless, and the republish went green. Platform note: Agent could set the deployment commands whenever it builds a server, or offer to set them from the error.