Skip to content

[codex] Hide view image tool prompts#92

Merged
Pigbibi merged 1 commit into
mainfrom
codex/hide-view-image-prompts
Jun 8, 2026
Merged

[codex] Hide view image tool prompts#92
Pigbibi merged 1 commit into
mainfrom
codex/hide-view-image-prompts

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • Hide view_image/viewimage tool use and tool result bubbles by treating them as internal transcript tools.
  • Add parser coverage for view_image function call/output pairs so base64 image payloads stay out of Telegram history and realtime notifications.

Validation

  • TELEGRAM_CODEX_BOT_SHOW_BASH_TOOL_CALLS=true timeout 180s uv run --extra dev pytest tests/telegram_codex_bot/test_transcript_parser.py
  • timeout 120s uv run --extra dev ruff check src/telegram_codex_bot/transcript_parser.py tests/telegram_codex_bot/test_transcript_parser.py

Note: an initial local pytest run inherited TELEGRAM_CODEX_BOT_SHOW_BASH_TOOL_CALLS=false from this VPS runtime environment and failed two existing Bash visibility expectations; rerunning with the test default made the target suite pass.

@Pigbibi Pigbibi merged commit 051b97e into main Jun 8, 2026
5 checks passed
@Pigbibi Pigbibi deleted the codex/hide-view-image-prompts branch June 8, 2026 18:22

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 91f474cad6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

_NO_CONTENT_PLACEHOLDER = "(no content)"
_INTERRUPTED_TEXT = "[Request interrupted by user for tool use]"
_INTERNAL_TOOL_NAMES = {"update_plan"}
_INTERNAL_TOOL_NAMES = {"update_plan", "view_image", "viewimage"}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Hide orphaned view_image outputs

When the bot starts or restarts after the view_image function_call has already been consumed but before its function_call_output is read, the in-memory pending-tool map in session_monitor is empty, and the output entry only carries a call_id with no tool name. In that case _is_internal_tool_name(tool_name) sees None, so the parser emits the JSON output containing data:image/png;base64,... as a persistent Telegram tool-result bubble instead of hiding it. Adding view_image to the internal-name set only hides outputs while the matching call is still pending; the output shape should also be detected or the hidden call IDs persisted/reconstructed.

Useful? React with 👍 / 👎.

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.

1 participant