anomalyco / anomalyco/opencode

[FEATURE]: Show timestamp on permission prompts (Ask/Approve dialogs)

Open
#42,124 1 comment 0 reactions 1 assignee View on GitHub

@simonklee is already working on this.

Since Aug 12, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Feature Request: Show timestamp on permission prompts

Description

When OpenCode prompts for approval (e.g., "Do you want to allow this bash command?"), include the current date/time so the user has temporal context for the request.

Use case

Permission prompts currently show the tool name and arguments, but not when the request was made. For long-running sessions where many minutes pass between user prompts (and the agent is thinking, then proposing), the user has no easy way to know how stale a prompt is.

Example scenario:

  • Agent says "Voy a hacer X" at 10:00
  • Agent enters thinking mode for 8 minutes
  • Permission prompt appears at 10:08 with the proposed action
  • User has no easy way to see how long the agent took between planning and executing
Proposed display

Add a small timestamp to the permission prompt, similar to how /thinking and timestamps on messages already work:

┌─────────────────────────────────────────────┐
│ Permission Required                         │
│ Shell command                               │
│                                              │
│ $ git push origin develop                   │
│                                              │
│ Asked: 08/08/2026 14:32:11                   │ ← new field
│                                              │
│ [once]  [always]  [reject]                  │
└─────────────────────────────────────────────┘

The exact format can match the existing timestamps config in kv.json ("show" | "hide"), so users who already disabled timestamps get consistent behavior.

Why this is useful
  1. Audit trail — knowing when a permission was asked helps with reviewing past decisions
  2. Staleness check — if a prompt has been waiting too long, user knows the context may have changed
  3. Debugging loops — helps identify when the agent is stuck in long-thinking cycles
  4. Consistency with existing timestampskv.json: "timestamps": "show" already works for chat messages; this would extend that to permission prompts
Related existing functionality
  • kv.json: timestamps: show — toggles timestamps on chat messages (already works)
  • tui.json: keybinds.session_toggle_timestamps — keybind for the toggle
  • tui.json: keybinds.session_timeline — keybind for session timeline
Acceptance criteria
  • Permission prompts show current timestamp by default (when kv.json: timestamps: "show")
  • When kv.json: timestamps: "hide", permission prompt does NOT show timestamp (consistent with chat messages)
  • Timestamp format is consistent with existing chat message timestamps
  • Works across all permission prompt types: bash, edit, webfetch, question, etc.
Environment
  • OpenCode version: 1.18.10
  • TUI mode (gnome-terminal on Wayland)
  • kv.json: timestamps: show
Workaround (current)

For now, the user has to either:

  • Track time manually while watching the agent
  • Use external watch -n 1 date in another terminal
  • Wait for the chat message timestamp (already visible) to estimate

None of these are integrated with the actual permission prompt.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.