Repository navigation
Description
/office-hours Phase 4.5 appends this session's entry to the builder profile. Phase 6 Step 1 then reads that same profile to choose a closing tier. Within one run the write precedes the read, so a genuine first session reports SESSION_COUNT: 1 / TIER: welcome_back, and the introduction tier — the one holding the actual first-session content and the YC introduction — is unreachable on the run it was written for.
The welcome_back path then instructs the model to say "Welcome back. Last time you were working on [LAST_ASSIGNMENT]. How's it going?" where LAST_ASSIGNMENT is the assignment issued a few minutes earlier in the same session.
This is the mirror image of #1677 ("always reports SESSION_COUNT: 0, welcome_back tier is unreachable"), which #1682 fixed by unifying the writer and reader onto developer-profile.json. The unification is correct; what is missing is that Phase 4.5 and Phase 6 are now the same store at two points in one run, so the run observes itself as history. Distinct from #2657, which is about sessions[] under-counting across runs from Phase-4.5-only logging — same single writer, different symptom.
Observed
First-ever /office-hours run on this machine, v1.71.x, macOS. No prior developer-profile.json entries for this project slug.
Phase 4.5 ran:
gstack-developer-profile --log-session '{"date":"...","mode":"startup","project_slug":"<slug>",...}'
Phase 6 Step 1 then ran gstack-builder-profile and got:
SESSION_COUNT: 1
TIER: welcome_back
LAST_PROJECT: <slug>
LAST_ASSIGNMENT: Ship /check and get 50 strangers to run their own PDF through it
LAST_DESIGN_TITLE:
DESIGN_COUNT: 0
DESIGN_TITLES: []
TOTAL_SIGNAL_COUNT: 7
CROSS_PROJECT: false
LAST_ASSIGNMENT is this run's own assignment. DESIGN_COUNT: 0 and an empty DESIGN_TITLES alongside TIER: welcome_back is the tell — the welcome_back path reads DESIGN_TITLES for "Your first design was X. Now you're on Y", and there is nothing to put in either slot.
Repro
Fresh profile (or a project slug with no prior sessions). Run /office-hours to completion. At Phase 6, gstack-builder-profile reports SESSION_COUNT: 1, TIER: welcome_back rather than 0, introduction.
Suggested fix
Any of:
- Read the profile at skill start (the preamble already runs) and carry the tier value through to Phase 6, so the tier reflects state as of before this run.
- Have
gstack-builder-profileaccept a flag to exclude entries whose timestamp falls within the current run, or have Phase 6 subtract this session's own entry before selecting a tier. - Move the Phase 4.5
--log-sessioncall to after Phase 6's read. This is the smallest diff but it loses the entry if the run dies during the closing, which is the failure mode developer-profile undercounts office-hours tenure: Phase-4.5-only logging + no timeline.jsonl reconciliation (4 logged vs 14 real runs) #2657 is about — so (1) or (2) is probably better.
Option (1) fits the existing structure: the preamble is already the place session-scoped values (SESSION_ID, TEL_START) are captured and carried forward.
A cheap guard regardless of which fix lands: if LAST_ASSIGNMENT equals the assignment this run just wrote, treat the tier as introduction.
Note on scope
Reported, not PR'd, because the choice between (1), (2) and (3) interacts with #2657's proposal to reconcile sessions[] against timeline.jsonl, and whoever owns that should pick. Happy to send a PR for whichever direction you prefer.
Activity
v1.91.54.0 fix: office-hours first sessions get the first-session clo…
v1.91.54.0 fix: office-hours first sessions get the first-session clo…