Skip to content

Commit ff8732a

Browse files
Claudeclaude
authored andcommitted
fix: clearer closing prompt — "Anything to add before I close this session?"
Replaced vague "Corrections?" with explicit closing prompt across all 4 client templates and session-close.ts comments. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c6bac3b commit ff8732a

5 files changed

Lines changed: 10 additions & 10 deletions

File tree

CLAUDE.md.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ On "closing", "done for now", or "wrapping up":
8080
"task_completion": {
8181
"questions_displayed_at": "ISO timestamp (when reflection started)",
8282
"reflection_completed_at": "ISO timestamp (when payload written)",
83-
"human_asked_at": "ISO timestamp (when 'Corrections?' shown)",
83+
"human_asked_at": "ISO timestamp (when closing prompt shown)",
8484
"human_response_at": "ISO timestamp (when human replied)",
8585
"human_response": "user's correction text or 'none'"
8686
},
@@ -98,7 +98,7 @@ On "closing", "done for now", or "wrapping up":
9898
Key lesson: [one-sentence from Q7]
9999
```
100100

101-
3. **Ask**: "Corrections?" — wait for response, then call `session_close`.
101+
3. **Ask**: "Anything to add before I close this session?" — wait for response, then call `session_close`.
102102

103103
4. **Call `session_close`** with `session_id` and `close_type: "standard"`.
104104

copilot-instructions.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Safe alternatives: `env | grep -c VARNAME` (count only), `[ -n "$VARNAME" ] && e
7575
"task_completion": {
7676
"questions_displayed_at": "ISO timestamp (when reflection started)",
7777
"reflection_completed_at": "ISO timestamp (when payload written)",
78-
"human_asked_at": "ISO timestamp (when 'Corrections?' shown)",
78+
"human_asked_at": "ISO timestamp (when closing prompt shown)",
7979
"human_response_at": "ISO timestamp (when human replied)",
8080
"human_response": "user's correction text or 'none'"
8181
},
@@ -93,7 +93,7 @@ Safe alternatives: `env | grep -c VARNAME` (count only), `[ -n "$VARNAME" ] && e
9393
Key lesson: [one-sentence from Q7]
9494
```
9595

96-
3. **Ask**: "Corrections?" — wait for response, then call `session_close`.
96+
3. **Ask**: "Anything to add before I close this session?" — wait for response, then call `session_close`.
9797

9898
4. **Call `session_close`** with `session_id` and `close_type: "standard"`.
9999

cursorrules.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ On "closing", "done for now", or "wrapping up":
7575
"task_completion": {
7676
"questions_displayed_at": "ISO timestamp (when reflection started)",
7777
"reflection_completed_at": "ISO timestamp (when payload written)",
78-
"human_asked_at": "ISO timestamp (when 'Corrections?' shown)",
78+
"human_asked_at": "ISO timestamp (when closing prompt shown)",
7979
"human_response_at": "ISO timestamp (when human replied)",
8080
"human_response": "user's correction text or 'none'"
8181
},
@@ -93,7 +93,7 @@ On "closing", "done for now", or "wrapping up":
9393
Key lesson: [one-sentence from Q7]
9494
```
9595

96-
3. **Ask**: "Corrections?" — wait for response, then call `session_close`.
96+
3. **Ask**: "Anything to add before I close this session?" — wait for response, then call `session_close`.
9797

9898
4. **Call `session_close`** with `session_id` and `close_type: "standard"`.
9999

src/tools/session-close.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,15 +1300,15 @@ export async function sessionClose(
13001300
let humanWaitTimeMs: number | undefined;
13011301
if (params.task_completion && typeof params.task_completion === "object") {
13021302
const tc = params.task_completion as unknown as Record<string, string>;
1303-
// Agent reflection time = when questions shown → when human asked "Corrections?"
1303+
// Agent reflection time = when questions shown → when closing prompt shown
13041304
if (tc.questions_displayed_at && tc.human_asked_at) {
13051305
const started = new Date(tc.questions_displayed_at).getTime();
13061306
const askedHuman = new Date(tc.human_asked_at).getTime();
13071307
if (!isNaN(started) && !isNaN(askedHuman) && askedHuman > started) {
13081308
agentReflectionMs = askedHuman - started;
13091309
}
13101310
}
1311-
// Human wait time = "Corrections?" → human responds
1311+
// Human wait time = closing prompt → human responds
13121312
if (tc.human_asked_at && tc.human_response_at) {
13131313
const asked = new Date(tc.human_asked_at).getTime();
13141314
const responded = new Date(tc.human_response_at).getTime();

windsurfrules.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Safe alternatives: `env | grep -c VARNAME` (count only), `[ -n "$VARNAME" ] && e
7575
"task_completion": {
7676
"questions_displayed_at": "ISO timestamp (when reflection started)",
7777
"reflection_completed_at": "ISO timestamp (when payload written)",
78-
"human_asked_at": "ISO timestamp (when 'Corrections?' shown)",
78+
"human_asked_at": "ISO timestamp (when closing prompt shown)",
7979
"human_response_at": "ISO timestamp (when human replied)",
8080
"human_response": "user's correction text or 'none'"
8181
},
@@ -93,7 +93,7 @@ Safe alternatives: `env | grep -c VARNAME` (count only), `[ -n "$VARNAME" ] && e
9393
Key lesson: [one-sentence from Q7]
9494
```
9595

96-
3. **Ask**: "Corrections?" — wait for response, then call `session_close`.
96+
3. **Ask**: "Anything to add before I close this session?" — wait for response, then call `session_close`.
9797

9898
4. **Call `session_close`** with `session_id` and `close_type: "standard"`.
9999

0 commit comments

Comments
 (0)