Skip to content

feat: give codex system prompt via personality#1482

Open
k11kirky wants to merge 1 commit into04-03-feat_clean_up_session_reloadinfrom
04-03-feat_give_codex_system_prompt_via_personality
Open

feat: give codex system prompt via personality#1482
k11kirky wants to merge 1 commit into04-03-feat_clean_up_session_reloadinfrom
04-03-feat_give_codex_system_prompt_via_personality

Conversation

@k11kirky
Copy link
Copy Markdown
Contributor

@k11kirky k11kirky commented Apr 3, 2026

Problem

The Codex adapter was not receiving custom instructions/system prompts, and token usage tracking was incomplete, limiting its ability to follow user-specific guidance and provide accurate usage metrics during task execution.

Changes

  • Added instructions parameter to TaskExecutionOptions and CodexProcessOptions interfaces
  • Modified the Codex spawn logic to pass instructions as a configuration parameter with proper escaping for backslashes and quotes
  • Moved system prompt building earlier in the agent service to make it available during initial connection setup
  • Enhanced token usage tracking in the Codex adapter to accumulate usage across prompts and emit turn completion notifications
  • Updated the Codex client to track per-message token usage including cached read/write tokens
  • Added proper usage accumulation in session state for comprehensive token tracking

How did you test this?

I wont lie, i didnt test this more than a quick test prompt. trust the agents bro

Copy link
Copy Markdown
Contributor Author

k11kirky commented Apr 3, 2026

@k11kirky k11kirky marked this pull request as ready for review April 3, 2026 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants