Forward agent display identity to prompts #219

Merged
didericis merged 4 commits from forward-agent-style-prompts into main 2026-06-09 01:42:06 -04:00
Collaborator

Closes #218.

Summary

  • Prepends the selected agent name/color to the staged provider prompt for both Claude and Codex.
  • Keeps Claude's existing .claude.json name/color metadata and stops Codex from discarding the values.
  • Adds provider tests for prompt injection and launch prompt-path behavior.

Tests

  • python3 -m unittest tests.unit.test_agent_provider tests.unit.test_contrib_claude_provider tests.unit.test_contrib_codex_provider
  • python3 -m unittest discover tests/unit
Closes #218. ## Summary - Prepends the selected agent name/color to the staged provider prompt for both Claude and Codex. - Keeps Claude's existing .claude.json name/color metadata and stops Codex from discarding the values. - Adds provider tests for prompt injection and launch prompt-path behavior. ## Tests - python3 -m unittest tests.unit.test_agent_provider tests.unit.test_contrib_claude_provider tests.unit.test_contrib_codex_provider - python3 -m unittest discover tests/unit
didericis approved these changes 2026-06-09 00:47:45 -04:00
Dismissed
didericis added 3 commits 2026-06-09 00:47:59 -04:00
Replace prompt-injection for display identity with native UI wiring:
- Claude: writes a statusline shell script + custom theme JSON, wired up
  via settings.json so label/color show in the status bar and theme
- Codex: writes [tui] block into codex-config.toml (status_line,
  terminal_title, dark-ansi theme)
- Both backends set the terminal title via ANSI OSC 0 escape before
  exec-ing the agent when a label is present

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
feat(terminal): tint terminal background per agent color
test / unit (pull_request) Successful in 29s
test / integration (pull_request) Successful in 17s
b1551045dc
Add backend-agnostic terminal color support via OSC escape sequences:
- New backend/terminal.py with palette_printf() and exec_shell_script()
  shared by both Docker and smolmachines bottle backends
- Emits OSC 4 (indexed palette) + OSC 11 (default background tint)
  before launching; resets both on agent exit via OSC 104/111
- OSC 11 background tint is visible even when the TUI uses true/24-bit
  colors (which bypass the palette), as Codex does for its chrome
- Fix Codex [tui] config: status_line=["model-with-reasoning"],
  theme="ansi" (dark-ansi and cwd/directory were invalid identifiers)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
didericis force-pushed forward-agent-style-prompts from 7758f03ca3 to b1551045dc 2026-06-09 00:47:59 -04:00 Compare
didericis added 1 commit 2026-06-09 00:48:50 -04:00
fix(pyright): remove unused shlex imports from bottle backends
test / unit (pull_request) Successful in 31s
test / integration (pull_request) Successful in 15s
lint / lint (push) Successful in 1m35s
test / unit (push) Successful in 31s
test / integration (push) Successful in 17s
Update Quality Badges / update-badges (push) Successful in 1m30s
328069809b
shlex is now only used in terminal.py after the exec_shell_script refactor.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
didericis approved these changes 2026-06-09 01:41:58 -04:00
didericis merged commit 328069809b into main 2026-06-09 01:42:06 -04:00
didericis deleted branch forward-agent-style-prompts 2026-06-09 01:42:06 -04:00
Sign in to join this conversation.