Skip to content

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

Closed as not planned

Description

@iamjalberto

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 timestamps — kv.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.

Activity

  1. bobleer commented on Aug 13, 2026

    @bobleer

    A timestamp would help, but I'd also treat staleness as a state check rather than only UI. Bind approval to the exact tool call plus cwd/worktree/session revision, then expire or invalidate it when that state changes. Otherwise a prompt can look recent while authorizing an action against a different checkout or file state.

  2. github-actions commented on Oct 13, 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