Skip to content

[FEATURE]: Save dynamically generated system prompt to opencode.db so it's included in transcript exports #26376

Closed as not planned

Description

@justinlyon12

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Currently, the dynamically generated system prompt (instructions) is built in-memory before the LLM call and is not persisted in the opencode.db SQLite database. Because of this, it is omitted when exporting a session transcript, making it difficult to debug custom instructions or agent behavior without a network proxy or debug logs.

Request:
Persist the dynamically generated system prompt into the message table (e.g., as role: "system") at session initialization. This would allow the existing transcript export features to natively include the full system prompt alongside the rest of the conversation history.

Benefits:

  • Simplifies debugging of AGENTS.md and custom environment instructions.
  • Provides a complete, 1:1 record of the exact instructions the agent received during a session.
  • Piggybacks on the existing transcript export mechanism for a clean implementation.

Activity

  1. justinlyon12 commented on May 8, 2026

    @justinlyon12
    Author

    Technically different feature but seems closely related enough to mention: #24990

  2. github-actions commented on Jul 9, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions