[v0.8 Prompts P01] preserve typed system-prompt provenance - #1177
[v0.8 Prompts P01] preserve typed system-prompt provenance#1177sethkarten wants to merge 22 commits into
Conversation
Add an IPYTHON_CONTROL_PROMPT line instructing the agent to never block the kernel with time.sleep() loops or long sleeps to await slow external work (background runs, sandboxes, sub-agents, remote jobs). A blocked cell holds the turn open, wastes wall-clock, and prevents user interaction. The agent should kick off the work, record its handle/output location, end the turn, and check results on a later turn. Update system-prompt.test.ts exact-match block and add a toContain assertion.
v0.8 stack checkpoint — 2026-08-11 15:50 UTCThis draft PR remains the GitHub Prompts stack surface and will be kept current.
The current remote tip is historical until that verified successor lands; this is not a readiness claim. |
|
Macroscope has since reviewed this pull request. An earlier review was skipped by a cost limit; a review has now completed, so that notice no longer applies. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b54903c. Configure here.
| getThemes(): { themes: Theme[]; diagnostics: ResourceDiagnostic[] }; | ||
| getAgentsFiles(): { agentsFiles: Array<{ path: string; content: string }> }; | ||
| getSystemPrompt(): string | undefined; | ||
| getSystemPromptSource?(): SystemPromptSource; |
There was a problem hiding this comment.
Provenance migration scaffolding remains
Low Severity
P01 keeps transitional dual APIs after the provenance migration: optional getSystemPromptSource?() with a string-fallback helper, plus retained customPrompt beside systemPromptSource. That staging surface duplicates resolution logic and leaves compatibility vocabulary in the completed P01 change.
Additional Locations (2)
Triggered by project rule: Review rules
Reviewed by Cursor Bugbot for commit b54903c. Configure here.


Summary
ResourceLoadermethod optional for existing SDK loaders and exportSystemPromptSourcefrom the package root.Cleanup
mainbranch without rewriting published history.Validation
npm run checknpx tsx ../../node_modules/vitest/dist/cli.js --run test/agent-session-runtime-events.test.ts test/suite/agent-session-runtime.test.ts test/system-prompt.test.ts— 55 passednpx tsx ../../node_modules/vitest/dist/cli.js --run test/resource-loader.test.ts -t "distinguishes an absent system prompt"— 1 passedNote
Preserve typed system prompt provenance to prevent empty custom prompts from falling back to built-in defaults
SystemPromptSourcediscriminated union (built_in | custom | unknown) in system-prompt.ts to track where a system prompt originated.buildSystemPromptto respect provenance: unknown sources return an empty string, custom sources (including empty strings) are used as-is without appending the default prompt.getSystemPromptSource()to theResourceLoaderinterface andDefaultResourceLoaderso callers can retrieve structured provenance rather than a raw string.AgentSessionto prefergetSystemPromptSource()when available, falling back toresolveSystemPromptSourceFromValue()for loaders that don't implement it.Macroscope summarized b54903c.